Tuesday, July 21, 2009

Swingtasticism tweaked


New and improved! You can now easily jump from one pole to the next, and I've tweaked several other issues as well


Ok, I was a little premature in my celebration of swing. You see, I'm really impatient to get into the nitty gritty of gravity shifts, but I also have a bunch of acrobatic abilities for Dreg to have at his disposal. I thought I get swinging out of the way, do the gravity fun, then get back to his moves. Mainly I want the following moves:

- crouching and associated moves (crawling and doing a kind of low, evasive jump)
- wall running (running up a wall so as to be able to jump off of it)
- double jump (a totally unrealistic ability to boost your jump with a second one in mid-air. Unrealistic yet somehow satisfying)

These are all video game staples. There's not an ounce of originality in my game design for this game - it's more an amalgamation of ideas from different games that I like...

Anyway, so the swinging. Well, I thought I could do it quickly by just making a swing animation which plays automatically when he jumps on a pole, then a default jump from said swing. The problem was that the animation was crap. Have a look:


Yup, pretty crap


And besides, it looked stupid, him just swinging and swinging. I liked the idea of the player being able to control the swing, and of the swing just diminishing if not encouraged, but that would mean using maths and stuff, and maths makes my brain hurt. But indeed I did resort to maths, and I think it turned out much better, don't you?

I'm sure most of you have guessed that for his movements while swinging I just made 90 frames of animation of him leaning backwards and forwards, then had the maths control the actual rotation, the angle determining which frame to display. I'm sure that made sense to at least one of you.

Anyway, I then went crazy with maths. Maths will do that to you. It eats into you, and suddenly you want absolutely everything to be determined by ratios, fractions and the more sine you can stick in there the better. Then we had what I uploaded yesterday, where the particular angle, speed and general disposition of Dreg would determine how he jumped.

This sucked for several reasons. One - you'd often end up with weird looking restults, and it was very hard for me to predict what would happen. This made it very difficult for the player to have Dreg jump from one pole to the next accurately.

So I ended up with a compromise - keeping the funky mathematically inspired spinning, but a much more predictable way of jumping. So long as Dreg is spinning sufficiently fast (not very fast) he'll do a standard jump, and it doesn't matter which way he's facing. This makes it much easier to have him jump from pole to pole, and will make life easier for player and level designer (me) alike.

I want Dreg's acrobatics to be relatively easy to pull off. It should feel fluid and intuitive, like in Prince of Persia Sands of Time (which as far as I'm concerned set the bar for video game acrobatics). Tell me if you think it's worked out that way...

2 comments:

  1. The mechanics of this are looking very good! However, anyone who's ever played Castlevania must know that the famed "double jump" only comes as a reward to those who have painstakingly searched for hours on end for a magic potion that turns out to be hidden in a creepy dungeon guarded by three bosses. Video games these days... child's play I tell you!

    ReplyDelete
  2. Thanks for the input Greg! As for what you said about Castlevania, never fear - I certainly plan to milk all the abilities I give Dreg by having them drip-fed to the player as he/she progresses through the game.

    ReplyDelete