Friday 11 January 2013

Level Design using Beziers


LevelHelper is also used for Tank Rampage’s level design. Whilst this is a fairly straightforward visual process, we did encounter some issues when designing our level.


                Our terrain used to be made up of one very large Bezier curve. This Bezier curve acts as a static Box2D body, and has a texture attached to it. However, when tested, this turned out to be very slow, as framerates dropped below 20 FPS.
                We decided to copy the Bezier curve and give one copy a physical shape but no texture, and give the other one a texture but no physical shape. This allowed us to obtain not only a higher polygon count, but also a much higher framerate.
                The reason this works is because in order for a Bezier to have a texture attached to it, it needs to be a tile shaped Bezier. Tile shaped Beziers are, as a physical shape, much more processor intensive than a normal Bezier line Tile shaped Beziers without physics are also much easier processed.

No comments:

Post a Comment