maandag 8 maart 2010

08/03/2010: Path lanes & Obstacles

Today started well, but after a while some issues/problems were stacking up :(

New functionalities that have been added today:
  1. Path lanes: until now, Simon could walk freely on the path. To make the game more clean - and to ease the collision detection - the principle of path lanes have been added. An example of a platform game that uses lanes is Little Big Planet (PS3).
  2. Obstacles: the ObstacleManager and Obstacle classes have been created. When the level starts, the manager will create obstacles and put them on the path. 
    1. Of course, it will be Simon's job to take them out or to avoid them :)
  3. Debug features: as said, today was a day with some odd behaviours. After a while I decided to built in a debug mode. When switched on, the game draws extra information on the screen (eg. the position) and of course the most import information: the framerate.
    1. The framerate is currently 60 fps and remains quite stable. Sometimes, the framerate starts and statys at 30 fps, but I suspect Visual Studio or my laptop and not the game :)
    2. Drawing text in XNA was not easy in previous versions of the framework, but now it is quite easy by means of the SpriteFont class.
One of the 'odd behaviours' was related to the SpriteBatch's SpriteSort mode. Currently, I use the BackToFront option. Additionally, every object that is drawn on the SpriteBatch receives a depth parameter. The depth is now computed by the game. Objects far away (eg. on a upper path lane) have a higher depth and will thus be overlapped by objects that are closer.

Simon and some nice puppies...

Geen opmerkingen:

Een reactie posten

Volgers