Duke Nukem 3D on ODROID

Chocolate Duke Nukem 3D: a sad story

I am a Duke Nukem 3D aficionado and I've recently read with interest Fabien Sanglard's review of Duke Nukem 3D source code. As he writes, the original source code was really horrible.

The Duke on his glorious cover - 3D Realms page here

Fabien also started a Chocolate port, so I grabbed it to try to run the Duke glories on ODROID/Linux.

I realized - in disappointment - that this was a quick hack to have it running on Mac, not a proper chocolate port.
Furthermore the provided Visual Studio solution files were referring to some previous version of the project, with non-matching paths and broken includes - making it also not possible to build it on Windows (this portable is not, my young padawan).

During my own quest to have it building properly on Linux I decided to use Canassa's patches, since they seemed to be done in the reasonable framework of a chocolate port, and then I wrote my own Linux makefiles because Canassa is apparently also a Mac user - thus no Linux portability efforts were added at any time.

My chocolate improvements

In my fork I have added proper CMake support, grab it here: Chocolate Duke Nukem 3D with Linux compile support

However the status of this codebase is almost hopeless:
  • will not work on anything else than 32bit systems
  • some glitch when player dies
  • the 3D Realms logo has some palette quirk, doesn't look like it used to be
Me unhappy :(

If you try to run it on a 64bit system you get only the initial animation, then it goes on "Segmentation fault". That's kind of expected, given the waterfall of integer-to-pointer and pointer-to-integer warnings shown during compilation.

Next step: eduke32

I didn't start from this more advanced port because I wanted to use a faithful version of Duke Nukem 3D, however I am now pleased to see that customization of the built eduke32 is possible to an extent that most advanced features can be turned off.

This is perfect for our ODROID retro-goals! :)

I have done some fixes and prepared a build script, grab them here: eduke32 patch to run on ODROID + optimized build script

Diplomacy is the best feature of this game, as I remember

And enjoy Duke Nukem 3D - it runs flawlessly fast on my U2!

P.S.: I have added the eduke32 binary to release 0.7.3 of odroid-debian-wheezy, or you can download it from here (will only work with Debian Wheezy 7.1 ARM hardfloat)

No comments:

Post a Comment