Drawing Mazes

General game programming discussions about theory and applications.

Drawing Mazes

Postby Maudrid » Sun Mar 07, 2010 10:04 pm

Hi everyone, long time.

I have a question about something I'm working on in my spare time.

I need to draw a maze, but not a conventional 'corridor' maze. I have a multi-dimensional array of rooms that are connected.
In other words, a tree structure. Each room will have identical looking doors to it's parent and child nodes.
As a proof of concept, I want to do this in 2D, but eventually I'd like to make this a 3D game.
To win, you have to navigate to the root node, but drawing a tree, will make the game too easy to solve so I want to mix it up a bit in terms of how it looks.

My question is if any one has any ideas of how I can draw this so that it does not look like a tree structure?

Also, this has to be a tree structure in terms of code, I can't get around that.
User avatar
Maudrid
 
Posts: 285
Joined: Fri Feb 01, 2002 1:54 pm

Re: Drawing Mazes

Postby Korax » Mon Mar 08, 2010 1:06 pm

First of all, welcome back, long time no see. :D

Thats a pretty interesting idea. :)
I'm assuming you'll be doing some kind of node recursion?
That way you can make the tree structure depth infinite, or programmatically at least control its depth.
If you can generate the maze programmatically it'll be even a greater bonus. :)

I'm not 100% sure what you are planning, but I'd say, to keep it simple, make each node 2D (theoretically speaking) and rotate it to the desired dimensions. Maybe also portalize the nodes for rendering purposes. I'd have to say, I'm not an expert at mazes at all, so some things might seem totally off the ball or random.

Is it the layout, or rendering the layout thats the issue?
"There are two types of people in this world that will hate you. The envious and the stupid." - The Libertine.
User avatar
Korax
 
Posts: 1729
Joined: Tue Nov 06, 2001 4:36 pm
Location: Pretoria, South Africa

Re: Drawing Mazes

Postby Maudrid » Mon Mar 08, 2010 5:43 pm

I've talked a bit to a friend of mine and decided to change things up a bit.
The problem was rendering the maze in such a way that the player does not realize it's a tree structure.

I've now decided to only render one room at a time for this 2D test, placing the doors in a random order around the edges.

The tree structure will still be a problem in the 3D version. If the rooms are placed in an obvious tree order, then going in a single direction will be a guaranteed way to solve the maze. Since solving the maze requires the player to identify the parent node of every room, I need to somehow place the rooms in such a way that it become hard to figure out which of the rooms is the parent node.

So this is all a problem of placing the rooms randomly (but not too randomly so they intersect) in 3D space.
User avatar
Maudrid
 
Posts: 285
Joined: Fri Feb 01, 2002 1:54 pm

Re: Drawing Mazes

Postby vintar » Tue Mar 09, 2010 2:15 pm

Dunno if you saw the movie called "cube" or something like that.

A large 3D cube where connections to the next node would have to be timed properly,
using a sort of lift that would snap into place at irregular intervals, and once through a particular node,
going back could mean that the direction has changed completely due to a shift in the entire structure.

Complex I know :) , but interesting nevertheless.
Really need a job as a lua scripter with no experience - is that too much to ask? :-)
User avatar
vintar
 
Posts: 6
Joined: Tue Feb 16, 2010 10:54 am
Location: Durbs by the sea

Re: Drawing Mazes

Postby Nitrogen » Thu Mar 11, 2010 12:50 pm

Wow! havent seen you in ages...

I'm not sure how you would represent a tree as a maze, given that by their nature, trees dont allow cycles and each room can only have one parent room..

How would this look if you sketched it out? I'd be interested to see what you mean...
User avatar
Nitrogen
 
Posts: 2050
Joined: Fri Feb 01, 2002 1:34 pm

Re: Drawing Mazes

Postby vintar » Thu Mar 11, 2010 1:19 pm

How about at every intersection between two "branches" you have a circular room that has six doors and this room rotates at intervals where only one door would lead the right way and the rest would be dead ends.

Sorry, bad quickly drawn picture to follow :)

Image
Really need a job as a lua scripter with no experience - is that too much to ask? :-)
User avatar
vintar
 
Posts: 6
Joined: Tue Feb 16, 2010 10:54 am
Location: Durbs by the sea


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron