woensdag 17 maart 2010

17/03/2010: Video playback & Physics engine

This evening, two new features were added:
  • Video playback: the game consists of two base classes: InteractiveLevel and VideoLevel. In the past weeks the focus was of course on the interactive part, but since an intro and an outro will have to be shown I still needed some video playback support. Luckily, XNA has support for this through two base classes: Video and VideoPlayer.
    • Video: represents an asset and is thus part of the XNA content pipeline. Loading a video is similar to loading a texture or font.
    • VideoPlayer: the API of that class is straightforward. Every time the Draw() method is called, one has to get the current frame to playback and draw it on the screen.
  • Physics engine: since some actions in the game will need physics (eg. jumping, throwing objects, ...) I built in the Farseer Physics Engine (2.1). The API of the engine is quite easy to understand and it is a 2D engine (so no complexity of a 3D world :).

    • The engine has been built in for 50%. I still have some work to do and a lot of testing! Anyway, it think it will be nice to have such functionality since it will make the game look more realistic.
    • If you want to see the possibilities of the engine, have a look at this YouTube video. Note: put your speakers on, there is some nice music in the background :)

Geen opmerkingen:

Een reactie posten

Volgers