SKYRUNNER

Skyrunner is a typical cosmic hero who is fighting his way through a planet flowing with lava and volcanoes and has the power to fly through the clouds. It has aliens which are land bound as well as sky bound. His goal is to not to die, collect coins for points and finish this level. This is a prototype presented here.

Our group represented a virtual game company and was called ABSolute Game Studios. The team members were:
  • Anjul Gurmukhani: Team Leader and Media Designer
  • Sakshi Agrawal: Lead Programmer
  • Benjamin Lin: Interaction and Integration Programmer.

Responsibilities and Contribution


As the Lead Programmer my responsibility was to develop a framework to combine different elements of a game:
  • Ogre3D Grapics Engine: Its is a free open source engine which can be integrated with other engines. It supports both DirectX and OpenGL. We used DirectX to render all the graphics for the game. 
  • ODE/OPCODE Physics Engine: Open Dynamics Engine has a OgreODE wrapper which can be used to integrate it with Ogre3D. ODE is written over OPCODE which provides with basic collision detection algorithms, ways to define space and objects with in that space and interaction between the objects.
  • OpenAL Sound Engine: OgreAL is the wrapper for OpenAL, which is one of the most common sound library used.
  • OIS Input/Output
  • CEGUI User Interface.
I have modularized my code into base (abstract) classes and subclasses implementing different aspects of object oriented programming and STL iterators and containers. I have also implemented different game mechanics taught in the class. The technical details and are in the end.


Source and Executable

The source code can be downloaded HERE.
The executable can be downloaded here.


Note: Install OpenAL 1.1 before running the application.


Video

A small video of our game:

Sky Runner




Screenshots


On the clouds
 


 




Searching for the coins
 


 






Technical Details

Finite State Machine


FSM for characters and enemies have been designed separately as both have different states and behavior.

 
 


The FSM class is an abstract class containing all the states. Its for the client to use only those states necessary for their entity.

enum mStates
    {
            mNew = 1,
            mHide,
            mMove,
            mIdle,
            mAttack,
            mDestroy,
            mJump,
            mTurn
    };   

Entity Abstract Class

This is the base class for all the characters and objects in the scene. It defines the type of object, inherits from Physics and FSM classes. The Physics class defines the types of geometries to be used. Due to troubles with handling Box geometries, we have used Ray geometries and the collision detection algorithms in Collision class, inherited from OPCODE.

The update function has been introduced to update entities in the world. Every object like Hero, Enemies or Fireballs write their own update function, implementing the FSM states and changing the behavior and parameters of the object. Other functions to update the Entity class' parameters are already written. The client can override them with their own implementation.

World Entities

All the moving entities in the world are added through an EntityList. Entites can be pulled out through their names and inserted into the list. It is a structure storing entities via their names. This lets you recycle a few number of objects to display more objects in the scene. Entities in this game are:
  • Skyrunner Hero
  • Spider Enemy
  • Flying Enemy
  • Trees
  • Volcanoes
  • Fireballs from volcanoes
  • Clouds
  • Coins
Sound Class

OgreAL is the wrapper for integrating OpenAL with Ogre3D. It provides the Sound Manager which is used to add new sounds or delete sounds. Only one manager should exist in the whole program hence using the Singleton Pattern. This way it can be inherited by any object for attaching a particular sound to it or be used in the main program to add sounds depending on events generated.


Č
ĉ
ď
Sakshi Agrawal,
Jul 22, 2009 10:50 PM
ċ
ď
skyrunnersrccode.zip
(101k)
Sakshi Agrawal,
Jul 22, 2009 10:50 PM