Optimize the Spire 预览图

杀戮尖塔 (Slay the Spire)

Optimize the Spire

模组简介

Essentially, this mod's goal is to make Slay the Spire run smoother when you're running it with mods. These changes affect vanilla spire as well, but their effect will be negligible in that case For that, I've implemented a few somewhat invasive changes, which I'll explain below. These changes don't affect RAM usage, so if you're having problems because of that, this mod will do nothing for you. The (currently) newly released RAM Saver mod can help you with that! https://steamcommunity.com/sharedfiles/filedetails/?id=3002563327 Boring techinical stuff: 1) I've optimized hasRelic and getRelic to be O(1) from the theoretical worst-case of O(n). I did this by creating a hashmap that stores information on which relics are where in the relics arraylist and making those methods use the hasmap to skip list iteration. In practice, this change has saved me 3 billion unneeded list-iterations during a heavily modded playthrough. The majority of which happen when booting up the game. 2) A more noticeable change, is that I intercept the standard, non-essential loggers and skip their outputs. Crash information is retained and this can be toggled in the mod config menu. Printing to the console is a very wasteful process, skipping most of the bloat makes things like starting a new run or the game smoother and on lower-end PCs, maybe even the combat. However, my approach isn't perfect, using sysout or registering your logger in a non-standard way will circumvent this measure but the majority is enough in this case. 3) When looking at the master deck and using the sort function, the game orders the cards every frame (30-60 times a second). I've changed this so that it only sorts the cards when needed. In practice, this change will most likely never matter unless you're running a 1000+ card deck but every little bit helps. 4) If you look at upgraded cards in the compendium, all the cards you're seeing are duplicated and their copies upgraded every frame. Instead I save all the upgraded variants whenever they become relevant and make the compendium just render those instead. I also clean the Hashmap i store them in so that there's no unneccessary RAM usage going on. This change may actually be quite impactful for people with issues in the compendium. 5) Filtering of unloaded characters for the run history save loading. When opening the run history the game normally goes through all your save files one by one and checks whether it can load them. This is very wasteful as it's possible to check the folder names against the currently available characters. In practice this change makes a very noticeable difference if you have a lot of run history with modded characters you don't have active. It completely removes the lag when opening my run history when I only have a few characters loaded. It's debatable how much these changes help, but it doesn't hurt to give it a try.

条目信息

所属游戏
杀戮尖塔 (Slay the Spire)
创意工坊 ID
2454279569
文件名
2454279569.bin
文件大小
38.4 KB
最后更新
2025/02/06
内容版本
v1738842440-986a262182454be6
作者与来源
由原作者发布于 Steam 创意工坊。本站不改变署名,作者信息与原始内容请以 Steam 原始页面 为准。

版权与举报

本条目的著作权归其原作者所有。尖塔补给站仅提供索引与下载中转,不存储、不修改、不二次分发其著作权内容, 也不对其内容作任何担保。详见 版权声明免责声明

若你是该内容的权利人并希望下架此条目,或发现该条目含有违法违规内容,请通过 侵权删除申请 提交材料,我们会在核实后处理并在本页标注状态。

Steam 社区评论

以下评论来自 Steam 创意工坊原始页面,由 Steam 用户发表,不代表本站立场。