simple maze game :)
ok so i decided about 10 min ago to make a maze game for my first game to make in a CUI....
i understand i can make the character as a class with certain functions to control him.
im unsure about how to approach the MAZE part im sure there are many approaches to this but how should i make the maze? as a class? structure? maybe something different? any little tips in the right direction would be helpfull :) dont be to helpfull i wanna do most of the work here...-thx
Depends on how the maze looks? A good start might be to load a maze from file.
For example you can have something like this in maze.txt
Where the '#' is a wall and space as a pathway.
For example you can have something like this in maze.txt
############# # ## # # ## # # ## # ############
Where the '#' is a wall and space as a pathway.
If your maze contains nothing but walls and empty spaces, you could just create a 2-dimensional array which contains variables that show whether or not a wall exists in that particular space. You'd probably want to load the maze from files, like Concentrate said, though, just so you don't have to hardcode each maze into your program.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement