Hey guys. Obviously I'm knew to c++ and programming in general for that matter. I decided to take on a personal project of my own. I want to create a simple, yet unique, 2d terminal game. I'm not ready for any complex graphics. I just want to use chars to create anything the user will see on screen. But I am having trouble with making a "map" if you will.
The best idea I have come up with so far was to use for loops to display a 2d array of chars. The player's char is set = to a variable. And I need the program to read in values from the keyboard to determine where to move the players char. I wanted to use the directional keys, but I've read that using chars would be the easier way to go. So I set up an if statement to test for w,a,s,d keys for movement. I've used the _getch() function to take in the values without the player having to use the return key. But when I push one of the buttons, the char does not move. Also, the screen clearly reprints every time a key is pushed. I pasted my source code so you guys can see what I'm talking about. I would like to know if there is a way to display a screen of chars, and update them without reprinting all of them. Or at least make it to where the player won't be able to visually see that the screen is reprinting. I know I have a long way to guy, and I'm not asking for anyone to write or clean my code up for me. I want to do as much of this on my own as possible. That way I can guarantee that I fully understand what all is going on inside the program.