This was the most performance-heavy project I worked on. Most of the work was under the hood, on top of some light polish such as camera shake, SFX, and score text.

First, the game had to become an endless runner, which the template was not. It had levels of around 10 obstacles each. I extracted those obstacles as prefabs, processed them so they could be placed evenly along the path, and baked data into them so they could be pooled while keeping their color schemes and varied shapes.

The second problem was performance. There were a lot of objects to render, and every one of them was a rigidbody. That was fine for the original native app, but far too heavy for our WebGL environment.

I upgraded the render pipeline and profiled the game to find the bottlenecks. The biggest ones were draw calls, so I set up GPU instancing and batching to cut them down. On top of that, I optimized the physics. In the end the game ran smoothly inside the app, even on mid-range phones.