[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] [ROOKIE] Best way to manage jump movement



Hello everyone,

I've been for some days trying to develop a "canabalt"-like game (http://www.canabalt.com/), saving distances... I've got the way to manage scroll, buildings appearances, distance between them, etc.

Where I'm getting stucked is making the jump movement, and I left this for the last thing to do. What I'm trying to do is a basic jump movement where the more time you're pushing the button the more time you're jumping, with a limit of course. The player is always on the same "x" coordinate, so he only has to change the "y" in the way we want.

So, the way I learned to manage all of this is with a "player" class and some methods to define actions (jump, prone, animation,...). Well, at this point I'm getting frustrated trying to do this with this tools. The only thing I achieve is jumping with the "player" MEANWHILE the key is pressed. And here is the thing: I cannot find the way to make the "player" jump with A TOUCH of a key.

Thanks for your time (and sorry for my English! xD)