Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Maze generator not working...

Author
Message
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 15th Jan 2009 10:07 Edited at: 15th Jan 2009 10:09
Hello!

I know that I can just get some code from the challenges, but I want to code it myself.

anyway, why isn't this working?



It is supposed to generate random, non-overlapping rooms, and make paths between them.

But, the rooms are all screwed up, they appear always perfectly aligned and not random, and the paths just fill the space between the rooms, not creating a path at all...

Please, please help!

TheComet

Peachy, and the Chaos of the Gems

Bluestar4
20
Years of Service
User Offline
Joined: 19th Dec 2005
Location: USA
Posted: 16th Jan 2009 08:45 Edited at: 16th Jan 2009 08:47
I suggest that you increse the number of rooms that is to be created. from what I can see of your code the following lines stick out:
rooms=2
for t=1 to rooms

roomlength=4
roomheight=4

have you tried increasing the number of rooms ? and did you mean to put
roomlength=2+rnd(4)
roomheight=2+rnd(4)

bluestar4~

Login to post a reply

Server time is: 2026-07-06 10:01:27
Your offset time is: 2026-07-06 10:01:27