Original Post
Hi,
I've started to create a little multiplayer game in a console but I've got a little problem at the moment.
I'm at the point to show a simple map which is a 2d array of some characters which is the map. It looks like this:
* * * * * * *
* * * * * P *
P * * * * * *
* = a empty spot where the player can stand
p = A player.
So When a player logs in I draw this 2D array with 2 for loops
After this one I'm waiting for input of the user. If the player needs to be moved i'm changing the P in the array and redraw the map but this makes my console flicker. Is this just a disadvantage of using a console? or is there a more efficient way to display the array?
I could make the map smaller so it doesn't flicker but that's more like hiding the problem.
I've started to create a little multiplayer game in a console but I've got a little problem at the moment.
I'm at the point to show a simple map which is a 2d array of some characters which is the map. It looks like this:
* * * * * * *
* * * * * P *
P * * * * * *
* = a empty spot where the player can stand
p = A player.
So When a player logs in I draw this 2D array with 2 for loops
for(int i = 0; i < 16; i ++){ for(int j = 0; j < 30; j++) { printf("%c ",field[j]); }}After this one I'm waiting for input of the user. If the player needs to be moved i'm changing the P in the array and redraw the map but this makes my console flicker. Is this just a disadvantage of using a console? or is there a more efficient way to display the array?
I could make the map smaller so it doesn't flicker but that's more like hiding the problem.