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

Re: [pygame] Squirrel Game Demo



Brian Fisher wrote:
On Thu, Feb 4, 2010 at 12:11 PM, Kris Schnee <kschnee@xxxxxxxxxx <mailto:kschnee@xxxxxxxxxx>> wrote:

    <http://kschnee.xepher.net/code/squirrelgame/>I'd appreciate
    thoughts on making the movement more satisfying.

Animation can actually make a huge difference on the feel, but there are a few things I think would help that are just mechanical. You have decceleration on stopping, which is nice, but you don't have acceleration on starting movement...

Also, it would feel a lot more satisfying if the squirrel felt smarter when it came to edges of platforms...

Finally, it might be nice to do a little action on jump landing - in particular, detect whether I am asking for movement when I land...

http://kschnee.xepher.net/code/squirrelgame/

I was tinkering with the code before seeing this message, so there are minor changes already: -Level size is determined from the level.txt file, so you can make arbitrarily large ones. I guesstimate that Python should be able to handle *much* larger levels on an ordinary computer. -Improved wall-grabbing and wall-jumping: You automatically grab walls when jumping at them, and don't have to hold any key to hang on. If you jump while on a wall, you jump off of it. If you step a bit rightward from the start, then leap towards the left wall, you can then reach the top platform just by wall-jumping.
-Gliding. Hold Z (which now does nothing else) to fall slower.
-X should also make you jump, if Space isn't working due to that keyboard problem.
-Music (gratuitously). Plays the first OGG file it finds in \music.

Based on your suggestions I added acceleration on walking/running. "speed = min(current_speed+accel, max_speed)". The difference is subtle but really seems to help fine movement. The other ideas sound useful too, if I can implement them -- but enough for one night. Thanks!

Currently, holding LeftShift gives you that four-footed pose (with no effect on your bounding box yet) plus higher speed. A possible way to handle edges better is to resist going over them if you're "walking", ie. in the non-shifted upright pose. (The art is of course just a placeholder.)

New version uploaded (definitely with source code) to:
http://kschnee.xepher.net/code/squirrelgame/

There's an optional music file from Celestial Aeon Project (jamendo.com) that you can put in the music directory if you'd like.

Yesterday I tried out the 2D flash version of "Mirror's Edge" for comparison. It ran poorly on my laptop, so it's hard to give it a fair judgement, but I found the animation nice but the movement... a little off, somehow.