-
-
Notifications
You must be signed in to change notification settings - Fork 685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rust-g IconForge: Lightning fast spritesheet generation #10404
Conversation
Do not remove the TM without notifying me first |
Currently on the global player panel antag icons are broken, same for orbit menu it seems |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was on for long enough that it seems to be functioning fine and code quality seems good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still a bit unsure about this being persistent for dev environments, but meh. If it helps, it helps. If not, so be it.
Funny man says press the button so I'm pressing the button |
…0404) * Initial testing * Rustg icon generator * this thing.. fast.... * Fix * Finish porting spritesheets and add GAGS support * Remove 'moving' attribute * Refactor the DM component * Update rustg DM and add cleanup call * vendor_icon_preview -> icon_state_preview * Revert tracy change * Re-add GAGS to design spritesheet * Fix crafting spritesheet size * Correct webroot args * Adds caching * Reset rustg * Move cleanup step where it belongs * Add crosscompiled rustg dll * Log cache invalidations * Fix player panel and orbit spritesheets * Fix reading legacy sheets from cache * Enables local caching of legacy assets, adds Regenerate Asset Cache debug verb * Fix universal_icon creation being slow * Protect against cache deletion * Fix hand icons not displaying properly * Remove this very incorrect assumption * Restore rust_g to master * Update defs * Add rustg version checker to smart cache * Move legacy cache to data/spritesheets so it persists on prod * Update config comment to match * Copy all icons so CI works * Try fix CI again * Fix chat and designs not displaying properly when loaded from cache * Fix mistake * Fix double encoding * Inline uni_icon, saving unnecessary proc-call overhead * Create a unit test for the smart cache
* Update rust-g and fix spritesheet icon cache problem * Convert design_icons to spritesheet, from 1618 images to 8 * Update rust-g in the CI as well * Push ci suite to ubuntu 22.04 so that rust-g stops complaining * Update libssl too... oh jeez. * Fix PyYaml * Include rust-g in repo for CI * Stop CRASHing whenever the asset cache encounters a bad entry, it guarantees everything else will break * A whole bunch of bullshit to make IconForge work Ports BeeStation/BeeStation-Hornet#10404 * whoops this should be in the example config
* Update rust-g, use spritesheet asset for design icons (#5315) * Update rust-g and fix spritesheet icon cache problem * Convert design_icons to spritesheet, from 1618 images to 8 * Update rust-g in the CI as well * Push ci suite to ubuntu 22.04 so that rust-g stops complaining * Update libssl too... oh jeez. * Fix PyYaml * Include rust-g in repo for CI * Stop CRASHing whenever the asset cache encounters a bad entry, it guarantees everything else will break * A whole bunch of bullshit to make IconForge work Ports BeeStation/BeeStation-Hornet#10404 * whoops this should be in the example config * Makes the close button on votes actually close the window (#5383) * oversight * Update vote.dm * Favor Title Correction (#5385) This has like, no gameplay impact whatsoever. Both ammo boxes are the same, lackluster price, but just had their names swapped around (A single number.) The game is now playable. * fixes missing/mislabled borg icons (#5391) * [balance] New burn-wound medicine (#5353) Adds a new chem for use in treating internal burns/necrosis. Created by mixing carbon, sulfuric acid and dermaline. Painful to use, but at least it doesn't require surgery. Trypsin can also be used to treat "permanent" scars but only via overdose- which will cause steady brute wounds similar to kyphotorin(and even more pain). This chem is partly an experiment in chem effect numbers that aren't flat values, but are determined by dose(a number that steadily goes up as you metabolize a reagent.) * saving xenobotany from itself (#5328) * saving xenobotany from itself - adds low-grade antitoxin chem, which heals tox like dylo but slower - adds monocaridine chem, which heals brute like bicard but slower - adds moon water chem, which heals burn like kelo but slower - adds moon tear plant, which has moon water. It mutates into sun tear. - adds space alocasia, which has monocaridine and low grade antitoxin. It mutates into mercy's hand - changed poppies to contain Monocaridine and space drugs instead of its previous reagents - changed ambrosia vulgaris to contain just monocaridine instead of kelotane and bicaridine - changed potatoes to mutate into blood root - Moon Tear added to seed vendors - Space Alocasia added to seed vendors - Blood root, Mercy's hand, and Sun tear removed from garden Seedmaster. * fix seed values Makes the new seeds & plants properly show * updates new stuff * brighten alocacia leaves --------- Co-authored-by: Trilbyspaceclone <[email protected]> * Remaps the engine chamber to allow for larger engines (#5331) * Remaps the engine chamber to allow for larger engines * Moves things where they won't be blocked * Adds camera * [Removal] Removes partial understanding on monkey for common and for common on monkey (#5335) * Removes another ancient reference to a gamemode that does not even exist anymore * Update monkey.dm * Integration bricking itself again one sec * Integration check * Troopers no longer have the option of the lascore (#5338) See title. the lascore was a cool gun that i was happy to give to the shield but it seems like it outshines most other options. Sgt/Corpsman may still select this option. * [balance] Contaminiated items respect bio_armor now (#5396) * Update life.dm * Update life.dm * is_worn() * it compiles faster on git * Ditch abiotic checks in scanner/cryo cell, make cryo eject dropped items (#5398) * note boards for bulk selling (#5397) * note boards for bulk selling * clearer instuctions * TEFs changes to xenobio/slimegun (#5394) * Second sanity check for Mechiver eating mechs (#5401) * mechivers no longer at mechs * second sanity check * Allows the church to make bioreactors from scratch (#5407) * Allows the church to make bioreactor from scratch Tiny fix for a big issue. Corrects a small pathing mistake in the manifest litany. Allowing church to create bioreactors from scratch. Removes the bioreactor tank manifest blueprint to avoid confusion. The tank platform makes it all on on its own. Pleases the machine god. * Update construction.dm fixes it for reals * Fix people spawning in spess by making them always spawn close to where they should before using put_mob (#5402) * More QOL for borgs and minor AI bugfix (#5388) it never ends * Xenohydro relayed out! (#5370) * Xenohydro relayed out! * apc * single new light * rather annoying fixes (#5373) * SLTs and sensors (#5392) * cold assets (#5390) * rounding (#5389) * Pouch "rebalance" (#5384) * modular pouches * sanity, better numbers and less exploits * large pouch tweaks * grammar * tweaked scaling * ear and large pouch * optimization * make tape not stick storage * small pouch nerf * Update tape.dm * Update code/game/objects/items/weapons/storage/pouches.dm * TGUI Guild Part 3 (#5376) * TGUI Guild P3: TEG ![teg preview](https://i.tigercat2000.net/2024/05/output.gif) * TGUI Guild Part 3: Omni Devices (Filter/Mixer) * TGUI Guild Part 3: Air Monitoring Computer * TGUI Guild Part 3: Canisters * TGUI Guild Part 3: Gas Freezer/Heater * TGUI Guild Part 3: Portable Scrubber/Pump * TGUI Guild Part 3: Update FA for those sweet virus icons * TGUI Guild Part 3: Suit Storage Unit * TGUI Guild Part 3: ID Cards * TGUI Guild Part 3: Fix lathe queue icons, custom vending machines losing items * TGUI Guild Part 3: AI/Admin Airlock Controls * Fix the AI hotkeys for doors * Add a bunch of log_debugs to the new spawning code to try and nail down a problem (#5408) * Revert "Add a bunch of log_debugs to the new spawning code to try and nail do…" (#5411) This reverts commit 35b908e. * Adds armbands to Marshal and Blackshield wardrobes (#5413) * Revert "Fix people spawning in spess by making them always spawn close to whe…" (#5415) This reverts commit 49c3965. * KILL EM (#5418) * Fluff Item: TheEternalFlame's Duster --------- Co-authored-by: Dissent <[email protected]> Co-authored-by: WilsonWeave <[email protected]> Co-authored-by: Trilbyspaceclone <[email protected]> Co-authored-by: CDB <[email protected]> Co-authored-by: Hex <[email protected]> Co-authored-by: Spock <[email protected]> Co-authored-by: IrkallaEpsilon <[email protected]> Co-authored-by: Dimasw99 <[email protected]> Co-authored-by: benj8560 <[email protected]> Co-authored-by: WatermelonsEverywhere <[email protected]>
About The Pull Request
Implements IconForge, from tgstation/rust-g#160
Requires #10408
IconForge is a speedier version of the existing spritesheet generator with smart caching, allowing it to be cached on local and in development. It's overall faster in every way, and avoids blocking the main thread whereever possible.
Adds the universal_icon framework, designed to imitate icon(), but for exporting to rustg. It also supports GAGS conversion to universal icons!
Also lightly optimizes legacy spritesheets in a few ways
Why It's Good For The Game
Lower init times, better development experience, less server compute time, less lag post-roundstart during asset generation.
Testing Photographs and Procedure
Screenshots&Videos
Overall performance
![image](https://private-user-images.githubusercontent.com/10366817/292943690-75aa574b-37d1-44d8-997f-3f195a6e11d5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMzg2NzYsIm5iZiI6MTczOTEzODM3NiwicGF0aCI6Ii8xMDM2NjgxNy8yOTI5NDM2OTAtNzVhYTU3NGItMzdkMS00NGQ4LTk5N2YtM2YxOTVhNmUxMWQ1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDIxNTkzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTkxYzUyZmM4MWE2MmZkYzlmYWRkYmYxNDE4NTk0YjBiMGJkMzMzYTMzODc4ODEzNDU2ZjY1NWE4MGE2YTM0MzQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.I9Bfexf3hIVtUSuo8l7e3WRTlHHrcATie3oeeVPkTVc)
Cache validation cost
![image](https://private-user-images.githubusercontent.com/10366817/292943678-8b2dcc66-5db3-4ad1-8a3c-803679f10e08.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMzg2NzYsIm5iZiI6MTczOTEzODM3NiwicGF0aCI6Ii8xMDM2NjgxNy8yOTI5NDM2NzgtOGIyZGNjNjYtNWRiMy00YWQxLThhM2MtODAzNjc5ZjEwZTA4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDIxNTkzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMyNTNiMTdkZDljNDc3ZjYwYjcwODQ5ZDczZWQ5Zjc1NTUxNDU2MTk2NjQyZmI4ZjZhMDNjMmM4OWI2NDFkMzEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.W6bcQ1aXLnOasg4R3VRGuEJhA0tZs_NuZw_SFoHBZ-o)
Local cache invalidated:
![image](https://private-user-images.githubusercontent.com/10366817/292943452-2f6661d1-df22-41d3-9309-f68554b0e98c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMzg2NzYsIm5iZiI6MTczOTEzODM3NiwicGF0aCI6Ii8xMDM2NjgxNy8yOTI5NDM0NTItMmY2NjYxZDEtZGYyMi00MWQzLTkzMDktZjY4NTU0YjBlOThjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDIxNTkzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQxMDJlY2Y1N2MyNjE1M2E0YTIxYzgxZWExY2E1ZDJhMzMwYWFlZjhiMzdiMzllOWFlOGNkNTJhNTBhNWUwZTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.CFhTT4imxVl8FmpCk4Zfns1hrdFSm_heuRw0AbHA040)
Changelog
🆑
refactor: Optimized asset generation greatly using rustg IconForge (also by itsmeow), greatly reducing post-initialization lag as well as reducing init times and saving server computation.
config: Added 'smart' asset caching, for batched rustg IconForge spritesheets. It is persistent and suitable for use on local, with automatic invalidation.
config: Enabled legacy asset caching for the two remaining spritesheets during local development.
add: Added Debug -> Regenerate Asset Cache verb for legacy spritesheets.
tweak: Replaced many uses of the slow md5asfile() function with rust-g based MD5.
code: Cleaned up the duplicate function vars vendor_icon_preview and icon_state_preview, removing vendor_icon_preview and moving icon_state_preview to /obj/item.
fix: Fixed some preferences icons cropping to incorrect scales.
server: The legacy spritesheet cache will no longer be cleared by TGS redeployments, instead the regenerate verb should be used, or delete the files from data/spritesheets/legacy_cache.
/:cl: