Page 1 of 1

2D Culling

Posted: Wed Aug 26, 2009 5:27 pm
by Kjell
:idea:

Cheap 2D culling base / approach for 3D games with Camera's that mainly rotate over 1 Axis and Levels that primarily extend over 2 Axes. Extend to your own needs ..

Control using Arrow Keys.

K

Posted: Thu Aug 27, 2009 10:25 am
by diki
thanks! will try to get my head around it :)

Posted: Thu Aug 27, 2009 11:12 am
by Kjell
:!:

Made a small mistake in the provided example.

Code: Select all

if(Index >= 0 && Index < 0.25-Angle)Culling[1,0] = 1;
.. in Camera's OnUpdate ZExpression should be ..

Code: Select all

if(Index >= 0 && Index < Angle)Culling[1,0] = 1;
@diki: For your specific game I'd add add a rule that culls everything more then let's say 4 steps away, unless a block is within 2 steps away over the X axis of the camera when facing east / west .. and over the Y axis ( Z in your game ) when facing north / south.

K