Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I'm trying to simulate animation in my program... need help....

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I'm trying to simulate animation in my program, and I want a character to move from the left side of the console window to the right side. This is DOS i'm in here by the way. Does anyone have any suggestions, or maybe some code snippets that could help me? I want the character to move from the left side to the right side, then when the character reaches the right side border of the screen, move back to the left side, and so on, so that while the program is running, the character is moving from side to side indefinitly. Thanks.
 
Have a look at CURSOR.C on MSDN. This tracks mouse and keyboard events and bounces letters all over the screen. It is written for Win32 DOS and won't work on DOS 6.x or below.
 
you could do such an thing with clearscreen and printf in a loop, but it'll look ugly and I think it is a bit of a silly idea doing such a thing without a header like curses.h ncurses.h (I don't know if they work on windows) or conio.h for msdos
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top