Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   moving a object (http://www.go4expert.com/forums/moving-a-object-t21278/)

thapchi 10Mar2010 16:11

moving a object
Can anybody tell me how to move a object in c++

Like if i am making a game

I have not started dont ask me about code

So if i am making a game and my character is this @ then i want to move @ how can i move it in game

like when i press the arrow keys it should move

can anybody give me a little eg.

like make a program and move @ when we press arrow keys

thapchi 10Mar2010 16:12

Re: moving a object
sorry i forgot to mention its a console program

xpi0t0s 11Mar2010 19:10

Re: moving a object
First display the @ at the starting position.
When the user presses a key, determine the new position, write a space to the old position and the @ to the new position.
This will give the impression that the @ has moved.

All times are GMT +5.5. The time now is 08:37.