BattleTanks II Beta Release

Miscellaneous Forums/Blitz Showcase/BattleTanks II Beta Release

I noticed that the tanks get darker when you go in the shade.
How did you do that?

There's an array which holds a low-res (256x256) grayscale image of the terrain colormap, which is filled in during loading time (an array is used because it is much faster than reading from textures or images). Then it basically reads the pixel the tank is on (with interpolation, for smooth shade transitions), and colors it accordingly.

Also, I am realy confused about shadows in general.

The tank shadows are simply a alpha-blended textures (basically just a blurry rectangle) which are applied to the terrain by a dynamically deformed mesh to conform to the terrain's contours perfectly.

I also added several optimizations, including culling and frame-skip optimization (with interpolation) to boost speed.

I might release my shadow system for free. It's really easy to set up for your objects (just call ShowShadow(mesh, shadowimage) or HideShadow(mesh) to enable/disable shadows, and call UpdateShadows() before each render)