Product Chat / Random Generated Mazes from Terrain Heightmap

Author
Message
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 20th Mar 2021 07:53
I generated a heightmap that produces a random maze (using my HM2GG app) and works quite well in classic. Obviously MAX is not there yet with terrain as this still needs to be implemented.
Wondered if anyone else has produced any mazes or maze like games using various techniques. I'm making an educational game for my wee boy, mazes and dinosaurs theme. I can use the HM2GG to export the terrain model but wanted to avoid that for now, performance hit would be a lot higher I would imagine.

Classic


MAX (terrain not implemented but would be great to be able to create mazes also in MAX. LOD is hiding a lot of the terrain here UGH, turning fog off doesn't make any difference)

Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++ VS2019, SQL, PL-SQL, JavaScript, HTML, Three.js, others
Hardware: ULTRA FAST Quad Core Gaming PC Tower WIFI & 16GB 1TB HDD & Win 10 (x64), Geforce GTX1060(3GB). Dell Mixed Reality VR headset, Aerodrums 3D

Attachments

Login to view attachments
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 20th Mar 2021 09:17
Nice work!

I created procedural mazes a few years back though using placement of equal sized ‘boxes of terrain’ - which were regular box entities textured to look like terrain. Then added procedural random enemies in the created open cells of the maze. Was also multi level so had to figure out a way of getting stairs into the appropriate parts of the created maze. Using the same random seed recreated the maze exactly the same but using something like time/date created a different experience maze each time.

Yours looks great by using the terrain - which algorithm are you using?

Cheers.
GPU: GeForce RTX 2070 SUPER PassMark: 18125
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 20th Mar 2021 13:02
@cybernescence-I might try that way and see what I can come up with.
Quote: "Yours looks great by using the terrain - which algorithm are you using?"
- hmmm, I can't recall it's really old code. I'll have to get back to you on that one.
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++ VS2019, SQL, PL-SQL, JavaScript, HTML, Three.js, others
Hardware: ULTRA FAST Quad Core Gaming PC Tower WIFI & 16GB 1TB HDD & Win 10 (x64), Geforce GTX1060(3GB). Dell Mixed Reality VR headset, Aerodrums 3D
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 20th Mar 2021 14:44
Video from 4 years ago showing the 3D maze procedurally made out of blocks, before I figured out how to make the randomly dropped AI
react properly in the maze and also how to put the steps in to allow access to different height levels (hence use of jetpack indoors)



Cheers.


GPU: GeForce RTX 2070 SUPER PassMark: 18125
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 20th Mar 2021 17:45
@ BOTR
It looks great in GG, about GGMax is just a matter of time.
I've to create some mazes, nothing to do with generating terrain mazes, just to make a maze runner demo, and to try a beeper I did that work like a radar to get some clues about the right path when inside the maze. This demo is a ton of years ago, bad quality video, bad quality meshes, bad fps, just the idea was fine, I've modeled the town, the walls open/close at a certain time, can found the script I wrote to change some wall's position here and there, generating a new maze. I even create the spider creature that gets out when the alarm siren sounding and the doors close, Never get to attach a gun right, in fact, the spider has an RPG wrong place because I do not get to set right the FIRESPOT. LOL

Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 20th Mar 2021 17:48
@ Ciber
Nice video mate, I remember it from your game thread.
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 21st Mar 2021 23:18
Always thought about trying some sort of maze gen, but GG's lack of object creation/loading/spawning whatever people want to call it has always put me off.

However I have had a look again. This is a lot of objects to place down And there are some duplicates hidden in there as well that got placed by mistake; hard to spot em once you have a map like this.

My script made them into a floor.

and this after a small tweak.

Main problem here is GG is pretty much struggling just with this 40x40 area of blocks, but that is 1600 in total; all dynamic as you can't move static ones at all. Not really useful for my demo , but could probably work better as a maze where you can only see the immediate walls close to you. But not good for having everything made of blocks into the far distance. In fact even with 40x40 you are just hitting the zone where the blocks vanish ahead of you. Same as your terrain issues in that regard.

All good fun, but GG is defo not the easiest to play about with this type of thing.
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 21st Mar 2021 23:47
" GG is pretty much struggling just with this 40x40 area of blocks"

Yeah, just posted a 'discovery' on Occlusion or lack thereof in GG...
The only one GG does apparently is when the object isn't even in the camera scene.
I would think this would be automatic, fundamental and not even a listed feature.
Occludee should actually signify what everyone thinks it signifies-- no draw when
object is hidden behind other objects. Anyways...

https://docs.unity3d.com/560/Documentation/Manual/OcclusionCulling.html
PM
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 22nd Mar 2021 00:03
Oh, I put no effort into optimising anything on the occlusion side, just left them both as occluder and occludee, which is never good, but I figured for a minecraft demo would be the best bet. You can however see the occlusion in real-time before your eyes here without looking at the tab tab menu.

But yes, occlusion is by no means perfect

SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 22nd Mar 2021 07:13
@all-thanks for the input/videos/pics. very helpful. I might try the block approach like Cyber/Dvader. I like the idea of reading in premade maze data files using LUA and placing blocks that way, like we used to do in the 8 bit days using data statements where a particular symbol would represent a graphic , in this case a particular block and then position accordingly. I might dabble with the last open source GG code and see if it's possible to spawn entities on the fly, but don't want to spend too much time on it. I never got the occlusion/occludee thing, maybe I'll have a look into that side also. I just always leave the occlusion as default. I'll have to watch Lee's occlusion video again to remind me how it works. I wish MAX dev would quicken pace on the terrain side so I can play with that too.

thanks again guys. I'll post again with pics/code/demo game once I get something solid working.

Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++ VS2019, SQL, PL-SQL, JavaScript, HTML, Three.js, others
Hardware: ULTRA FAST Quad Core Gaming PC Tower WIFI & 16GB 1TB HDD & Win 10 (x64), Geforce GTX1060(3GB). Dell Mixed Reality VR headset, Aerodrums 3D
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 22nd Mar 2021 08:28
The occludee/der functions definitely work. As does reducing the camera distance when inside a maze made of blocks (with suitable twistiness of the paths). I got pretty good performance in the end, though I made the blocks quite large and also tweaked the algorithm to spawn quite large open chasm areas too.

When i say stuff works it’s from a year or so ago - no idea if it still does with current builds and source

Cheers.
GPU: GeForce RTX 2070 SUPER PassMark: 18125
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 22nd Mar 2021 20:40


Knocked that up in a couple of hours.
Been there, done that, got all the T-Shirts!
PM

Login to post a reply

Server time is: 2024-11-21 13:29:25
Your offset time is: 2024-11-21 13:29:25