Friday, July 24, 2009

Yup. Now it's getting serious.


A and D for movement (ok, ok, I'll change it to arrow keys soon), spacebar to jump. Use A and D 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



The game now has gravity shifts, and it is awesome.

I've actually done quite a lot of work behind the scenes. The gravity shifts are clearly the very incarnation of amazing, but the seriously cool thing I did was a simple way to quickly create, and more importantly, tweak the collision lines (hence their rather scrappy appearance). There's still a couple of issues with dodgy collision detection as Dreg passes through a gravity rift, but I think I've found the solution, which I'll talk about here, but if you don't care about geeky nonsense, ignore the following section:

< geekfest >
Each gravity Zone is actually a separate Sprite within Flash, and all the gravity calculations are done within the sprite's local space. Passing through a gravity rift, which is just a modified collision line, will the removeDreg from his current gravity zone, then add him to the next. Some calculations are required to put him in the right position, rotation, and velocity, but it's all pretty simple stuff.

All the collision detection is done within the local space of the sprite Dreg is currently occupying. But I think certain objects, namely walls around a gravity rift, should be detected globally, regardless of which gravity zone Dreg is in. This'll be a bit more expensive, but I've got lots of nice ideas to keep it fast.
</ geekfest >

Another problem is that at the moment I can't have Dreg experience a gravity shift while running on the ground - the solution is the same as for the previous problem.

In any case, give it a go. If you start by running to the right, it's easier than if you start by going up (the latter option requires a lot of wall jumping).

On another note, it's been very interesting to see how non-gamers interact with this - I've tried to make the swinging and wall jumping a bit more instinctive, but retaining some challenge. If anyone's having trouble wall jumping, remember you have to hit the spacebar again to jump off the wall...

See if you can complete the circuit in both directions.

No comments:

Post a Comment