Optimizing for many Soldiers
One thing that affects performance a lot is moving soldiers around and playing the movement animations. Imagine each soldier has a skeleton with many bones and each of these bones needs to be updated every frame. This works fine if you you have a few soldiers in your map, but with many soldiers this starts to use a lot of CPU and causes serious performance issues.
One way I've already optimized this is by playing the movement animation at a slower frame rate when the soldiers aren't in view, are far away or with many soldiers on screen at the same time. I couldn't just turn off the animation, because it was needed to update the collision of the body parts. The collision is needed so bots can shoot at each other and know if they hit.
I've now added a new optimization that now turns off collision and animation on the skeletal mesh if it is not in view. Instead soldiers will use simplified collision capsules with no animation to shoot at each other. This will only affect battles between bots going on somewhere the player isn't looking. Once the player is looking at a bot then the complex skeletal mesh collision and animation is used again. So in theory this should improve performance a lot and not impact the player experience.
Get Longest Front
Longest Front
Realistic WW2 shooter with bots.
Status | In development |
Author | DesertFox |
Genre | Shooter |
Tags | Co-op, First-Person, FPS, pve, Singleplayer, Unreal Engine, World War II, ww2 |
Languages | English |
More posts
- Bot Improvements - Cover System, State Trees and Flanking9 days ago
- Procedural Villages28 days ago
- MetaTailor46 days ago
- New Base Game Mode57 days ago
- Investigating Random Missions and Base Map91 days ago
- Damage & Penetration Mechanics + New German UniformJan 31, 2025
- Improvements thanks to user feedbackJan 18, 2025
- Buildable Soldier Improvements and BugfixesJan 10, 2025
- Buildable Soldiers are back and improved!Jan 03, 2025
- Christmas Update: MG-42Dec 24, 2024
Leave a comment
Log in with itch.io to leave a comment.