R28 seasonal cycle no cache#46
Open
instafluff0 wants to merge 2 commits into
Open
Conversation
Contributor
Author
|
As an aside, I have a branch (instafluff-current) which includes my PRs with the main repo merged, for testing and fun. I also had time to finally put my long-intended scenario together, which is basically the standard game, but with districts, tile animations, seasons, some additions to the modern tech tree & units (adds silicon wafers & other resources, AGI as a tech & Wonder, autonomous drones, space elevator etc.) and some extra wonders added in for flavor:
Anyway I'm somewhat amazed that it all works and came together - and so much of this is thanks to you. I've got to say it feels like a whole different game. I know I've said it before and we still have a couple PRs to get through, but seriously, thanks. |
This file contains hidden or 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
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.



As discussed, here is the no-cache version of seasonal + day-night cycle, mostly Codex on this one.
I've tested with all varieties of settings, including going to main menu and starting new games or loading saves, etc.
One other thing to mention: after the initial pass, I observed mem usage going up ~20MB per turn when
every-turnwas true for either cycle. After poking around Ghidra, it turns out that adding the line:in
read_in_dir()is critical, as otherwise we would have had a major memory leak. Looking at this more deeply, I think we actually had this before as well, it just wasn't apparent because (1) loading of images was generally a 1-time thing and (2) we knew those images took a lot of memory, so this additional unnecessary usage was not apparent. It became obvious though when we stopped caching.Anecdotally, that background processing I mentioned after closing the game? Seems to be gone, or at least ends very quickly, after adding this.