November 17, 2019, 11:08:39 AM

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

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1392
Re: 3d (monster) Maze
« Reply #30 on: November 13, 2019, 08:25:02 AM »
Excellent - looks like i'm on to something :)

Next up is dealing with FOV and only showing what can be seen. I can then begin culling the 3d models as needed. that way I can have big levels...

well step 1 - what's in the fov triangle wasn't too bad:


Just need to do a recursive check through the visible fov positions next

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1392
Re: 3d (monster) Maze
« Reply #31 on: November 13, 2019, 12:14:14 PM »
it took a bit of wierdness with checking floats to int and making sure that a .5 and above would be rounded up (and not down).
But in the end the recursive routine starts from your position, and works it's way around the field of view and outputs the correct result - even taking into account doors that can be opened:


You can see on the minimap the dark red squares are the active field of view. The bright red squares is the current visible cells. the door is shut, so no further cells are added.

Final stage will be to take the bright red output, feed it into a list, and render the contents of the list - nice and simple process :)


Offline Derron

  • Hero Member
  • *****
  • Posts: 2580
Re: 3d (monster) Maze
« Reply #32 on: November 13, 2019, 12:16:59 PM »
> it took a bit of wierdness with checking floats to int and making sure that a .5 and above would be rounded up (and not down).

local rounded:int = int(floatValue + 0.5)
2 = int(2.4 + 0.5)
2 = int(1.5 + 0.5)
1 = int(1.4 + 0.5)


bye
Ron

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1392
Re: 3d (monster) Maze
« Reply #33 on: November 13, 2019, 12:28:36 PM »
Even simpler - thanks Derron :)

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1392
Re: 3d (monster) Maze
« Reply #34 on: November 14, 2019, 07:27:27 AM »
ok, next step is to introduce objects into the map - these are static things that will need movement checking, etc.

But for now, this is the first revision of a 'hold' with a barrel. There is only the light from the door.
Because there are no walls, you can also see that the 3d objects behind the door are no visible and being properly culled  8)

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1392
Re: 3d (monster) Maze
« Reply #35 on: November 15, 2019, 07:14:20 AM »
and now with some walls and lights and crates - The Hold!


And here we are crouching behind some crates and looking up at the Hold ceiling showing details that might be missed. My thought is to have some form of mist coming from the overhead vents?


I like the way the lighting is subdued - it's actually a warm yellow, but the light fixtures have a nice glow to them :)

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1011
Re: 3d (monster) Maze
« Reply #36 on: November 15, 2019, 07:09:48 PM »
so, is this "emissive lighting" (with a shader) or just fullbright surfaces ?
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: 1392
Re: 3d (monster) Maze
« Reply #37 on: November 15, 2019, 08:03:50 PM »
Neither, it’s a variation of light propagation.