Jump to content
  • Advertisement
Sign in to follow this  
nuclear123

simple maze game :)

This topic is 3164 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!