Tileset Editor 1.0 (Proof of Concept)

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.

Current Version: 0.11

[size=24pt]Download[/size]
Tracked Releases
Source GIT

Requires Java 7 to execute, but works on windows or linux. To launch, click the cddatse.sh or cddatse.exe.


Click for full size.

The tileset viewed in the preview is Waldo’s tileset. The tileset I personally use at the moment. Suggestions and comments below, please keep in mind that this is an ALPHA VERSION.

4 Likes

Nice work!

Look good. Do not forget that there is a multi-part tiling.

{ "id":"t_water_pool", "fg":2016, "multitile":true, "additional_tiles": [ { "id": "center", "fg": 2016, "bg":1 }, { "id": "corner", "fg": 2017, "bg":1 }, { "id": "t_connection", "fg": 2018, "bg":1 } ], "rotates":false },

Nah, multipart tiles were one of the first things I added (if you looked a the first screenshot, you can see part of it).

Time to alpha test~! arufu tesutu awai~!

Download Here

Even better than I thought. ) Saving and adding checked yet. All shows true and beautiful. No search, I would like to have it.

It has a search, you just have to open something first.

It’s the little box at the bottom, next to the label that reads “Search:”.

The images are from before I had that in.

Thanks, found it. Acts as a filter, it is convenient.

Alpha 0.2 ready.
Version “What do you want for 3 hours of work?”

Changes-
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.

Download Here

  1. While maintaining the formatting is removed. This causes the file unreadable for humans.

  2. I would like to swap “rotates”:XXX, and “id”:“XXX”

  1. Saves but does not load tilesets in folders without the game. Ie D:\Tmp\gfx\test\

This is so cool!

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”

{"tile_info":[{"height":32,"width":32}],"tiles":[{"rotates":false,"id":"corpse","fg":0},{"rotates":true,"id":"footstep","fg":1}.....

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.

Update 0.3
Version “I’m in the middle of a show, do I have to work on this now?”

Changes
Added pretty printing option.
Fixed broken launcher .sh on linux.
Added missing menu mnemonics.

Download Here

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’m not a programmer, and I can not advise the author, how to write code. It was just an observation. Sorry if it offended you.

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?”

Changes:
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.

Download Here

You can ask some of the options?

  1. The program should not change in the index and tiles.png tile_config.json, or at least offer the possibility to refuse.
  2. The program should not change the size tiles.png, or at least offer the possibility to refuse.
  3. When sorting changes only tile_config.json, indexes are stored.
  4. Items with no tiles are highlighted.
  5. When selecting the object in the right window shows the index, if it exists.
  6. Slightly increase the size of images in the preview. Can not see the difference between the almost identical tile.

Preserving the indexes or size of either the graphic or the json files is not on my to do list. So that is a NO to 1,2,3 and 5.

  1. Items without any tiles can be highlighted and is a decent suggestion.

  2. Increasing the preview size is possible, but not (easily) for the Existing Tiles area in the Tile Chooser.