Advertisement

"random" maze generating

Started by May 06, 2000 03:39 AM
4 comments, last by JonatanHedborg 24 years, 7 months ago
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
=======================Game project(s):www.fiend.cjb.net
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
do unto others... and then run like hell.
Advertisement
Hey! thats pretty smart! I think il use that method.

Any ideas how to implement it?





========================
Game project(s):
www.fiend.cjb.net
=======================Game project(s):www.fiend.cjb.net
Please see:
here.

HTH

Tels


------------------
"Why do you go so slowly? Do you think this is some kind of game?"
Demo missions, DromED FAQ,
Automaticly create Thief Levels,
Vote! for your favorite fan mission
------------------"Why do you go so slowly? Do you think this is some kind of game?"Demo missions, DromED FAQ, Automaticly create Thief Levels,Vote! for your favorite fan mission
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
Tels: do u have any idea where to get the source for things like that?




========================
Game project(s):
www.fiend.cjb.net
=======================Game project(s):www.fiend.cjb.net

This topic is closed to new replies.

Advertisement