VBGamer |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I need help question #18139 Jack Hoxley (7 replies, 0 views) (2000-Sep-26) hi,
If anyone could give me a hand with any of these questions I'd be most greatful...
1.
Lighting. I'm writing an isometric tile based game using D3D-IM; using TL vertices. Therefore I need to specify a colour for each vertex. I can write a reasonable lighting engine that'd colour a vertex based on it's distance from a [point] light source. What I want to implement is normal-based shading...
Say I have a 3D point for a light, it's colour, range, attenuation etc.
And I have a tile with 4 points defined in 3D space,
How do I work out whether it is facing the light/not facing it and work out how much the lighting needs to be modified in order to be shaded correctly.
Basically I'm trying to emulate the D3D lighting engine in a simple way
2.
Binary file access; I've looked through the help file and gotten quite confused.
Say I have this datatype
Type TileData
X as integer
Y as integer
Texture as string
LightColour(3) as long
End Type
How could I use Binary access to read and write this 40,000 times (a 199x199 array)?
-Done-
Many thanks in advance;
Jack,
|