logo

Ubuntu Build
Macos Build

A DOOM source port written in Crystal Lang based on PureDoom and LinuxDoom

Features

Usage

Running doo-cr will boot up an autodetected .wad file and will place the config file in the current directory.

To specify a wad file use -iwad, or if wanting to load a patch wad file as an iwad, like Chex Quest for example, use -fwad (force wad)

Common command line arguments are:

How to build

Use a unix shell, on Windows I use msys2 with UCRT64, with make, cmake and tools, Crystal, and Shards all installed and run make.

On Windows you may need to copy Crystal dlls over from wherever Crystal installed into your bin folder if you want to run doo-cr outside of your shell

Status as a Source Port

This source port will not try to reinvent the wheel.
It will not try to be super advanced like GZDoom, ZDoom, etc.
It will not try to be 100% demo compatible like DSDA Doom.
This is just my source port for me to make Doom whatever I'd like in my favorite language.

If nothing else this project serves as proof that Crystal can be programmed as a low level procedural language for game development, as well as a sign that porting libraries over into Pure Crystal is simply a matter of time and effort given my idea of two-way-bindings that I used with PureDoom to create this project in the first place.

Development

doo-cr utilized something I call two-way-bindings. I take a function in PureDoom, bind it into lib.cr, rewrite it in Crystal as a fun at the top level Not in a lib, and then turn the C function into an extern declaration.

Because of this, I was able to test each function I rewrote as I rewrote them. The downside is that the code is all very C-typed. It is in Crystal though!

The only thing that still remains in C is just variable declarations that I have been too lazy to move over to Crystal.

All methods are fully written in Crystal. The only C usage is bindings to Raylib and libADLMIDI rewriting those would be a completely seperate project

Do note that this code is extremely unsafe due to its current C-typed nature.

Plans

Contributing

  1. Fork it (https://github.com/d-shwagginz/doo-cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Special thanks