air hockey

i am making an air hockey game in c++ .
but i am stuck at a problem
i want the player mallet to be under the control of the player simultaneous to the movement of the puck .
is this possible ??

if yes then how??
Of course it is possible.
With a plain old command line you're going to have to use strings and A LOT of editing to those... and you'll have to clear the screen ever time you draw... which really isn't very good programming practice.

I'm not sure, however, if there is any way to wait for user input and draw the screen at the same time without using a 3rd party library...
Last edited on
it would be possible simply with the windows API, however i imagine it would be a lot easier with DirectX API or maybe OpenGL library.
You haven't provided us with enough information about the libraries your using, environment your developing in etc.

http://www.cplusplus.com/forum/articles/1295/

Typically, game programming is based around a central "game loop" so that it just iterates fast enough you think multiple things are happening at once. Or you can goto multi-threaded.
Topic archived. No new replies allowed.