Procedural spheric maze

Community Forums/Showcase/Procedural spheric maze

Flanker(Posted 2016) [#1]
Hello, I've been playing with maze generators, something I've never done before. But classic 2D mazes are quite boring... What about a spherical maze ? That's what i've been working on for the last couple of days on Blitz3D.

Six 2D mazes are generated using an hybrid algorithm (backtracking + growing tree) with parameters for more or less corridors and dead ends, and correctly wrapped like a cubemap. Then they're used to "displace" a 3D cube-sphere mesh with limited corners distortion. Path width and walls width/height are customizable.

Small and medium size mazes (click for larger view) :


Closer views :


Different walls/path presets :


The biggest maze I can generate before Blitz3D crashes (too much vertices or triangles per surface) :


And if I revert the mesh to be an inner maze :


The last screenshot reminds me of Halo :)

I still have problems with UV on the walls. Floor and walls top are straight forward to map but walls need more work.

My goal is to implement pathfinding and correct player movement at the surface of the mesh. I'm also thinking about a fun game concept.


Blitzplotter(Posted 2016) [#2]
Oh my, very impressive stuff - foin provide some nice animated 3D images at a very reasonable price if your looking for avatars ;) Makes me think of the film mazerunner.


Flanker(Posted 2016) [#3]
I already bought a model from 3dfoin recently, nice quality and good price. Sure i'll look at it again if needed, but there is so much work to make a playable game that it can wait :D


Flanker(Posted 2016) [#4]
A video with a spheric camera freelook :




skidracer(Posted 2016) [#5]
That looks superb Flanker.

Do you have a hires version of the 'Halo' inner maze shot? If so please consider uploading to the gallery.


RustyKristi(Posted 2016) [#6]
Looks awesome Flanker!


RemiD(Posted 2016) [#7]
Quite impressive, i am curious to see what you will do with this.

A simple gameplay would be to have a marble (ball) affected by physics, put at the of the sphere maze, to have your sphere maze fixed on a rotor (in order to be able to turn it without altering its position), to have some holes in some parts of the ground of the maze, and the goal would be to turn the sphere maze so that the marble follow the right path and does not fall from the sphere. (i had a game like this when i was a kid, but with a flat maze)


col(Posted 2016) [#8]
Hehe, that's cool.
The maze that's inside the sphere made me feel a little claustrophobic, wierd :/

It also reminded me of various scenes from the 'Inception' movie. WOuld be cool what kind of gameplay you could make from this.


coffeedotbean(Posted 2016) [#9]
LOVE IT! wack on some moody lighting, a flash light, batterys and some anthropomorphic animatronic robots and call it a horror maze game.


Flanker(Posted 2016) [#10]
Thanks for the comments :)

@skidracer, I'll upload a hi-res screenshot in the gallery

@RemiD, yes that's an idea I consider, but i'm afraid that the "wrapped" maze doesn't had fun compared to a flat maze on this kind of game.

@col, you're right to be claustrophobic with the inner maze because at the time there is not even an entry or exit point :D

@coffeedotbean yes it's rather this kind of game i'm thinking about, reaching the end while zombies chase you, you pick up equipments in the dead ends, throwing light sticks to know where you already went, finding piece of maps of the maze...


Steve Elliott(Posted 2016) [#11]
Very cool, can't wait for the game mechanics to be added :)


BlitzSupport(Posted 2016) [#12]
Great stuff.


Flanker(Posted 2016) [#13]
I've been able to push the limits of the maze size, by chasing down ghost vertices, now the geometry is perfect :



Near 1 million triangles ^^ just for purpose because it's far too heavy for good old Blitz3D.

However, i'm still stuck with UV on the walls as you can see in the video. The way I build the mesh doesn't allow to set UV directly like floor and top. If someone can help i'll appreciate, it's a problem of logic and I already tried different methods with no success... I'll create a new topic in the help section to descibe the problem.

EDIT : UVs problem solved with a headache and a piece of paper, it's even faster than before, now I'll be able to add game mechanics, I consider the mesh creation is optimized enough (it takes 15 seconds to build the 1 million triangles maze with my I7-3770).


Rick Nasher(Posted 2016) [#14]
Now we know where the term 'Amazing' came from. Very impressive.

I can see a convict getting teleported into that horror maze filled with all kind of horrific mutants as a punishment, for a capital crime he didn't commit and if he/she makes it to the extraction point, will have earned clemency and will be set free. All the action will be followed/monitored by a camera in the center of the sphere that watches every move. Add a day night cycle to make it even more gruesome.

Would also be nice as multiplayer where people need to be rescued/help each other reach the destination/extraction point.


Flanker(Posted 2016) [#15]
@Rick Nasher
This could be a film scenario, like Mazerunner or the Cube serie.

My first idea was a gameplay like the game Evolve, where a player plays a creature chasing other players, and other players try to escape together.

I've been able to convert world position to maze position, so I can implement pathfinding now.


KronosUK(Posted 2016) [#16]
The outer one is a bit like the death star. You could fly around the corriders trying to find the "bomb hole".