Requirements and design considerations:
-What libraries to use?
-Anybody know how to use these things?
-Audio format? (MP3, Ogg Vorbis,, …)
-Weapons, ships, effects
(Polygon meshes, textures, sprites)
-Foreground graphics (health, score, etc.)
-To be handled by OpenGL
-Need a system in place to keep track of what gets drawn where
-Need to cull non-visible objects from the drawing routine (depending on how the game area is set up. For a simple scrolling game, this isn’t necessary)
-How to best design the objects? Should they be created with some commercial program (3D studio or something)? If so, we would need a way to export them. For now, we *could* just hard-code the graphics inside the program. We could make some shitty little boxes and triangles for the objects, and focus on the game system itself to begin with. Any other ideas?
-Objects under simple inertia / stationary (items, mines, debris?)
-Self-moving objects (ships, missiles) – add a thrust force?
-Rules for how objects react with one another
-Collision detection and what to do
-Other detections (explosion proximity, etc.?)
-Need to keep track of position and motion of all existing objects
-For cluttered areas, need a more clever way of checking collisions (not each object pair!) – Not that important for this simple game
-Will need to have ‘slots’ on a ship for weapons
-Need way of connecting the slotted weapons to the user interface (‘m’ for current missile, ctrl for gun, …)
-Need to check what weapon the user has, and then do the appropriate graphics/physics things (lighting effects, spawn ‘flack’ objects, spawn missile, find laser intersection)
-Check for shield status when taking hits (deflect damage to shields)
-Missiles should be the easiest to program. The dumb ones just move in a straight line until they hit something or go off screen. The homing missiles either move towards a specific target, or whatever the closest enemy is.
-Enemy ships could have the following actions:
-Fire at the user’s ships
-Don’t shoot if a friendly is in the way
-Move out of the way of incoming hurt
-Have some kind of default flight path for when nothin’s happening
I think the enemy ships would be one of the more difficult things to get right.
-Bosses could be done with a bunch of pre-scripted stuff in a cycle, for now
-Menus (in-game/full screen?) - Buyout stage
Forward/(backward?) thrusting & braking
Turning? Or, always facing forward and moving in a predetermined path?
Possible layout of the program (class hierarchy):
The most prolific thing the game will have to deal with are all the objects moving around on the screen (whether they’re ships, items, weapons discharges, etc.). There should therefore be some generic ‘Game Object’ class which can be used to contain and reference these things regardless of what they are. For instance, all missiles are a subclass of ‘Game Object’.
There are 3 ways these objects output information to the game
· Producing sounds
· Graphical representation on screen
· Physical interaction with other objects (doing something to another object)
There are also 2 ways for these objects to be affected by the game (input from game):
· User interaction (keyboard / mouse events)
· Physical interaction with other objects (being affected by the close proximity of another object)
There could also be a few systems in place for handling the interaction of these objects:
· Graphics space (keep track of what objects are to be drawn, and where to draw them on the screen)
· Physics space (keep track of how the objects are moving around, check for collisions)
· Sound buffer (all sounds being emitted by objects) – background music could even be considered as an (undrawable) object.
· Key trapper (wait for key presses, then send a signal) – for moving the user’s ship around