Super Sprint

DESCRIPTION:

* The original Super Sprint is a 1986 arcade racing game made by Atari Games.  Up to three players race tiny Indy/F1 cars around a static race track, trying to beat the computer cars and stay in the game.  However, this Super Sprint remake is a 2011 PC racing game made by me, featuring new content and options while maintaining the feel of the original 1986 classic.


DURATION:

* A year, starting from Fall 2011 to Fall 2012 (when this page was updated).  For that year, I've worked on the game on and off, taking breaks to tend to other issues and maintain my sanity.


TEAM SIZE:

* For the most part, it is just me working alone.  Yet I received help along the way porting it to the original Xbox for a school project (switching OpenGL to DirectX) and designing some of the level graphics.


PRELUDE:

* I love racing games.  I love fun, fast-paced racing games accommodating to everyone yet with an emphasis on skill.  At FIEA, one assignment was to use an OpenGL C++ template to recreate a classic video game.  Super Sprint was an old favorite of mine so I valiantly attempted to remake it with all new features.  After the assignment was done and I got a good grade, I still continued to work on Super Sprint.  It may not seem like much but due to personal motivation to make a satisfactory racing game, this has become my magnum opus.  And since the original Super Sprint is a golden oldie for many, you should check this out too.

Oh, and due to possible copyright issues, I plan on changing the name of the Super Sprint remake to something else.  I'm thinking ahead on that one.


PERSONAL GOALS / ACHIEVEMENTS:

* Used a provided bare-bones OpenGL framework that can run a game in windowed or fullscreen mode and comes with a standard message pump.

* Implemented traditional Super Sprint things such as miniature Indy/F1 cars of multiple colors, oil slicks, water puddles, tornadoes, wrenches, explosions, spinouts, and waving flags.  Also implemented different screen states such as the main menu, options, track select, race, and results screens.  Use the keyboard configuration to play and navigate through the game.

* Implemented different game options and customization.  Play in 4, 8, 12, or 16 car races.  Choose any track at any time if you like!  Enable or disable the tornadoes and oil slicks.  Race any track in forward or reverse, unmirrored or mirrored.

* Get wrenches to upgrade the car's speed, acceleration, grip, or durability (reduces impact of walls and other cars).  Playtested the game quite a bit to make sure all upgrades are balanced.

* Car handling in a game like this is a major priority.  The original Super Sprint featured fast-paced drifting and it must be the same here.  Using only three keys (gas, steer left, steer right), the car drifts in and out of turns.  The longer you steer at the higher the speed, the more the car slides.  Also I went the extra distance and added tire smoke and marks on the track to further emphasize the feeling of drifting (a feature from another F1 arcade game, Virtua Racing).  Again, handling is something that is paramount in a racing game so much care must be taken to make sure it's just right.  It's the difference between another bland racing game and something genuinely interesting.

* Levels, Jerry!  Levels!  There are two levels of elevation, up and down.  Drive over or under the bridges!

* Used bump maps to get perfect wall collision.  Essentially a .bmp file of the map draws out which parts of the track are actually drivable and which ones will bump you back (see media pictures for details).  Using an additional C tool I programmed, the .bmp file is then translated into a compressed text file that is read when the track is loaded.  Just give me a 1024 x 768 .bmp and I can translate it into a track in the game easily!

* On the subject of wall collisions, each car has a 8-point collision system in a circle surrounding it.  If one or more of those points comes in contact with a wall, calculate which direction the wall is from the car.  Depending on the direction the car is driving, have the car rebound at a proper angle and deduct speed and possibly explode the car depending on other things like the car's current speed and durability level.  The gameplay video best demonstrates this.

* But there's more collisions!  How about collisions between cars?  One goal was to avoid having cars "float" over each other with some phony collision that's not much fun to hit each other.  Much care was put into multi-car collisions so each car's state is altered depending on where both cars are facing, their speed, and their durability level.  Again, the gameplay video best demonstrates this.

* In arcade tradition, AI / Drone cars that change in difficulty depending on the results of the previous race (win races = faster AI and vice versa).  Following the concept behind a track bump map mentioned above, each track also features a series of nodes that the AI cars will drive through.  As it begins to approach one node, it'll be tugged towards the next one.  If it misses a node due to a wreck or whatnot and a wall blocks its next node, it'll backtrack and avoid stupid nuisances like "ram into the wall repeatedly trying to get nowhere."  But what makes these AI cars slightly better than others is that they behave like human players (they don't cheat).  Besides the fact their top speed will eventually match yours, there's some randomness in how they behave so they don't follow the same exact driving line.  They also have a basic "raycast" system that allows them to detect objects in front of them and slow down and steer to avoid obstacles.  This raycast system is always being improved--for instance, the cars can possibly detect and drive towards wrenches intentionally!  If there's anything to be taken from this game, it's fun to watch the AI in the attract screen.

* Dynamic position tracking!  Like most every other racing game, this game which position each car is in depending on a tracking system for who is closest/farthest from the finish line at any moment.  As the cars go around the track, they enter a series of nodes that can determine how far along the track the car is at the moment.  Also care is taken that cars go through the "checkpoints" (intersections that the car must drive through in a certain way) to prevent glitches/exploits when it comes to keep track of player laps.

* Precise lap timing!  This remake runs at a 60 FPS (with deterministic gameplay) and can "theoretically" measure lap times down to the millisecond.  When the car crosses the finish line, the lap time isn't according to what the timer but also takes into consideration how far the car has passed over the line during that frame.
For instance, if each frame is 1/60 (or 0.0167) seconds long and only 70% or so of the change in X (or Y) coordinate was before the finish line, then in theory, it took the car just 0.012 seconds to reach the finish line in that frame as opposed to 0.0167.  Look at the media for a better picture of what I mean.

* Sound effects and graphics?  As a programmer, they are not the greatest but they will do.  Some of the graphics were used from the NES version of Super Sprint while many were retrieved from other places.  I edited many of them in Photoshop.  Part of these visuals are completely original as I have had friends design UI and track art to make the game more lively.  As for sound effects and music used with a FMod library, many of the game's .ogg files (smaller than .wav files but need to be memory managed to avoid leakage) come not just from Super Sprint but also several other vintage arcade racing games such as Danny Sullivan's Indy Heat and Virtua Racing.  I appreciate all the vintage racing games.  Also the engine pitch changes according to the car's current speed to real life car with three gears (just like in the original Super Sprint!).

* Lastly, there is a simultaneous online multiplayer mode for up to four players.  Really!  A UDP system sends packets to other players through a host-client system.  Up to four players can join a lobby and take turns choosing tracks, racing for the point standings, and upgrading cars over time.  This was part of another FIEA programming assignment--to work on and present a computer science project you are interested in.  Network coding this game is frustrating and is still very, VERY rough around the edges.  But provided with an IP (no matchmaking yet), packets are sent back and forth and are stress-tested to ensure that dropped packets do not halt the game and latency is taken into consideration so the gameplay flows as fine as possible.

* There are so many more things to this game but I cannot mention them all.  If you like to learn more about any aspect of the game, please let me know!  Check out the videos:


MEDIA:



Gameplay of the original 1986 Super Sprint arcade game.


Latest gameplay video of Super Sprint remake.  It demonstrates nearly all the features I mentioned above.


Super Sprint Remake Trailer, made several months before the previous video.


Gameplay video of initial release.  Many of the gameplay features such as collisions and sound effects have been changed since then.


Beta footage demonstrating the first attempt at AI cars.

Here are some graphic illustrations.  This the car's eighteen states.  Sixteen directions (22.5 deg difference) and two wrecked sprites.

This is what the track png's look like.  Left side is the ground level, right side is the upper level.  This beach level is beautiful.

An illustration of the lap timing down to the millisecond.

Another illustration of the lap timing, this time with a final race time of 1:23.3__ seconds.

This is how car collision works (sort of).  If the blue car is going fast enough, the red car is going to get shoved aside.

An example of the original bump map before it's converted to unreadable hexadecimal.  Black is permanent wall.  Blue is a wall if in a tunnel.  Pink is a wall if on a bridge.  Every other color is completely traversable.

The eight collision points surrounding a car.  If any of these touch a wall point, have the car bounce off the wall.

How the car is expected to behave when it hits a wall.

Each red dot is an AI path node.  When the AI car gets close enough to its desired node, it'll move onto the next one, traversing the track again and again.

Example of how an AI car reacts to a node.  It steers facing towards the next node in the list.

Here's some debugging I've done.  The blue line is the finish.  The green line is the checkpoint (must go through this in a certain direction to complete the lap).  The yellow lines are elevation changes (be able to drive on or under bridges).  The pink line is the AI waypoint system I talked about previously.

Another instance of fine-tuning the AI pathfinding.  Use Bresenham's line algorithm to determine if a wall stands between the car and the point.  If so, then set the car to pursue the node before the last one.  This is to keep the AI from going too far down the node chain, getting stuck trying to pursue a node it can't reach (hit the wall over and over again).


Here's a screenshot of what online play looks like (running four instances of the game on my computer).

I attempted to add some sort of latency counter like in many other online games.

Another picture of the track select screen for all four players.

One last picture of online play (with chat messages).  Online play is still buggy but I've been trying to knock out local play stuff first.

LINKS:

* Download link available SOON.