CS164 Final Project by Matvei Stefarov


Download Nautilus (, 3.8 MB)

To play, simply download, unzip, and run Nautilus.exe.

If for some reason the game shows errors about "missing DLL" or "computer configuration," install Visual Studio 2009sp1 runtime (, 4.0 MB). Most computers already have this installed.

If you are curious about how the game was made, take a look at the source code (Nautilus_source.7z, 6.7 MB)


Very loosely based on Joule Verne's Twenty Thousand Leagues Under The Sea, Nautilus puts you in the role of Captain Nemo. You are tasked with safely guiding a submarine through a treacherous underwater cavern. Control the ship's movement with WASD keys, and make sure to stay away from cavern walls and floating mines. The ship can only take a couple direct hits before sinking, so be careful! The ship has 3 torpedoes that you can deploy with a click of the left mouse button, so use them wisely to clear the path through the minefield.


Features Added Since Class Demonstration

Here are a few things I added to the game after turning it in, for fun:

Level Editor

The game loads level from text files, and there are also facilities in the engine for WYSIWYG creation and editing of levels. You can edit or replace any of the 3 levels included with the game:,, To clear the level, open it with a text editor and delete everything below the second (blank) line in the file.

Starting position, background gradient color, and wall color are defined on the first line of the file: After first line is defined, open the game and click on the level. Once it's loaded, you can start editing. Function keys (F1-F11) are used to switch modes. When in edit mode, collision detection is turned off and scrolling is manual (with Left/Right arrow keys, and Home/End to fast-forward). Here are the steps for creating a complete level:

  1. Clear the map file as describe above, and load it in the game.
  2. F2 switches to wall editor for the ceiling/top cavern wall. Keep clicking to add wall segments (the horizontal position of the mouse is copied). You need to reach 300 verices (standard map width), and the game will automatically save the file and switch to game mode. Keep going until this happens.
  3. F3 switches to wall editor for the floor/bottom cavern wall (saved when reached 300 vertices).
  4. F4 is for placing mines. Click anywhere with your mouse to place a mine (saved automatically).
  5. F5-F11 are for placing various decals on the map. Click anywhere to place a decal (saved automatically).
  6. Done! Press F1 to test the new level you just made.

Note that there is currently no "undo" functionality in the editor. Keep backups to avoid messing up maps.

About the Engine

Overall I found DREG to be easy to use and extend, although very poorly optimized. I ended up rewriting the keyboard/mouse input subsystem and all the collision-detection code because DREG's systems were buggy and did not fit my needs. The demo code is excellent, and there are lots of comments in the right places. I would give DREG a 75% score.