Tuesday, 27 October 2009

Destination Alpha

Now that stages (levels) are being loaded from XML I can focus down on getting an alpha test sorted out. This will consist of one level (using very basic graphics since I'm rubbish in photoshop) from the game in order to get a feel for the direction the final game will take. I'll need a basic graphical interface for the player (health, armor, ammo etc), the ability for the player to move and fire an avatar and perhaps a basic puzzle and an enemy (just the one). I've set a deadline for myself of two weeks to get to this stage, if I can it'll land me in good stead for the rest of the project.

A level or stage for the moment consists of nothing but game entities, i.e. everything is classed as an entity, from physics props, the player to the actual geometry. I might put static geometry into a separate subsystem for the purposes of optimization (static world geometry doesn't need to be updated every tick). The benefit of doing it this way is that it makes the structure of the game very understandable to other programmers : everything is classed as an entity. Using the component system even things that are just for show, such as background tiles can be classed as an entity, simply don't assign it a physical component.

I need two more components designing next, MultiVisualComponent, this is used when an entity can be represented by more than one visual (Sprite, Model, Line etc) and MVCPAComponent (MultiVisualComplexPhysicsAdapterComponent if you want the full name, ain't it a mouthful?) despite the name this component has a relatively simple job. All it does is map bodypart positions in the ComplexPhysicsComponent onto visuals in the MultiVisualComponent. So for example if your entity has wheels represented as different bodyparts in ComplexPhysics you could assign them they're own wheel visuals using the MVCPAComponent and then applying torque to the wheels to rotate them and move your vehicle would also make the visual rotate.

No comments:

Post a Comment