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.

Code Snippets / Random2DMaze

Author
Message
3Nigma
18
Years of Service
User Offline
Joined: 23rd Apr 2006
Location: RoManiA
Posted: 7th May 2006 09:58 Edited at: 19th May 2006 00:18
I made this code 2 days ago for my Pacman expension game...pls tell me what u think of it ! Cheers and N_JOY



Knowledge belongs to the world...but not this time
Zappo
Valued Member
20
Years of Service
User Offline
Joined: 27th Oct 2004
Location: In the post
Posted: 18th May 2006 15:40
Its very nice and works well (just a little bit slow).

There could be a problem though depending upon the game you want to use it for. You can end up with closed off sections (known as 'isolations') which you cannot get into, or out of depending upon where you start. Of course this could actually add spice to your game, especially if you could blow through walls!

If you are interesting in creating a 'perfect' maze there are several good algorithms such as the Aldous-Broder or Kruskal's but I recommend Prim's algorithm as its quite simple to understand and implement in any language. There is a great resource here which I referred to while writing a maze based game in Flash a while ago:
http://www.astrolog.org/labyrnth/algrithm.htm
Admin 7737
18
Years of Service
User Offline
Joined: 14th May 2006
Location: Japan... I WISH!!
Posted: 18th May 2006 18:10
How do you move about?

-----------------------------------------------------------
Im in A race With 5 People And I'm in third, I over Take 2nd, In what position am I? (Email me for the Answer!)
EddieB
20
Years of Service
User Offline
Joined: 29th Sep 2004
Location: United Kingdom
Posted: 18th May 2006 20:47
*laughs*

Game Admin, its Just a maze creator.

3Nigma:

Very Nice, But kind of slow Your one of the only coders joined this year that I have seen who can create a decent piece of code.

Keep at it!
3Nigma
18
Years of Service
User Offline
Joined: 23rd Apr 2006
Location: RoManiA
Posted: 19th May 2006 00:18
yeah...I now it's slow in full screen mode...If you run it on a windowed mode it's much faster!

Zappo:Thanks for the advise...I was thinking if there was a page like this...now I got my answer..Thanks a lot

Game Admin:I'm working on it...

EddieB:Not bad for a 16 year old,he?

Quote: "Keep at it!"

Don't worry I will...Im just beginning to understand DBP potential... It's awsome though


Knowledge belongs to the world...but not this time

Login to post a reply

Server time is: 2024-11-23 03:51:25
Your offset time is: 2024-11-23 03:51:25