Skip to content
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

Update tree data and asset handeling #8295

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from

Conversation

Regisle
Copy link
Member

@Regisle Regisle commented Sep 10, 2024

"minor" rework to how we handle and store tree data and assets

The 4 main goals with this are to

  1. make the file structure less cluttered (this isnt entirely achieved with the folder src\TreeData\assets\non_sprite still having alot of loose files, this can be cleaned up more if desired)
  2. dedupe alot of files, this takes the file size for treeData from 258 MB to 142 MB, this is likely something that would continue being a bigger and bigger problem and this helps with that
  3. improve caching and loading of trees, this does slow down the initial load by a tiny amount, but gives over 50x as big a speedup to loading any other trees which arnt the latest tree (mostly helpful for things like ruthless or looking at old builds), this also makes it easier to reduce loading on headless by separating alot of the asset / spritesheet logic out, but likely requires them to fix issues
    There are many other changes that could improve this more, eg not having to redo spritesheets which are duplicates across multiple tree versions, but I have decided to limit the scope of this a bit to make it easier to merge
  4. make it easier to add new trees, this adds logic for moving and renaming of assets, making it easier to just dump the full zip file from GGG every league and more easily have it figure out correct asset files, this could still use some improvements

I have a followup PR which moves most of the logic over to use spritesheets (that were introduced in 3.19), but again I have decided to limit the scope of this a bit to make it easier to merge, and will open that PR once this is merged

@Paliak Paliak added enhancement New feature, calculation, or mod technical Hidden from release notes labels Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, calculation, or mod technical Hidden from release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants