This PR adds the following performance improvements with minimal simulation changes
Max interaction radius
This is the maximum range a mob can interact. This includes reaches, hitboxes, and radius/rectangle dimensions. If the distance between a mob is greater than this, we skip all calculations between these mobs.
Pathing
Now uses A* instead of dijkstra. This will most likely need to be re implemented due to recent pathing changes
Edge Rendering
Edge shadows are now individually checked if they are on screen, and culled when not. If a sector's bounding box is fully on screen, this step is skipped. Furthermore, these calculations are now reused to update multiple edge buffers.
Mob collision broad search
The "all" mob list is now sorted by minimum interaction position. Mobs are now grouped into regions based on their interaction radius, and interactions are only processed between regions.
Simulation changes
Mobs now tick depending on their minimum interaction x position, rather than spawned order.
All mobs are ticked before any interactions are processed. This should negate the changed tick order, but that has not been tested.
Performance Gains
All measurements are taken from a release build on the latest commits, and are recorded upon entering the area.
Specs: i7-9700k @ 4.4 GHz GTX 1060 6GB, 32GB RAM @ 2400MHz
This PR adds the following performance improvements with minimal simulation changes
Simulation changes
Performance Gains All measurements are taken from a release build on the latest commits, and are recorded upon entering the area. Specs: i7-9700k @ 4.4 GHz GTX 1060 6GB, 32GB RAM @ 2400MHz
D.E.V. Lab Master: 99 - 103 FPS Performance Branch: 240 - 250 FPS
Playful Yard Master: 180 - 200 FPS Performance Branch: 290 - 320 FPS
Crash Landing Master: 220 - 240 FPS Performance Branch: 300 - 330 FPS
Cryptic Atrium Master: 150 - 165 FPS Performance Branch: 205 - 220 FPS
Verdant Agrids (https://discord.com/channels/459094367425134593/1156405792547807244): Master: 20-22 Fps Performance Branch: 71- 75 FPS