Skip to content
Nikolai Wuttke edited this page Dec 7, 2023 · 18 revisions

Where are saved games, settings etc. stored?

RigelEngine stores all saved games, high score lists, and options/settings in a location inside the user directory, depending on the operating system:

  • Windows: %APPDATA%\lethal-guitar\Rigel Engine (%APPDATA% corresponds to C:\Users\<username>\AppData\Roaming by default)
  • Mac OS: /Users/<username>/Library/Application Support/lethal-guitar/Rigel Engine
  • Linux: /home/<username>/.local/share/lethal-guitar/Rigel Engine

Inside that folder are two files, UserProfile_v2.rigel and Options.json. The first one stores saved games and high score lists, as well as the game path (location of Duke 2 data files), whereas the 2nd one stores options/settings.

You can backup and restore these files as desired, and change the options file with a text editor. The profile file is stored in a binary format and can't be edited directly.

(Side note: Older versions of the game did not have the Options.json file, and the user profile file didn't have the _v2 suffix).

Why is the profile not an editable text file as well?

This is to make it a bit harder to "cheat", i.e. manipulating your saved games/high scores. It's by no means meant to be a 100% secure mechanism that would make this completely impossible, far from it. It's just so that a little bit of work is necessary before you can manipulate your game progress. I believe that this type of cheating can take away the feeling of accomplishment you get from beating a game in an "honest" way, and RigelEngine already offers a quick saving feature to take the frustration out of difficult parts in the game - plus the cheat codes which already exist in the original game (if you have the registered version).

That said, if you are still determined to edit your saved games and/or high scores: This is an open source project, so the file format being used can be found easily enough, and there are existing tools out there to edit files in that format ;)

My game pad/controller doesn't work, what can I do?

RigelEngine's gamepad support is based on SDL2, which supports a lot of common gamepads out of the box.

If your controller is not recognized by the game, you can use SDL2 Gamepad Tool to create a mapping for it. Or create a game controller DB file and set the environment variable SDL_GAMECONTROLLERCONFIG_FILE to point to it. Also check if your controller is already in the community DB file.

There's a "missing DLL" error on Windows, what can I do?

Install the Visual Studio 2019 Redistributable.

⚠️ Don't download individual DLL files from any other website. These are not guaranteed to be the exact version needed for your version of Windows, can lead to other problems later on and contain viruses/malware. The only way to properly fix missing DLL issues is by installing the redistributable from the link above.

The game crashes on startup, what can I do?

Make sure your graphics card fulfills the requirements (OpenGL 3.0 or OpenGL ES 2.0 compatibility), and that your graphics drivers are up to date. See supported graphics cards for more information.

Can I use RigelEngine as game engine to make a completely new game?

Absolutely - as long as you respect the project's GPLv2 license, and have ownership of all assets/game data that you want to use, you're free to use the code as you like. You may also commercially sell games created with the code, as long as you keep the code itself open source (art assets etc. don't need to be open source, only the engine code). Other license models which don't require open-sourcing your code are available for purchase. Contact me under the email address in my GitHub profile.

That being said, unless you want to make a game that's extremely similar to Duke Nukem II, I wouldn't necessarily recommend it. You'd be constrained by the asset and level formats of the original game, and there aren't many content creation tools that work with these formats. If your main goal is to make a 2D platforming game, then you might want to consider using something like Godot, Unity, or GameMaker Studio instead.

Source port, engine recreation, emulator - what exactly is RigelEngine?

RigelEngine is native code, not an emulator. It does include an emulator for the OPL2 (music chip found on AdLib/Soundblaster cards from the DOS era) in order to play back music and some sound effects, but that's the only part relying on emulation.

It's not a source port either, since there is no source code that could have been ported. Instead, the original game's assembly code was used as reference to write a new version of the game executable (.exe) from scratch.

Like in the original, this executable implements both the engine as well as the game logic (behavior of enemies, player control code etc.). So the most accurate way to describe RigelEngine would be "game executable recreation". "Engine recreation" isn't too far off, but doesn't convey the significant amount of game logic code that's also part of the project. Personally, I usually call it "game recreation" for short, although that's not quite correct since the whole game also consists of art assets, levels etc., which have not been recreated for RigelEngine (it requires the original game's data files to run).

Later games often have a clearer distinction between "engine" and "game", as it became more common to implement game logic either in a scripting language, or as a separate dynamic library (.dll) that would be loaded by the engine (some older games, especially point & click adventures, already worked with scripting languages at the time of the original game's release, and even before). But Duke Nukem II doesn't have that kind of distinction, so the executable is more than "just" an engine.

What's different from the original game?

See list of differences.

Could RigelEngine run Duke Nukem 1 as well?

No, Duke Nukem 1 uses a fairly different engine, so it would have to be recreated separately. Supporting both of these games with a single engine would only complicate things.

Aside from that, there is already a (unrelated) recreation project for Duke 1: ReDuke

Hang on, there's this Duke 1 remaster for Evercade, and that's also based on RigelEngine. Will that be ported back to this open-source project at some point?

Duke Nukem 1 & 2 Remastered for Evercade is indeed based on (parts of) the code in this repository. But the Duke 1 portion was developed under contract specifically for the Evercade release. Releasing that code as open-source isn't up to me.

And even if I could release the code, it would only be the game logic - the menu system would still need to be implemented separately (the remaster uses its own, newly created menu system).

This repository is under a GPL license. Doesn't that mean that the sources for the Evercade version have to be made available?

It doesn't, because I relicensed the relevant code under a non-GPL license for use in the Evercade version.

Could RigelEngine run Cosmo's Cosmic Adventure?

Also no. Cosmo and Duke 2 run on very similar engines, with the latter being an evolution of the former, but there are still many differences. Plus, all the menu code and game logic (player controls, how enemies behave etc.) would still need to be reverse-engineered and reimplemented separately.

As with Duke 1, there is already a (unrelated) recreation project for Cosmo: Cosmo-Engine. And Apogee is working on an official HD remake!

Clone this wiki locally