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
Secondary Skin file format #2271
Comments
I see a few problems there: the content of the jsons is bigger and can't be implemented into a single png file easily. For example default colors, or using skin parts from other skins |
Good idea. How about omitting any skin part you want? it would maybe create bigger files, but would make this format more customizable. problem could be the names of the skin parts maybe? |
Teeworlds could add an option to export and import skins (in zip format). |
The idea here is to only share skin parts. If one would also want to share a skin combination with it, they would have to share a .json. We actually could make a default one, with the first line of each part (but it would be "white").
Growing from top to bottom (like a table) is the idea, yes. I'm not sure how omitting specific columns would translate in file size, but we could certainly test it. |
Sounds great
Indeed, auto-creating a skin with the first line of the file would make sharing skins as simple as in 0.6 :) |
Well, that's not a simple task, every skin part has to provide a name so other players can see/use them. |
e.g export zip <.< |
If the image name is, let's say oy.png as an example, each part could be named oy_body1.png, oy_body2.png, oy_eyes1.png, etc. Now if you mean that a specific part could be at a different location (and thus get a different name), but is the same as another part elsewhere, we had that problem before as well. Same skins with different names. We could alleviate this issue by generating a hash from the part's pixel data, and name it that.
This is an orthogonal direction I think. We would have to make a skin editor, which would only add steps to skin creation. It would help with skin sharing though, I agree on that.
We would need to add a zip library dependency then, do you have one in mind? |
Teeworlds already has a zlib dependency |
KISS; plenty of people already have no idea how to deal with a .json, or even figure that it is a text file. I don't even think we need several rows. You can even design that in the 0.6 format. It's not a big deal if there is some transparent space, 0.6 skins had a ton of redundancy (repeat default parts) and they were still tiny in size compared to the rest of the Teeworlds assets. |
There already is a skin editor and you can save the skin you built. That will create the JSON file. Nobody has to create/edit some file by hand. Should be possible to automatically add/include the non-standard skin parts to make it as simple as possible for the user. |
Either way, the current state is not desirable and limits greatly user content. I am not sure what is the best course of action, but I strongly believe something should be done to ease the creation and sharing of skins. There is a loss of flexibility (naming schemes, attached colours) in @LordSk's proposed new format indeed, though standard skins would still be able to use the current, advanced skin format. I'd like to see any other proposal. |
Well, options are: to convert the non standard skin part image data to base64 and include it in the JSON file. So a user who lacks that part could use that one. |
2276: Fix segmentation fault when creating sql tables failed r=heinrich5991 a=Zwelf `GameServer()->OnShutdown(true);` (which would wait on running threads to exit) wasn't called if an error occured in the server init. Therefore `CServer` was freed before the init-thread finished executing, causing a use after free from `CSqlConnector::ms_ppSqlReadServers` pointing to `CServer->m_apSqlReadServers`. Fixes teeworlds#2271 Note that the server exits when creating tables failed. Since the tables are created by default, it has to be disabled explicitly (e.g. `add_sqlserver r teeworlds record teeworlds PASSWORD "localhost" 3306 0`) if the servers should start even when the database connection fails. Co-authored-by: Zwelf <zwelf@strct.cc>
My roadmap:
RFC! |
0.7 introduced a new skin system, separating each body part to allow deeper customisation by combining them. This was a good decision I think, and most players love it.
The other day, @iTzMeRafa published their new website for sharing teeworlds tee skins, https://teeskins.de. I was excited to download new 0.7 skins, and... There are none. And it feels obvious why. We gained deeper customisation with the new system but lost the ability to quickly share skin files. One has to make and share several pngs and perhaps jsons, whereas before a simple png image would suffice.
I propose we implement a secondary way of loading skin parts, all in one file.
Columns represent the different body parts : body, decoration, marking, eyes, feet, hands, in that exact order. The file can omit columns starting from the end. That way a file can only be composed of body, decoration, marking, for example. And of course each line is an item.
This should be relatively simple to implement, and help with the issue of 0.7 skin sharing.
EDIT:
The text was updated successfully, but these errors were encountered: