-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance Improvements #51
Open
Helodity
wants to merge
23
commits into
Espyo:master
Choose a base branch
from
Helodity:performance-intrusive
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- This makes their behavior a bit more predictable, and is very slightly more performant.
- This process smoothly (but quickly) fades them out when the game pauses, and back in when it unpauses. - Different mixers were also created for the upcoming volume sliders. - General refactor, mostly distinguishing in-world global sounds from UI global sounds.
- Now, there is a dedicated error manager. - With these changes, error messages shown when an area loads are more helpful. - In addition, errors can now appear mid-game if necessary.
- Thanks WanderingLetterS.
this acts as a crude broad search, preventing some mobs that are very far away from running checks.
Instead of rendering every sector's edges, they are now checked individually
Now uses A* instead of Dijkstra
We now only iterate over the nodes we want to eventually look at, rather than every unchecked node.
Now actually uses a sweep and prune algorithm, rather than always checking mobs that have a smaller x position
1700536
to
d5f62ec
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the following performance improvements with minimal simulation changes
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.
Now uses A* instead of dijkstra. This will most likely need to be re implemented due to recent pathing changes
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.
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
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