Sonic Battle (GBA) Renderer Series - Inverted Walls

Posted on November 25, 2018

Table of Contents


Welcome to the ninth article of the Sonic Battle (GBA) Renderer series.


Intro

The Holy Summit map in Sonic Battle is unlike the others. Instead of containing box-like platforms it has two inset holes in the ground (for lack of better terms).

A typical map

The outlier

When I was studying the renderer it gave me a bit of a scare because it broke my assumption that all maps were roughly the same - that there’s a floor, then walls for small boxes, then another floor to cover the top of the boxes. I feared that it would require custom logic to support.

Inverted normals

Previously we had been looking at boxes from the outside where their wall normals pointed outwards. Now we’re looking “inside” the boxes. So the trick is to invert the normals by placing the walls in the opposite of the usual directions. It doesn’t affect performance either!

Normal normals

Inverted normals

Conclusion

On the surface it looked like Holy Summit was going to require lots of custom logic. But it ended up just being a creative usage of the renderer by the original developers. Hats off to them!



The next article will discuss the 45-degree angle walls which are used in octogonal boxes.

You can subscribe to the mailing list to be notified when a new article appears.