0

i want to use that in a snake game, i made the snake move but i can't control him ....
...how can i read a key without stoping the looping...
if i use getch() it stops till i stroke any key...and the snake stops,then after i press another key makes another move and so on

...or if is possible to use the arrows

2
Contributors
2
Replies
3
Views
11 Years
Discussion Span
Last Post by znx
0

1.Post your compiler and your operating system, and preferably which variant of the C language you are using if you intend to get a reply

2.If you are making this game from the command line be aware of the obvious limitations.

3.Look into using kbhit() instead. Although this command is not portable but may serve your purpose.

0

c++, xp, in command line, it has no design, is made from displaing letters with gotoxy()... thanks for the tip, i'll try this at home...

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.