fredag 27. november 2009

Case 5

Case was as follows :

In this case you're going to make your characters follow the ground they move on. You're also going to make them jump.

Case 5 is where the fun really started in terms of coding.

Adding gravity and jumping was actually a lot easier than I'd expected, adding a constant downward pull, and functions to set the downard pull to 0 whenever the character was in contact with the ground (or whatever else you wanted) doing the trick easily enough. After that all I had to do was refine the parameters (how far to jump et cetera), and I said myself done with that part. I also wanted to redo my old jumping animation, because I really wasn't satisfied with it, and try to see if I could make animations run properly while jumping.

The new jumping animation is basically a forward spin, similar to the jumping animations found in most old platformer games. It was actually pretty easy to animate, and is probably what I'm most proud of graphically in the game!

Making the jump animations run properly took a bit of tinkering, but I eventually got it working by making a boolean and making sure only the jump animation ran whenever it was set to true.

Ingen kommentarer:

Legg inn en kommentar