3d (monster) Maze

Started by iWasAdam, October 31, 2019, 14:45:05

Previous topic - Next topic

iWasAdam

#30
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

iWasAdam

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

> 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

iWasAdam

Even simpler - thanks Derron :)

iWasAdam

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)

iWasAdam

#35
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 :)

RemiD

so, is this "emissive lighting" (with a shader) or just fullbright surfaces ?

iWasAdam

Neither, it's a variation of light propagation.

iWasAdam

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

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.


Add:
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.

iWasAdam

#40
great read there :)

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  8)

iWasAdam

Here's a quick look showing the tool + your arm and pressing escape brings up the option, map window...

iWasAdam

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

iWasAdam

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

I think this looks really good!