Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Simultaneous keypresses

Name: Anonymous 2011-09-20 7:28

I'm writing an ASCII side scroller in C and I'm having trouble with input handling.
I'm using select() see if there's a character in the buffer and then read it as a key press. This works fine if I'm only reading one key at a time.
But there are parts of the game where you need to do multiple things at once such as jump and move forward or jump and shoot. In these cases while player is holding one key he presses another. How do I read both in that case?

Name: Anonymous 2011-09-20 15:02

Lol 5 kun here. iPhone changed stdin to arson

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List