R28 seasonal cycle no cache#46
Conversation
|
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. |
|
You're very welcome. It's incredible what you've been able to do and doubly so how quickly you've managed to do it. I'll try to review your last few PRs sooner rather than later. I'm aware that I'm a bit of a ball and chain on your very rapid progress. It's just every time I sit down to look into those PRs, something else comes up, sometimes related to the mod and sometimes real life stuff. |
|
Regarding the PRs, please take your time! Selfishly, given that my dream-features are all working in the branch I mentioned, it's not at all a big deal to me if merging them takes longer. Even later in the summer/fall would be fine. I think it's more important that you get to enjoy it and work on fun features, rather than reviewing PRs all day. |
|
By the way, there's a bug in your patch to |
|
Huh, wow. Sorry for not catching that and getting it backwards. Just a one-line fix, right? Want a separate PR for that, or should I add in here? Or are you already taking care of it? |
|
Yeah, it's a one line fix. I took care of it here: dc26d76 |
…Double allowed num of wonder districts & natural wonders



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.
Edit: I also happened to find that we were hard-coding the resource counts for cycle images, so updated that code to make that dynamic as well. Looks good in testing.