Hello everybody!

This is an amazing place you have built up here and I have never ceased to be amazed by the knowledge available...

I have just one question which might seem quite easy to the right person so here goes. I am working with the console in C++ so all skin and bones with no graphics library or anything and I want to refresh the screen when I ask through a function. At the moment I call printf for my tile map and it ends up flickering so I wondered if I could in theory queue up all the data to be printed and only "sync" the screen when I say so it does it all at once and relives me of the "flickering" as it is refreshing line by line.

Thank you very much in advance!
from helpfullprogrammer.

I don't think you can do that with the console. You would need to use a GUI or graphics lib.

Thank you very much for the reply, I use the Directx SDK... but I saw a couple of videos of games in pure text, Would that still be through a GUI??? I just like the idea of being able to make a game solely out of the console, as I have already designed the grid pattern and display.

Could I hold the text and then print it all at once? almost a buffer kind of effect? Thank you very much again!
will,

I'm not sure. Now that I think about it, you could put all the text into one long string with newlines character etc., and then print the whole thing, then clear the screen and print the updated set. Probably would still flicker though.

If the game was just a complete text game, it depends. They may still have used a GUI, but they probably just used the console. Something like "Dwarf Fortress" (youtube it) is an example of what I mean. Still not sure though, you'd have to try things.

Best bet if your making a game that needs to update quickly is just to use a graphics library to make a 2D game with very basic sprites. If you can use the DirectX SDK well, then go with that. Allegro is also very good for 2D.

Hope this helps :)

This article has been dead for over six months. Start a new discussion instead.