Mobile free-to-play 3d shooter with 25 unique monsters. I also gained a lot of experience in optimization before the project launch.
Features implemented by me:
1) AI: 2 top-level FSMs with Behaviour Trees as states (with reusable subtrees).
* That kind of architecture helped to reuse similar behaviour subtress & implement AI logic simultaneously by multiple developers.
* Started with Behaviour Tree asset from store (NodeCanvas), then after facing performance issues (huge spikes caused by json deserialization of each subgraph), reimplemented own lightweight FSM & BT systems from scratch using Coroutines & ScriptableObjects.
2) Mobile-optimized Ragdolls system. Main idea was to make seamless transition from death animation clip into ragdoll physics. Done by recording positions/rotation during clip & apply velocities on death. The later improvements:
* Splitting animation & ragdoll hierarchies gain huge speed-up (at first it was unclear why Animator updates takes too long in profiler)
* Ragdoll hierarchies updated only on shoot and only for ragdolls inside player's camera frustum.
* When ragdoll physics is turned on it stops animation and moves renderer hierarchy.
* Jitter detection logic added to prevent ragdoll from bloating (rare case but was very disappointing)
* Prevented body from penetration into ground & obstacles done by adding external collider to detect collisions and force switching to ragdoll
* River shader (see screenshot) with flow & smooth shore transition (modified Unity water shader) flow done by UV scrolling, shore transition done by adding vertex colors to river mesh to use them as alpha channel.
4) Other optimizations:
- Replaced Bezier curves for flying creatures by Chaikin corner-cutting algorithm (slightly faster)
- Replacing Mecanim Animators with Legacy Animations also gained speed-up (around 20% boost per monster comparing to Mecanim)