Code Monkey home page Code Monkey logo

rigelengine's Introduction

Rigel Engine Windows build status CI Discord GitHub All Releases

What is Rigel Engine?

This project is a re-implementation of the game Duke Nukem II, originally released by Apogee Software in 1993 for MS-DOS. RigelEngine works as a drop-in replacement for the original executable: It reads the game's data files and plays just like the original, but runs natively on modern operating systems and is written in modern C++ code.

Compared to running the original in an emulator, RigelEngine offers many modern enhancements and usability improvements, including:

  • wide-screen mode
  • smooth scrolling & movement mode with increased frame rate
  • quick saving
  • improved game controller support
  • extended modding features

There was never any source code released for the original game, so this project is based on reverse engineering (specifically, disassembly of the original binaries). See Duke2Reconstructed for a complete reconstruction of the original code.

Try the web version! (compiled to wasm via Emscripten)

Read the F.A.Q.

Watch a showcase video (outdated)

Current state

RigelEngine is stable and fairly complete in terms of feature set. All four episodes of the game (shareware and registered version) are fully playable and on par with the original game.

I currently don't have any plans for significant future development - consider the project to be in "maintenance" mode. This means I'll try my best to fix major problems/bugs that come up and keep CI running, but I won't add any new features.

Supported platforms

RigelEngine runs on Windows, Linux, and Mac OS X.

It's fairly easy to install on Steam Deck, too.

The Linux version also runs well on small single-board computers (SBCs) like the Raspberry Pi and Odroid Go Advance. See Running on Raspberry Pi and Odroid Go Advance.

There's also a (3rd party) PS Vita port.

System requirements

RigelEngine is not very demanding, but it does require OpenGL-capable graphics hardware. Either OpenGL 3.0 or OpenGL ES 2.0 can be chosen at compile time.

Any Nvidia or AMD graphics card from 2007 or later should run the game without problems. Intel integrated GPUs only added OpenGL 3 support in 2011, however. On Linux, using GL ES can be an option for those older Intel GPUs.

See Supported Graphics cards for more info.

Aside from the graphics card, you don't need much. The game needs less than 64 MB of RAM, and runs fine on a single-core ARMv6 CPU clocked at 700 MHz (Raspberry Pi 1).

Contributing

Contributions to RigelEngine are very welcome! Please have a look at the contribution guide before making a PR.

There is a growing body of documentation on the Wiki, to help with getting into the code base. A good place to start is Architecture Overview

If you are looking for some easy tasks to get started, take a look at issues labeled good first issue.

Running RigelEngine

In order to run RigelEngine, the game data from the original game is required. Both the shareware version and the registered version work. When launching RigelEngine for the first time, it will show a file browser UI and ask you to select the location of your Duke Nukem II installation. The chosen path will be stored in the game's user profile, so that you don't have to select it again next time.

It's also possible to pass the path to the game files as argument on the command line, which can be handy during development.

Acquiring the game data

You can download the shareware version for free from archive.org. The full version (aka registered version) can be bought on Zoom Platform, a store which still has a license to sell the game (unlike other digital stores like Steam and Gog).

If you already have a copy of the game, you can also point RigelEngine to that existing installation.

The only files actually required for RigelEngine are:

  • NUKEM2.CMP (the main data file)
  • NUKEM2.F1, .F2, .F3 etc. up to .F5 (intro movie files)

The intro movies aren't mandatory, RigelEngine simply skips movie playback if the files aren't found. They are still part of the experience though, so I do recommend including them when copying the game files somewhere.

If there are existing saved games, high score lists, or settings found in the game files, RigelEngine imports them into its own user profile when running for the first time.

Command line options, debugging tools, more info

You can find more info that didn't quite fit in this README over on the Wiki. For example, you'll find info on how to activate the built-in debugging tools, a list of bugs in the original version that have been fixed in Rigel Engine, etc.

Pre-built binaries

Pre-built binaries are provided with each Release. As of version 0.8.0, this includes Windows (x64), Mac OS (x64), and deb packages for Debian/Ubuntu/Mint Linux distros (also x64).

A Flatpak is also available.

Also see third-party Linux builds for a list of other Linux packages/builds provided by distros and other projects.

Building from source

See BUILDING.md for detailed instructions for each platform.

rigelengine's People

Contributors

0xghada avatar avioli avatar bencsikandrei avatar eoan-ermine avatar gitter-badger avatar lethal-guitar avatar mcmartin avatar mnhauke avatar mohitsaxenaknoldus avatar naftalimurgor avatar peci1 avatar pratikone avatar rbaliwal00 avatar ryb-ableton avatar s-martin avatar sohamroy19 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rigelengine's Issues

Implement buggy player projectile offsets

The original game has some weird positioning for player shots when shooting to the left/downwards. Currently, the positions don't match exactly for those cases.
I personally think it makes more sense to not replicate these buggy offsets, but it's required at least as an optional feature for #45

Implement item container boxes

Currently, items are directly created at level load time. Instead, create the appropriate container boxes and spawn the items when shooting the boxes.

Hook up demo-playback

Demo playback is implemented (DemoPlayer class), but not yet integrated into the attract mode/intro loop.

Implement "time out to demo"

  1. Add TimedOut to DukeScriptRunner::ScriptTerminationType
  2. Add logic here to enable a timer (30 seconds) that gets reset on every user input event. If enough time passes without any interruption, make the script runner return true for hasFinishedExecution(), and return TimedOut as ScriptTerminationType from result().
  3. In MenuMode::updateAndRender, check if the termination type is TimedOut, and switch the game mode to IntroDemoLoopMode if so.

Improve sound effect quality (digitized sounds)

Many of the digitized sound effects don't sound on-par with what DosBox outputs, they are too quiet and missing high frequencies. Also, there are clicking/popping issues with quickly repeated sound effects.

There are two aspects of this problem:

  • ADPCM-decoding: It's worth seeing how the decoder from DosBox compares to the current one.
  • Cross-fading when re-triggering sound effects (to get rid of clicks/pops)

Then, it might also be good to look into alternative resampling approaches.

Implement dynamic solid/collidable entities

Make the physics system also incorporate dynamic entities which have a corresponding component (e.g. SolidBody or similar, to be added). This is required for rocket elevators.

Fix skill selection menu repainting

The skill description string at the bottom (e.g. "less enemies, more powerups") is not repainted correctly when switching between skills. This is because the script for the skill selection uses a mixture of big and regular text in a single XYTEXT command. The spaces preceding the big-text marker are supposed to paint over the previously shown skill description message.

To fix, XYTEXT should result in both a DrawText and a DrawBigText action when there are characters preceding the big-text marker byte.

Create wrapper for DBOPL

There is currently some duplicated code in both music_loader.cpp and audio_package.cpp regarding the setup of DBOPL::Chip as well as the mapping from 32bit to 16bit samples during generation. This should be encapsulated in a shared helper class.

Reference MSVC-compatible fork in `atria` submodule

The regular master branch of atria doesn't compile on MSVC 2015. The submodule should reference a fork with the required changes instead to make the variant sublibrary usable on Windows without further changes.

Implement shooting for player

This breaks down into:

  • projectiles (spawning, movement)
  • non-solid collision detection (has projectile hit entity?)
  • ammo/weapon management

Make enemy/object destruction sound configurable

Currently, all enemies/objects produce the same sound when destroyed. Make it configurable, to reflect the various sounds used by the game (explosion vs. biological enemy destruction sound, glass shattering for bonus globes etc.)

Add FindSDL2.cmake find script

Instead of relying on pkg-conf on Linux and an annoying hack on Windows, there should be a proper find-script bundled with the sources.

Introduce ResourceFile class

A ResourceFile encapsulates a "loaded resource", which can come either from the CMP file, or directly from the file system. The public interface would look like this:

  iter_pair binaryRange() const;
  LeStreamReader binaryReader() const;
  std::istringstream textReader() const;

Instead of always copying a byte buffer when reading from the CMP, a ResourceFile is returned which internally stores iterators into the already loaded CMP data buffer.

When reading from the file system, the ResourceFile contains a byte buffer for the loaded file instead.

Implement GameSession

GameSession is a sequence of levels, implemented as cycle of MapSession -> BonusScreen -> MapSession etc. Later, the end game story, high score entry etc. can be added as well. The idea is that starting a new game or loading a save will create a GameSession.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.