Using XNA Game Studio and Neat Game engine, I managed to clone the classic River Raid game for Windows. You can download an almost-playable version of the game from it’s codeplex project page.

Read on to learn how I did it…

When I got started with XNA, I wanted to clone some of my favorite classic games. I made a list of games I wanted to clone, and in that list there was River Raid, an Atari 2600 game written by Carol Shaw, the first female video game designer.

I had written a Tile-based side scroller engine using XNA and I was going to write my games using that codebase. So I started making River Raid on that, but after a while, I could see that it’s not going to look good and I got tired. I didn’t want to start from scratch so I stopped working on River Raid. Two years later I decided that I have to tie up some loose ends before going 3D. I downloaded Stella (an Atari emulator) and played the original River Raid for a while to understand how the game works. And after about two weeks, The project got to a point that it was almost playable and I uploaded it to codeplex.

So here’s what I did:

I wanted to stick to the original game as close as possible. The original Atari 2600 game has about 8 enemies/entities in it: Fuel Stations, Ships, Helicopters, Houses, Trees, Those little cyan planes, Bridges and of course the Player.

There are two types of terrain in the game: Interior and Exterior, and both types are symmetric, which makes our work easier since we can store only one value to represent each one which is their Width. After each section there’s a road with a bridge in the middle of it. Bridges have a fixed width, so technically each section (level) should begin and end with a free space equal to bridge’s width.

One of the key features of the original game is that because of memory limitations in the Atari 2600, the levels are generated in the run time using a clever algorithm. I used a level designer to be able to design challenging levels instead, however I also plan to create a random level generator for the game.

Levels must be saved with a “.rrx” extension and be put in the game folder in order to be loaded. A road with a bridge in the middle of it will be placed at the end of each level automatically. When a bridge is destroyed, the player will advance to the next level. To make the game run fast, levels will load dynamically and entities will be removed once they exit the screen.

Neat has a default set of menus built-in. So I didn’t actually spend my time on menus, and the only thing I did was making a background image to show in the Main Menu screen. I also used Neat’s GUI controls to show Score, Fuel and Remaining Lives to the player. My goal was to make this playable in 16:9 widescreen resolutions because it’s the new standard. The level designer originally designs levels for a 1920×720 resolution and everything gets scaled if another resolution is used. Resolution can be changed from the Options menu and settings will be saved as a Neat Script file, which will run every time the game starts.

Separating Axis Theorem and Polygons are used to detect the collisions. However all of the objects are rectangles in the current version. Player can move forward or to the left or right (side). Side movement uses uniform acceleration to make the game more challenging. Simple Pixel Shader effects were used to show if the player is running out of fuel or has advanced a level. Only one rocket can be fired at a time and rockets are always in front of the player, so we can store only their y-value to represent them.

You can download the game or browse it’s source code from here: