Return to Home Page
Greg Santo's Game Programming Portfolio
   
Go! Kart


Program Description

Go! Kart is a two player side-scrolling racing game in which the two players must compete to finish the race in the shortest amount of time possible. The players have the option of racing on a single map (Quick Race) or completing a set of four or more maps in a row (Circuit Race). Once the race, or circuit, begins the players must race to the finish line. Both players must complete two laps.

Players must do anything they can to be the first to finish the race. Players can stomp on each other, bump each other off the map, and use special items against one another. Throughout each map are question boxes which give the players special items. Players can use these special items to either hurt their opponent or help themselves. The beauty of these special items is that more than one special item can be used on a player at a time. In fact, up to 10 items can be affecting a player at any time.

Programming Challenges

Go! Kart was my first large game project in C++. I faced many challenges while developing Go! Kart, these problems ranged from game design challenges to low-level programming challenges. The major programming challenge I faced while programming Go! Kart was creating a dynamic and robust menu system.

After many different menu models I decided to use a linked list of generic menu nodes. Each menu node is then derived from the generic menu node class. Each menu node also contains a function pointer which can be used to run a custom function once the menu node is selected.

This menu structure is easily extended and extremely functional. Basically, the generic menu node can be extended to any type of menu node desired. Also, if special functionality is required, a pointer to a function can be used to execute any additional code.


Features
For more detailed information about Go! Kart please visit ShatteredRealmProductions.com

  • Two player head-to-head action
  • Customizable controls with both keyboard and joystick support
  • Excellent music and sound effects
  • Beautiful graphics
  • Particle effects (i.e. falling snow)
  • 10 items which can be used to help you or hurt your opponent
  • 12 levels with increasing difficulty
  • Choose either a Quick Race or a Circuit Race
  • Customizable circuits
  • An easy to use WYSIWYG level editor
  • Much, much more ...


Screenshots

The Go! Kart main menu
The Flower Circuit
The map preview
Player 1 has a shield
Player 2 used the moon on Player 1
Ready, Set, Go!
Player 1 used the bomb on Player 2
Player 1 has completed his first lap
Player 1 wins!
The Castle
Hilly Valley
Blockland


Code Sample
The CMenu class is the base class for all menu's in Go! Kart. All other menus will be derived from this class. This class allows for menus to have custom fonts, backgrounds and particle systems.

CMenu::CMenu(char *staticText, CParticleSystem *particleSystem, char *fontFilename, int fontWidth, int fontHeight, char *activeFontFilename, int activeFontWidth, int activeFontHeight, char *backgroundFilename)

{   

    DebugOutput(DEBUG_MAXIMUM, "Constructing a Menu.\n");

 

    activeMenu = this;

    activeNode = head = tail = firstVisibleNode = lastVisibleNode = NULL;

    this->particleSystem = particleSystem;

 

    this->staticText = staticText;

 

    font = new CFont(fontFilename, fontWidth, fontHeight);

    activeFont = new CFont(activeFontFilename, activeFontWidth, activeFontHeight);

 

    if(font == NULL || activeFont == NULL)

    {

        ErrorHandler("Could not load font file: %s or %s.", fontFilename, activeFontFilename);

    }

 

    if(backgroundFilename == NULL) background = NULL;

    else

    {

        string directory(BACKGROUND_DIRECTORY);

        string file = directory + backgroundFilename;

        background = SDL_LoadBMP(file.c_str());

        if (background == NULL) ErrorHandler("Failed to load menu background %s.", file.c_str());

    }

 

    maxVisibleNodes = MAX_VISIBLE_NODES;

 

    activeNodeNumber = firstVisibleNodeNumber = lastVisibleNodeNumber = 0;

}


Downloads

Go! Kart Setup.exe - This is the Windows Installer for Go! Kart. This allows you to create a Start Menu group, a desktop icon, and/or a Quick Launch icon.

Go! Kart.zip - This is a zipped version of all the necessary files for Go! Kart. This is for users who do not want to run an installer. This will not create a Start Menu group, a desktop icon, or a quick launch icon.
   
Copyright © 2006 Greg Santo