Closed itsmeow closed 6 months ago
Also please be nice, this is my first Rust project ever. I know the code is kinda messy.
If you need proof of this thing's pure efficiency, here's a graph comparison on the DM side.
Dependency merged. Finishing up caching stuff. It's a bit of a mess, honestly. I wish this module wasn't so opinionated, but that is why it's optional.
This PR is now feature complete.
This is only failing build because rust added a new lint that affects the hash module.
OpenDream hast mislead my blending again. 😔
I have a branch implementing GAGS into iconforge, although I'd prefer it to be part of another PR. Should I just push it here or wait for merge? It's just one commit atm.
@ZeWaka is there a reason this isn't merge yet
@ZeWaka is there a reason this isn't merge yet
Waiting on me to do a final review early this week per my comment yesterday in tooling questions
i would update the build fails but you are cringe and don't let me push to your branch
sorries
Cannot wait for an implementation of this, please @ me with the PR when its done.
Cannot wait for an implementation of this, please @ me with the PR when its done.
On TG? I've already implemented it on Bee, the PRs are mentioned above.
One more relevant PR if anyone was going to port btw: https://github.com/BeeStation/BeeStation-Hornet/pull/10649
Adds IconForge, a new module for building asset spritesheets.
It's over 10x faster than BYOND in some cases. This module just takes a JSON input and spits out a spritesheet to a path, so it's up to the DM side to actually use it correctly, but I've tested it with a branch on Bee: https://github.com/itsmeowForks/BeeStation-Hornet/tree/asset-rustg
It is quite fast.
I've also added a panic handler to the core rustg module, since this module is..
prone to panicingNot anymore, but it was useful in testing. This should also help diagnose crashes from within rust-g without needing to take minidumps.In the future I want to add a more advanced caching system to this, but as it is, it's already just a faster replacement for the existing spritesheet generation code in DM, and people are interested, so here it is. The way the JSON input is designed allows you to precisely determine if anything has changed, since it only supports DMI+icon_states and not any BYOND /icons. You can basically just hash everything and compare to get better caching.Also adds a caching validation tool. This hashes all DMIs within the
sprites
object and compares them to a previous one provided by DM. It also provides the hashes as the result of the generate() function when prompted. It is up to DM to do the rest, rustg only provides a fast method for comparing the hashes with parallelism.Cache validation check doesn't cost too much: