Thursday, July 30, 2009

straddling is fun


Arrow keys for movement, spacebar to jump. Use arrow keys while swinging to increase his spin. Hold down spacebar to make the jump last longer. Hit spacebar again when holding on to a wall to wall jump. Click on the game to start interacting with it


Yeah, so gravity shifts are obviously out of this world and wonderful and I can be incredibly proud of myself. That said, in the previous post, one crappy bit was the nonsense that would happen around gravity rifts - I went a little crazy with crossing over collision lines and other such nonsense to keep Dreg from losing his cool and shifting into an alternative reality.

As I mentioned in the previous post, I wanted to create special collision lines that straddle multiple gravity fields, including floors which Dreg could run along without the collision detection giving up and stomping off in a huff as soon as he hit a gravity rift. This meant making funky collision lines that would return different values depending on which gravity zone Dreg was in. I also had to integrate it all into the chaos that is my "level-editor".

Hopefully the rather non-fun demo at the top of this post should demonstrate that it works!

The exercise also allowed me to do lots of tweaking on the collision detection itself, and Dreg is now even less likely to casually walk through walls, though I wouldn't like to claim it's impossible. I've tried to minimise the need to limit the actual level design possiblities, but there are a couple of things I have to keep in mind- if I try to make a floor behave as a wall it gets upset with me.

That aside, I now feel I have a system which is flexible enough for me to make the kind of levels I want to make, so look out for the next post - it's going to be fantastic.

I'm sure you, my avid fans, were a bit upset about how long it took me to get this update up and running. The reason? Well, this project was my topmost priority for a week, and I was seriously riding a wave of enthusiasm. The enthusiasm has dissipated a little, so now it's a case of trying to maintain a certain level of discipline and making sure that I keep on working. My having finally started playing GTA4 hasn't helped either.

Oh and I've finally caved in and made Dreg move with the arrow keys!

No comments:

Post a Comment