First, some background:
I do what can be a " roguelike ", so I can learn some interesting ideas that I have floating around in my head. The gameplay will not bypass the dungeon, but in any case, the display will be made in a similar fasion with simple ascii characters.
Being the fact that this is an independent exercise, I try to code it myself.
In the end, I would like the game to run on arbitrarily large game worlds. (to such an extent that I assume that the game is networked and distributed to many monitors in a computer lab).
Right now I have code that can read and write to arbitrary sections of the text console and create a simple partitioning system so that I can find the paths efficiently.
And now the question is:
I did some tests, and the biggest bottleneck is redrawing text consoles.
The presence of the game world, which will require intelligent display updates. I donโt want to repeat the entire game buffer every frame ... I need the pointers on how to configure it so that it only draws sections of the game, to be updated. (and not just the individual characters that I have)
I manipulated the Windows console through windows.h, but I would also be interested in running it on Linux devices through the puTTY client connected to the server.
I tried to adapt some video processing procedures, since the ratio between the pixel and the symbol is almost 1: 1, but I was not lucky.
In fact, I just want to explain some of the principles underlying it. But some example (psudo) code will be nice too.
source share