martes, 24 de noviembre de 2009

Physics 101

Finally our not-quite-physics engine is complete. I'll be honest, there's still a lot of room for improvement, but for now it's acceptable: our CreepyCharacter can't run through objects, but he can push and walk on top of them, also other objects cant' go through other objects and some of them can be stacked on top of each other.

However, we still have some work to do regarding the creation of our bounding boxes and spheres, since XNA's bounding boxes are axis aligned and hence can't be properly rotated.

lunes, 23 de noviembre de 2009

Push, pull, press, activate

The animation department has been busy these last couple of days, but we finally have all of our main character's animations.
We mixed these animations with a little bit of code so our character can now move boxes around the stage, pull levers and push buttons! The next step is to create certain 'side effects' to activate through the levers and buttons.

jueves, 12 de noviembre de 2009

Did you hear that?

We've added a few sounds to our game, keeping the creepy atmosphere that our main character unintentionally set, we deliberately chose disturbing sounds only. These sounds are played at random intervals at random order, we decided to do it these way for no particular reason other than to mess with people's heads.

By the way, we downloaded all of our sounds from MySoundFX.com, which offers a big library of free sounds, loops and tunes under Creative Commons licenses. We highly recommend it.

Up, up and away!

We've been working on our game's physics engine for a while and I think we're finally getting close. Collisions are always tricky, in our case we aren't aiming at pixel accurate collisions (mainly because our computers would burst into flames trying to run something like that), but just accurate enough so our CreepyCharacter can stand on some objects, but can't run through them. We think that bounding box/spheres collision detection will do the trick.

Luckily XNA already provides us with a property that calculates a model's bounding sphere, unluckily it doesn't have a direct one for bounding boxes (you can however create one based on a bounding sphere, but the result is far from optimal). Furthermore, you would expect the bounding sphere provided by XNA to reflect your model's current state, but this isn't the case. The sphere is calculated on a mesh by mesh basis (you actually have to merge them if you just want one bounding sphere), so if you scale, rotate or translate your model, the sphere won't reflect those changes, you gonna have to make them by hand.

Currently, bounding spheres/boxes have proven to be adequate for stopping our CreepyCharacter from running through objects, however the standing on top of them bit is still a little buggy.