zondag 28 maart 2010

28/03/2010: physics and audio

Okay, I finally figured how to use the Farseer physics engine. It was not easy, since it is difficult to debug problems related to physics. Anyway, Simon can jump now! I still have to make a jump animation, but the curve is correct now. To make simon jump, I have to call an applyImpulse() method and provide the impulse vector. That's the easy part, but there is a lot of collision stuff happening and it's too much to explain here :) The good news is that I can use the physics to do other things (collisions with ennemies, rocks, flying objects, ...).

Simon is jumping...

For fun, I added audio and music playback today. The API in XNA is quite easy, but the setup is quite a hassle. You have to use the XACT tool: Cross-Platform Audio Creation Tool. At first sight, that tool creates too much abstractions. But when having a more in-depth look it seems to be a quite awesome tool: everything that's audio-related can be configured. And - very important - it integrates well with the XNA content pipeline!



Currently, I added one sound (= a jump sound I found on a web site) and the level music. One of the following weeks I will try to make my own sounds :)

Geen opmerkingen:

Een reactie posten

Volgers