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?
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?