You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
This guide is intended for Java (and sometimes JSON) mods. If you are using JS, please don't - I very rarely use JS myself, and I can't give accurate instructions for porting.
Before you do anything, read the old v7 porting guide and make sure you have no deprecation warnings in your mod, because everything that was deprecated then has since been removed. I will not be covering deprecated API here.
How do I depend on the Erekir branch from JITPack or from Gradle?
Currently, Mindustry runs building logic at the same rate as the game updates. If your game is running at 1000 FPS, blocks update 1000 times a second. If you're running at 60 FPS, they update 60 times, etc.
In order to compensate for the vast range of potential FPS values, blocks currently use delta time - the time between updates (frames in this case) - to scale values.
For example, a conveyor must move items a certain distance each update. In theory, multiplying this movement distance by the delta time means that items move at the same (real world) speed, regardless of whether you are doing 1 or 100 updates a second.
The issue with this approach is that using delta time is not accurate. Updating a block twice at 60 FPS (1x delta) often gives different results than updating the same block once at 30 FPS (2x delta). There are many examples of this kind of behavior across different blocks, and it's impossible to complete eliminate usi