0

Im tring to make a snake game in consoles whit C. My question is how can i update the screen better than doing system("cls"); every time in the game loop, because that causes screen flicker and i dont like it.

Raxkin
  • 387
  • 1
  • 3
  • 18
  • 1
    whatever you try, its gonna be hard to get it super portable. i suggest using something like ncurses to abstract this stuff away – Steve Cox Jun 02 '14 at 20:49

2 Answers2

1

I think that what you want to do can be achieved by using termcaps/ncurses.

Last time I had to do something like that I used this website. It may help you as well :

http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/

The thing is that it won't be portable to windows.

Michel Antoine
  • 632
  • 7
  • 20
1

Yami beat me.

NCURSES is what you want.

If you need something on Windows you could try the suggestion supplied here: Is ncurses available for windows?

EDIT: I would have just commented, but I do not have the reputation.

Community
  • 1
  • 1
rnordeen
  • 297
  • 3
  • 6