Processing Input

Published March 05, 2008
Advertisement


Here we have a 10x10 square that I can move around with the arrow keys - I've got input working, and a key mapping based on a dictionary that maps key codes to functions. The event system has been tweaked a bit and everything looks ready to go.

I've been spending much of my hacking time just figuring out the best Pythony way to manage the program. Python seems to lend itself to more globals than I'm used to. I'm not sure if that's good practice or not, but for this little trial I should try not to get to hung up over it.

I do find it amusing in retrospect that one of the first things I've coded up is a FPS counter for a text based program.
Previous Entry Python event class
Next Entry incompetech.com
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement