What I modified
Visually and gameplay-wise, this game did not change much. I only added some small polish effects such as camera shakes, SFX, score text, and similar details.
But this project was maybe the most demanding when it came to performance optimization.
First, the initial project was not an endless runner. It had levels that contained around 10 obstacles each. The first challenge was extracting those obstacles as prefabs, processing them so they could be uniformly placed along the path, and baking some data into them so we could pool the objects later while keeping the color schemes and the general look.
The second problem was performance. There were a lot of objects to render, and they were also all rigidbodies. That worked fine for the template because it was made as a native app, but in WebGL it was not optimized enough.
I upgraded the render pipeline, optimized rendering. Main issue was there was no GPU instancing and no draw call optimizations. After also optimizing physics a little bit, I got the game running at a stable 120 FPS on our mid-range devices.
Gallery