props, optimization, and animation

As the level stretches out to last a minute or two before the first boss it becomes increasingly apparent that there needs to be variety. The creation of the level functionally is as simple as laying out a path for the character to follow and occupying it with enemies, so the time consuming part is filling it with details and making it convincingly fit the theme. This involves adding props, and lots of them. Fences, crates, and carts can be used functionally as obstacles and limits to the playable area, while tombstones, bushes, different types of trees, and farm equipment can be spread about as details. Ideally no area of the level would look like another.

vcxgqwa

This leads into the optimization part. Well, graphics optimization with a game this simple is mostly theoretical, but there’s a convenience factor as well. Unity, and pretty much any engine will have a draw call for every instance of a material. One object with multiple materials will have multiple draw calls, and multiple objects with the same material will have their own draw calls each. Having a high number of draw calls is one of the easiest ways to tank performance. As the level starts having hundreds of individual objects it makes sense to have a trade off: merge objects of the material together. When unity treats them as parts of a single mesh it only requires one draw call. The disadvantage to performance is that the entire object is constantly present off-screen when it would otherwise be culled, however in this case it’s far faster to let the hardware deal with the extra geometry. The other disadvantage is that it’s a very final step since it makes the level totally inflexible. As the design nears completion though it isn’t significant. The biggest advantage overall is significantly cleaning up the hierarchy of countless background elements that are totally static.

Other than all that I’ve also been animating one of our enemies, as well as a couple fire effects. Everything in our game uses animation drawn frame by frame, as a stylistic thing. The concept document said the plan was to be “anime inspired cartoony”, and the drawn animation is the part we’ve most kept from that. Below is every other frame of a walk cycle.

untitled

About Anders Taylor

2016 Graphics