Currently I am making a console game (a rougelike) and I needed some advice on the collision events. I need to tell if there is a wall (▒) next to the player (@) and if so disallow the player from moving in that direction.
Does anyone have any ideas about how I could do this with the console in C#?
If needed I can provide some of my code.
There are multiple ways to handle this. I would expect you have a two-dimensional array representing the game map. One simple method is to add a method
CheckMovewhich validates an attempted move. If not valid, then the move is not performed. Here’s a sort of pseudo-code example.