how to C++ output overlay

So I am currently creating a c++ monopoly and wanted to give the center of the screen some purpose. Is there a way to print text when there is already text there?
https://i.stack.imgur.com/xDX05.png
What library/API do you use to draw the monopoly board?
Just std::cout
If you use a curses library (e.g. ncurses) you could specify where you want to draw the text.
ou thanks i will look into that :D
I think ncurses is the most popular but I don't think it works on Windows so if you use that you might want to use pdcurses instead, but they are very similar and I think it should be possible to write code that will work with both. You could find similar functionality in the "WinAPI" but then it will only work on Windows for sure.
Last edited on
I'm a go big or go home guy. I'd prefer creating a full GUI with something like wxWidgets rather than draw it on a console with ncurses.
If using Windows, then there is the whole console set of API's

https://docs.microsoft.com/en-us/windows/console/console-functions

You don't have to dump a logo thru the center of the board. This game is uniquely suited for having your game info in the center of the board... whos turn it is, what you rolled, where you landed, your turn options menu (buy, mortgage, pay rent, whatever) ...
you can also have a summary of the computer player(s) .. their cash on hand, # of properties...
its a large area and you can stuff it full of things.

When doing ascii art redraws, you have to erase what was there full before writing over it. That way if you write 'hello' over 'monopoly' you don't get hellooly
a simple way to do this is have fixed string sizes that you fill with spaces between end of used string and max size.
Last edited on
Topic archived. No new replies allowed.