Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

JonatanHedborg

"random" maze generating

This topic is 6928 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

Im planning on making a small maze game. The player is supose to go thru the maze in a certain time, there will be areas that slows the player down etc. for this game i need to make a random map generator. It has to test the map if it''s "do-able" and not to easy (ie. it has to have dead end etc.) any ideas? ======================== Game project(s): www.fiend.cjb.net

Share this post


Link to post
Share on other sites
Advertisement
Hey

One method you can do. . .Well, what you can do is
1.) fill the maze array with solid blocks (I assume you''re using array)
2.) first generate a random ''path'' through from one end of the array to the next. (along this path, you''d include your traps/things that slow the player down)
3.) then populate the rest of your array with random spaces (but only put the space if it is next to another space - ie, only if it''s on that new spaces, left, right, up, down)
4.) OR as an alternative to step 3, use a recursive algorithm which decides to draw paths of certain lengths, but only starting from your original path, (almost like a tree except you want MORE branches!)

Once you''ve done steps 1-4, go along your original path, and take into account the
5.) length of the path. . .
6.) difficulty of the path.

7.) If the path is too easy, add more traps/monsters etc.
if the path is too hard, remove some traps/monsters
Keep repeating steps 5-6 until the path is easy enough/hard enough.

Hope I''ve helped,
FReY

Share this post


Link to post
Share on other sites
Please see:
here.

HTH

Tels


------------------
"Why do you go so slowly? Do you think this is some kind of game?"
[URL=http://bloodgate.com/thief/]Demo missions[/URL], DromED [URL=http://bloodgate.com/cgi-local/red?u=3/]FAQ[/URL],
Automaticly [URL=http://bloodgate.com/thief/cow]create[/URL] Thief Levels,
[URL=http://bloodgate.com/thief/vote]Vote![/URL] for your favorite fan mission

Share this post


Link to post
Share on other sites
Hi Tels, I recognise your name from the Thief:The Dark Project forums (Which I haven''t visited since I completed the game.) This isn''t a true UBB board so your signature doesn''t work, as you''ve noticed

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!