September 29, 2021, 00:13:47

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

• Hero Member
• Posts: 2464
Re: 3d (monster) Maze
« Reply #30 on: November 13, 2019, 08:25:02 »
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
« Last Edit: November 13, 2019, 08:35:21 by iWasAdam »

• Hero Member
• Posts: 2464
Re: 3d (monster) Maze
« Reply #31 on: November 13, 2019, 12:14:14 »
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

Derron

• Hero Member
• Posts: 3653
Re: 3d (monster) Maze
« Reply #32 on: November 13, 2019, 12:16:59 »
> 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

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

• Hero Member
• Posts: 2464
Re: 3d (monster) Maze
« Reply #34 on: November 14, 2019, 07:27:27 »
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

• Hero Member
• Posts: 2464
Re: 3d (monster) Maze
« Reply #35 on: November 15, 2019, 07:14:20 »
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
« Last Edit: November 15, 2019, 14:37:14 by iWasAdam »

RemiD

• Hero Member
• Posts: 1283
Re: 3d (monster) Maze
« Reply #36 on: November 15, 2019, 19:09:48 »
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

• Hero Member
• Posts: 2464
Re: 3d (monster) Maze
« Reply #37 on: November 15, 2019, 20:03:50 »
Neither, itâ€™s a variation of light propagation.

• Hero Member
• Posts: 2464
Re: 3d (monster) Maze
« Reply #38 on: November 17, 2019, 12:30:06 »
First look with some particle stuff going on - lots of recoding to get it to work

and something less subtle with some additional motes

RemiD

• Hero Member
• Posts: 1283
Re: 3d (monster) Maze
« Reply #39 on: November 17, 2019, 13:09:17 »
in blitz3d, smoke / fog, looks better with the blendmode "add" (instead of only considering color+alpha), maybe this can help...
Quote
Alpha:
This blends the pixels according to the Alpha value. This is rougly done to the formula:

Rr = ( An * Rn ) + ( ( 1.0 - An ) * Ro )
Gr = ( An * Gn ) + ( ( 1.0 - An ) * Go )
Br = ( An * Bn ) + ( ( 1.0 - An ) * Bo )

Where R = Red, G = Green, B = Blue, n = new pixel colour values, r = resultant colour values, o = old pixel colour values.

Alpha blending is the default blending mode and is used with most world objects.

Multiply:
This blend mode will darken the underlying pixels. If you think of each RGB value as being on a scale from 0% to 100%, where 0 = 0% and 255 = 100%, the multiply blend mode will multiply the red, green and blue values individually together in order to get the new RGB value, roughly according to:

Rr = ( ( Rn / 255.0 ) * ( Ro / 255.0 ) ) * 255.0
Gr = ( ( Gn / 255.0 ) * ( Go / 255.0 ) ) * 255.0
Br = ( ( Bn / 255.0 ) * ( Bo / 255.0 ) ) * 255.0

The alpha value has no effect with multiplicative blending. Blending a RGB value of 255, 255, 255 will make no difference, while an RGB value of 128, 128, 128 will darken the pixels by a factor of 2 and an RGB value of 0, 0, 0 will completely blacken out the resultant pixels. An RGB value of 0, 255, 255 will remove the red component of the underlying pixel while leaving the other color values
untouched.

Multiply blending is most often used for lightmaps, shadows or anything else that needs to 'darken' the resultant pixels.

Additive blending will add the new color values to the old, roughly according to:

Rr = ( Rn * An ) + Ro
Gr = ( Gn * An ) + Go
Br = ( Bn * An ) + Bo

The resultant RGB values are clipped out at 255, meaning that multiple additive effects can quickly cause visible banding from smooth gradients.

Additive blending is extremely useful for effects such as laser shots and fire.
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

• Hero Member
• Posts: 2464
Re: 3d (monster) Maze
« Reply #40 on: November 18, 2019, 14:35:10 »

Looking down I found some sort of space tool so I picked it up...

it took bugger long time to get that glove sorted too
« Last Edit: November 18, 2019, 14:36:57 by iWasAdam »

• Hero Member
• Posts: 2464
Re: 3d (monster) Maze
« Reply #41 on: November 19, 2019, 14:22:54 »
Here's a quick look showing the tool + your arm and pressing escape brings up the option, map window...

• Hero Member
• Posts: 2464
Re: 3d (monster) Maze
« Reply #42 on: November 20, 2019, 07:21:26 »
just working on the 'dos' part when you lift your arm.
Here's the map view:

You can also see the debug map in the bottom left

• Hero Member
• Posts: 2464
Re: 3d (monster) Maze
« Reply #43 on: November 22, 2019, 08:56:06 »
Got the noise sorted and a new widescreen viewport.
Also now has stable 60fps windowed or fullscreen
As it's a monster maze I thought we needed a monster...
I think inspiration is going to be halflife, alien and the thing!

BasicBoy

• Full Member
• Posts: 169
Re: 3d (monster) Maze
« Reply #44 on: November 22, 2019, 10:14:46 »
I think this looks really good!