Skip to content
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

Replace spritesheet assets with ref based appearance renders #6

Open
LemonInTheDark opened this issue Dec 2, 2022 · 4 comments
Open
Labels
Needs 515 All of our problems would be solved if we just remade byond in rust

Comments

@LemonInTheDark
Copy link
Member

Asset loading is damn slow, even with the delaying we do. Delaying is dumb as heck too.

Estimated Cost

6 seconds

Solution

New with 515 we gain the ability to pass references into html, and have the html render it for us "client side"
We can't make a change taking advantage of this until 515 is the default, but when it is we could add support for this feature to tgui, and start replacing our uses of spritesheets with appearances.

This would work for small things like "show me this fish", and even larger ones like the antagonist buttons, since an appearance can be transformed, filtered, colored, etc.

@LemonInTheDark LemonInTheDark added the Needs 515 All of our problems would be solved if we just remade byond in rust label Dec 2, 2022
@Tastyfish
Copy link

I wonder if the ref based appearances will make the alt+click turf stat panel tab thing work half decently.

@LemonInTheDark
Copy link
Member Author

they would help yeah. maybe we could use entered/exited to update it alongside the refresh too

@LemonInTheDark
Copy link
Member Author

Ok so the idea does work (still need to figure out cropping cause we need that for spritesheets)
It requires having the client render everything onto an html window tho, which is a bit annoying. workable, but annoying.
The window needs to remain in scope, and get fed via a browse() to work here, which is why we can't just pass refs along via ui_data.

I need to build a system to preload, request and generate these icons (preferably clientside if that's possible) so clients don't get choked to death when they open like, the preferences menu.
We'll see how things work out.

@MrMelbert
Copy link

This is very feasible now, since we've got a full system to do generic icons, thank to anturk and jlsnow. Loadout menu and loot panel use it.

Off the top of my head the crafting menu, prefs menu, and RND / lathe menus could benefit greatly greatly from this. It's also super easy to do, all you have to do is pass dmi and icon_state via ui_data.

Only downside is that it requires an up-to-date-ish client version but that's a skill issue on the player's part

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs 515 All of our problems would be solved if we just remade byond in rust
Projects
Status: Todo
Development

No branches or pull requests

3 participants