Right now I am working on a tileset editor, since I noticed creating a tileset is something of a large undertaking at the moment. So I decided I wanted to make it easier, as I myself was interested in updateing a tileset, but noticed that doing so was about impossible.
Alpha 0.2 ready.
Version “What do you want for 3 hours of work?”
Plugged my build system into it, so nice packaging and stuff.
Added a placeholder icon for the program, its a lil’ fox I made as an icon for another program of mine.
Added an .exe instead of a .bat for windoze users.
Implemented New and Save As menu functions.
Fixed delete lag, no longer takes 20 seconds to delete a lot of tiles.
Added optimize function to Edit Menu, removes unused tiles, and rearranges them in the TileChooser.
Added stub for “Add missing tiles” function.
I can make it pretty printing easily enough. But the hope is you will never have to edit it by hand.
[quote=“ChunkOfMeat, post:10, topic:5029”]2. I would like to swap “rotates”:XXX, and “id”:“XXX”
I have no direct control over that. I could write a custom encoder for that class, but it seems like a lot of work for little gain.
That’s due to the way the “tileset.txt” is formatted. I could make it ignore the path in the “tileset.txt”, and just use the filename. But that seems like a bad idea. I would want others to weigh in if they want it to do this.
Tileset editing team, and it is difficult to add the changes at once. This was done in a text editor using dif. I do not see the possibility to combine the two options in one tileset with your program. Especially because your program interchanges tiles when saving. Previously, you could easily see the changes, put it on a new tileset mask the previous one. Now it’s impossible. I’m not saying it’s bad. Just need to adapt to this.
I noticed that the records in the file are in the order of checkboxes. Maybe you can transfer checkbox “rotates” right after Fg and Bg and process it in this sequence.
You can rewrite the path in “tileset.txt” in the case of the “Save As”.
What do the the option “Optimize” and “Add missing tiles”?
I suppose I can add a “Merge” function so you can combine multiple tilesets (of the same size), from within the program itself. At first it would just be a simple merge (all the same tiles of set A overwrite all of B, or all of B overwrite all of the same of A). But I could see a complex merge screen where you can selectively choose which tiles from each to use.
But that is probably a good bit further down the road.
Oh my god, you did not just suggest a code fix based off the appearance of the GUI.
This irks me so much I am going to explain the reason why it is the way it is. First the container format that is eventually saved is twice removed from the UI. First the UI writes to an InternalTile when a value is changed, which keeps track of references to images and checkbox states. This is then converted into the actual BaseTile that will be saved, when you go to save. Which looks up the image ids, and converts everything to the proper format for output. This prevents additional lookups when the program is running and makes sure the UI stays nice and snappy, regardless of how large of Tileset you are working with.
Now the reason why “rotates” appears first in the JSON, is because the JSON library I am using to output it uses a HashMap rather then a LinkedHashMap when constructing a JSON Object. This means the output is actually whatever the internal order of the binary tree the HashMap ended up as after adding all the values. Which is almost never the same order they are added.
Got all that? I do know a little bit more about the internal mechanisms of the program. I was not just talking out my ass when I said “I have no direct control over that. I could write a custom encoder for that class, but it seems like a lot of work for little gain.”
Optimize removes unused tiles from the Tile Chooser, and reorders them to match your id list.
Add missing tiles is just a stub, it doesn’t do anything yet. But will do what it says on the tin.
I apologize. Just try to avoid suggesting how to fix things.
You can tell me what needs fixing, what is an issue for you, what you like or dislike, and what you would like to see. But suggestions for how to fix things should be limited to very transparent issues, where you know how it is implemented, so your suggestion doesn’t come off as a smug report.
Here we go, 0.4 Alpha
Version: “Is it sad I find programming fun?”
Numerous internal improvements.
Added an “Import Tiles” button to Tile Chooser, you can now import an entire image full of tiles, rather then one at a time.
Added an “Import…” menu item to file. This allows you to import another tileset and merge it with your current one. It currently supports two automated conflict resolution methods “ours” and “theirs”, which determines which tiles to use when two ids conflict.