Sunday, November 27, 2005

Where I currently am

I'm now at a cross roads on the edge of the cliff. One road goes down the cliff to a bottomless pit with scary pointy rocks the other goes back and the last way goes forward into the unknown.
It's times like this where I wish I deisnged the program better instead of jumping head first and seeing how much I could do, then again this project did begin as an exercise to see what I could do with DirectX and how easy it is to do it, or at least thats my excuse for the poor design.

The solution is split into two.
  • The game and
  • The Rendering engine

Ideally I wanted to contain all the directx calls and references into the rendering engine. However due to needing DirectInput to handle what button was pressed and translating 2d into 3d coords I needed IntersectInformation in Direct3dX. I've also used default mesh objects for the weapons which are contained in the mesh class. I've also used the Vector3 and vector2 to hold the postion of the games characters (weapons, ships, bullets, etc). These are all things I've implemented in "The game" and so I was unable to seperate all the Dx calls into the Rendering Engine.

I've not done any UML for a while, but I've tried to draw out the classes and how they are implemented in a class diagram.

Initially I had RenderMesh and MostSimpleMesh in one class, but the memory requirements was high. However each enemy I had on screen contained its own textures, having 20 enemies meant a lot of memory usage. I've now seperated the class into two, RenderMesh and MosstSimpleMesh. MostSimpleMesh is only held once per enemy, in colEnemies. This does mean that less memory is now used. 20 enemies, but only one texture.

I've implemented a basic particle engine for explosion and flying stars going down. The players ship can drift towards the mouse cursor at a set speed or more accurately move directly where the cursor is. The ship can hold addons including weapons and the particle emitter for the engine exhast. In theory you should be able to hold a number of weapons on the side of the ship and use meshes (.x files) for them. The player can also shoot, different fire for different weapons which do different amount of damage and travel at different speeds.

A screenshot of the game running, with enemies being shot down:

The lighting needs fixing up, in the game and in the menu. I think I also need to get the background to slide down and also make it a few semi-transarent layers to simulate a nebula and the ship moving upwards.

At the moment I've only got one menu, i'm using the same menu for the main menu and the in-game menu. In the near future I think I'll seperate it out, I'll have a simple 2d menu for in-game and a more dramatic fancy 3d menu for the main menu.

0 Comments:

Post a Comment

<< Home


___