The Daily Click ::. Forums ::. Klik Coding Help ::. Computer random generated maze/path.
 

Post Reply  Post Oekaki 
 

Posted By Message

Dean Avanti



Registered
  01/11/2006
Points
  130
20th November, 2006 at 14:51:57 -

Can this be done, random computer generated path made through a house. Is this kind of thing possible?


See image here.
http://www.avantivita.com/Dean/Map.gif

The dots = a possible exit.

Enter the vampire house, find the head vampire and kill him, but take care, you must leave before nightfall, that's when the vampires will be at their full strength and they will be too powerful for you.

The game starts as a grid, perhaps it is completely black and only the rooms you have been to are shown, here I have done it as with the grid shown, player starts at start area at the base of the house, the computer works out all the squares, squares = rooms, rooms have 4 possible exits, that's possible exits, some will have one exit some 2, and so on, the computer randomly assigns what exits the rooms have, the computer will also generate a goal room, this is where the head vampire is, he will be on the top floor, reach his lair and kill him and try and make it out before sundown, the computer must select a route to him, one within so many squares, here it is 37, in fact we could have it as a route both in and out within so many moves, say the computer calculates a route in and out within say 60 moves, the computer calculates a route for this, by that I mean the exits on the rooms to make a path in and out, so each game is different, as the computer makes a different route every game.

So the question is, computer making the map, it randomly does this, but it must make it possible to reach the head vampire and get out by so many turns or paths, say within a certain number of these, could be a single number or perhaps within so many, so it may be between so many turns or paths.

 
http://www.avantivita.com
Video game developers and home of video game development assets.

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
20th November, 2006 at 17:08:13 -

I guess that's exactly what the Pathfinding Object is for.

http://www.clickteam.info/extensions/extview.php?id=255

I think there's a MMF2 version as well, but I can't be arsed to look it up on that other extension list.

 
n/a

Fifth

Quadruped

Registered
  07/05/2003
Points
  5815

VIP MemberGOTW JULY 2010 WINNER!Kliktober Special Award TagGOTW HALLOWEEN 2011 WINNERPicture Me This Round 51 Winner!
20th November, 2006 at 17:51:37 -

Is it the random maze generation that's giving you problems, or the path? I don't quite understand the problem...

For a randomly-generated maze, I'm sure there's a lot of great algorithms out there you can use... but I don't know of any.

One thing I had tried once, though, is a little two-part deal. First, any room that was not currently accessable from the starting point would choose one of its walls at random and turn it into a door. Second, the start point would trace how many rooms were accessable and flag them as such. It'd then continue doing those two steps until every single room was accessable.

I could give you an example of what I mean if you don't mind the fact that it's five years old.

 
Go Moon!

Ski

TDC is my stress ball

Registered
  13/03/2005
Points
  10130

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!KlikCast HelperVIP MemberWii OwnerStrawberryPicture Me This Round 28 Winner!PS3 OwnerI am an April Fool
Candy Cane
20th November, 2006 at 17:57:26 -

Wow I love what you did with your avatar there. Very ingenious

 
n/a

Tim

I'm on here way too much

Registered
  25/08/2006
Points
  132

You've Been Circy'd!Clickzine StaffSilverNova MemberVIP MemberTurtle Power!Evil klikerWii OwnerHero of TimeGhostbuster!Pokemon Ball!
20th November, 2006 at 18:12:42 -

LOL!!

It's reindeer-afied

 
http://www.SilverNova.co.uk


Deleted User
20th November, 2006 at 19:09:22 -

Hmm, i cant help you I'm afraid...
But it sounds like a cool game, so good luck with it atleast

 

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
21st November, 2006 at 00:24:34 -

Pathfinding Object can generate random mazes. Shut up, KK?

 
n/a

Dean Avanti



Registered
  01/11/2006
Points
  130
21st November, 2006 at 11:19:01 -

QUOTE-I think there's a MMF2 version as well, but I can't be arsed to look it up on that other extension list.

I cannot find it, you sure there is a version for MMF2

 
http://www.avantivita.com
Video game developers and home of video game development assets.

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
21st November, 2006 at 12:46:14 -

Ever heard of searching? <_<

http://extensions.co.nr/index.php?action=extension&name=Pathfinding%20object

 
n/a
   

Post Reply



 



Advertisement

Worth A Click