December 09, 2019, 08:51:08 AM

Author Topic: 3d (monster) Maze  (Read 2023 times)

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1413
3d (monster) Maze
« on: October 31, 2019, 02:45:05 PM »
 :o


There seems to be loads of talk around mazes, so in further extension to the maze code I released, here is a purely 2d (3d) maze - currently no monster...

Online Steve Elliott

  • Hero Member
  • *****
  • Posts: 2117
  • elgol developer
Re: 3d (monster) Maze
« Reply #1 on: October 31, 2019, 02:47:50 PM »
Yep, maze games are cool.   8)
Windows 10, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
MacOS Mojave, 64-bit, 8Gb RAM, CPU Intel i5, 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB.
Linux Mint 19.1, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
Raspberry pi4 4Gb RAM

Offline Xerra

  • Hero Member
  • *****
  • Posts: 767
    • Retro Evolved
Re: 3d (monster) Maze
« Reply #2 on: October 31, 2019, 03:19:41 PM »
There seems to be loads of talk around mazes, so in further extension to the maze code I released, here is a purely 2d (3d) maze - currently no monster...

Do it, Adam. You know you want to. I'd do it in GMS2, if I could think of a way.

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1024
Re: 3d (monster) Maze
« Reply #3 on: October 31, 2019, 06:11:02 PM »
well, to be honest, it is easy to build a big maze map all in code, so yes it is a good approach for lone devs...

curious to see what you can create (in 3d!) ;)
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1413
Re: 3d (monster) Maze
« Reply #4 on: November 01, 2019, 07:12:24 AM »
@RemiD Yep, the maze create code is very simple (as posted elsewhere), but the actual 2d drawing is not quite as straightforward as it first seems as you need to write all the 2d code to deal with the correct drawing - there's no bitmaps used here.

A (true) 3d version would be much more simple, just create the base primitives and display - but (in this case) what is the fun in that?  ;D

current version with some design lines to aid with the 2d plus a slightly modified 'maze':

Offline TomToad

  • Sr. Member
  • ****
  • Posts: 451
Re: 3d (monster) Maze
« Reply #5 on: November 01, 2019, 10:30:58 AM »
Reminds me a bit of a maze game I created on my C64.  For rendering,I had an array of PETSCII strings for each wall and path. I would check left of the player, if blocked, then I'd draw the wall string, otherwise, I'd draw the path string. Id do the same for right and in front. If the front is not blocked, I'd then check that space's left and right and front. I'd continue this way until the path was blocked, or I had gone the maximum depth.
------------------------------------------------
8 rabbits equals 1 rabbyte.

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1413
Re: 3d (monster) Maze
« Reply #6 on: November 02, 2019, 07:31:18 AM »
now with doors and 'visited' map

It's very 'pure', no graphics getting in the way of things and distracting me.
Next step is to work on some zoning and logic. E.G. there might be something that needs attention in zone 1 before progressing to zone 2, maybe the you need to collect something, etc.

I like the fact that it is neutral, so it could be a spaceship, or a pyramid, etc

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1413
Re: 3d (monster) Maze
« Reply #7 on: November 02, 2019, 10:14:57 AM »
automatic zones completed and being shown in different colors:

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1024
Re: 3d (monster) Maze
« Reply #8 on: November 02, 2019, 10:34:24 AM »
defining zones is also good for combining surfaces / textures, and determining what is visible and what to hide/show/render, and which entities to update, so yeah, way to go (i do something similar)
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline Derron

  • Hero Member
  • *****
  • Posts: 2607
Re: 3d (monster) Maze
« Reply #9 on: November 02, 2019, 12:30:56 PM »
@ RemiD
Do not mix up what iWasAdam might understand with "zones" (game logic wise) and your "zones" (render/physics engine wise).
So "zoning" can be useful for what you propose - but it cannot be the same as what "game logic zones" would be.

Adam's zones are possibly there to eg allow stuff like "explore the area to open a door" stuff whilst your is there to improve performance by skipping handling of certain elements - or to skip rendering walls or so.

I think for now Adam is using them to display what you have visited (he wrote that :D) so on bigger maps you can have some "auto (mini-)map" which draws what you "know" + some area around. So it is a visual helper which could be used for game effects too (explore 75% of a map and trigger a special event - like a new boss mob spawning).


But maybe I assumed wrong and just brought in some new ideas :D - it is up to Adam to clarify.


bye
Ron

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1413
Re: 3d (monster) Maze
« Reply #10 on: November 02, 2019, 12:50:04 PM »
Quote
(explore 75% of a map and trigger a special event - like a new boss mob spawning)
That is pure genius  :o

Just to clarify my use and creation of zones for everyone.
zones are just arbitrary numbered areas. Where the number refers to it's position in the abstract map logic.
E.G.
a door has a zone of 3
therefore placing the key to zone 3 anywhere in zones 0/1/2 is valid. As zone 3 can be accessed from possibly zone 0 or 1 or 2. But not anything higher.

So lets say you have 6 zones (0,1,2,3,4,5)
and the exit is in zone 5, but is full of acid
in zone 4 is a handle to drain acid
But zone 4 needs a key to enter
in zone 2 you find a key to zone 4

:)

Offline Xerra

  • Hero Member
  • *****
  • Posts: 767
    • Retro Evolved
Re: 3d (monster) Maze
« Reply #11 on: November 02, 2019, 06:46:39 PM »
All this chat about mazes reminds me of the the "Hunt the Wumpus" simple grid maze game that I posted the source into the old forums a few years back. I wrote that bugger with a stinking hangover as well as it was new years day, I think :) That used a data structure that was a grid with different numbers indicating what kind of hazard was in it. Just didn't have the ability to put a 3d maze graphic system into it. Not sure if I could do it now with gamemaker, hmmmmmm......

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1024
Re: 3d (monster) Maze
« Reply #12 on: November 02, 2019, 08:25:26 PM »
zones can be defined in different ways : cells of a grid or other shape (made of flat triangles), and useful not only to uptade / render only some entities, but also for gameplay (keys and locks/doors or triggers and events), i am aware :)

there can be all kinds of zones : youtube.com/watch?v=C2VfmhAlTO8  :))
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1413
Re: 3d (monster) Maze
« Reply #13 on: November 07, 2019, 08:35:12 AM »


More or less done. There are monsters and some other stuff. The green diamond above is a monster!

What I have found is that using 2d to represent 3d is not a brilliant idea, but is great to learn general concepts.
The 2d top down map view, could become it's own game

doors and zones makes things complex for no reason, so they were removed

Will be interesting to see about doing a 3d conversion. possibly Faux to begin with

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1024
Re: 3d (monster) Maze
« Reply #14 on: November 07, 2019, 05:18:20 PM »
Quote
using 2d to represent 3d is not a brilliant idea
no need to reivent the wheel ? :P


Quote
doors and zones makes things complex for no reason
not really... but ok


Quote
Will be interesting to see about doing a 3d conversion
curious to see.
maybe go for a graphics style similar to this :
store.steampowered.com/app/249630/Delver/
(seeing how you already know how to make such "animated images")
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0