3
Reply

Constant Refresh?

J Elasigue

J Elasigue

May 22 2008 2:40 PM
3.3k

Hi all, it's me again. I'm in the process of making a game with a friend for class, and we're stuck at a certain point. We're having a problem making our game "real-time", that is to say, it constantly refreshes and while still being able to take input, say from a keyboard.

However, we're using a bastardization, for lack of better terms, of the windows application. We don't have that much of a grasp on forms, and we're hard-coding most of the game in the Program.cs area of a windows application.

I can provide code snippets for things related to paint, and key-mapping; but a lot of the program is working and has no real bearing on the re-drawing methods.

Specifically, we have a game that is set in space, with gravity effects. But at the moment, the program only redraws when a key is pressed. We have tried beforehand to constantly refresh the screen, but that poses problems in taking input from the keyboard. Also, it even causes our visuals to not show up at all.


Answers (3)