Monday 29 November 2010

Physics System in place

I have now implemented a simple physics system that controls gravity and wind resistance. To allow easy integration, I have also changed Sprites and EffectInstances to be subclasses of the new physicsobject. This means that I can associate and of the existing visual components of a game with a physics engine to automate certain animation aspects.

I am now in the process of creating subclasses of the effect and effectinstance classes to create particle emitters that I can put in place and forget about for the duration of the scene. To prevent the games looking too boring, I am adding variance to the attributes of the particles, so there appears a certain randomness to their size, shape, trajectory and life.

I was originally going to create the particle instances as direct descendants of the physicsobject, but after some thought, I think it would be better to implement them directly into the special effects system. However, I may create a secondary particle system that is based on the sprite system. This would allow for collisions and interaction with the game objects, but as I do not need this right now, I will leave it for now.

No comments:

Post a Comment