So I have written two demos for void skimmer. One that demonstrates ship movement, and one that demonstrates the parallax effect by projecting the game field onto a cylinder. Now it's time to actually sit down and write the game.
Up until now I've been able to get away with using scalars or simple objects, but I want to be easily able to scale the game into something larger. I don't want to write my own engine, but I need to find a way to make certain things extensible.
I think that with the game I am working on, it would be nearly impossible to develop as an MVC style application. The coupling is simply to tight.
So let's take a look at the game objects to get a better idea of what design pattern to use.
So far, we have a playfield and a space ship.
A play field has dimensions, a background image, physics, gravity, objects, etc.
A space ship is an object, it has a position, velocity, and a heading, it has a sprite, fuel, health, etc.
Now here is an interesting question. Is a play-field a level, or does a level merely populate a level? What conditions cause you to change levels? How do you manipulate the space ship object?
How are objects drawn? Do space ships draw themselves? Does the play-field draw the space ship? Does the game object draw all the game elements?
Is a game object just a game object, and the play-field does all the controlling, or will a space ship object inherit from a base game object?
There are two things I want to avoid in designing this game. Over abstraction, and over complication. I don't have an existing code base to work off of, and no team mates to code it with me, so having large complicated objects just slows things down.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.