Author Topic: Tileset Editor 0.11  (Read 20507 times)

Offline Chase

  • NPC
  • **
  • Posts: 104
    • View Profile
Tileset Editor 0.11
« on: February 10, 2014, 11:40:20 AM »
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

Download
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.
« Last Edit: March 07, 2014, 10:47:06 AM by Chase »

Offline CIB

  • Contributor
  • Survivor
  • ****
  • Posts: 303
    • View Profile
Re: Tileset Editor
« Reply #1 on: February 10, 2014, 01:30:03 PM »
Nice work!

Offline ChunkOfMeat

  • Zombie Food
  • *
  • Posts: 73
    • View Profile
Re: Tileset Editor
« Reply #2 on: February 10, 2014, 04:07:40 PM »
Look good. Do not forget that there is a multi-part tiling.
Code: [Select]
        {
            "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
        },

Offline Chase

  • NPC
  • **
  • Posts: 104
    • View Profile
Re: Tileset Editor
« Reply #3 on: February 10, 2014, 04:39:04 PM »
Nah, multipart tiles were one of the first things I added (if you looked a the first screenshot, you can see part of it).

Offline Chase

  • NPC
  • **
  • Posts: 104
    • View Profile
Re: Tileset Editor
« Reply #4 on: February 10, 2014, 04:59:04 PM »
Time to alpha test~! arufu tesutu awai~!

Download Here


Offline ChunkOfMeat

  • Zombie Food
  • *
  • Posts: 73
    • View Profile
Re: Tileset Editor 0.1 Alpha (Released)
« Reply #5 on: February 10, 2014, 05:27:29 PM »
Even better than I thought. ) Saving and adding checked yet. All shows true and beautiful. No search, I would like to have it.

Offline Chase

  • NPC
  • **
  • Posts: 104
    • View Profile
Re: Tileset Editor 0.1 Alpha (Released)
« Reply #6 on: February 10, 2014, 05:30:15 PM »
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.

Offline ChunkOfMeat

  • Zombie Food
  • *
  • Posts: 73
    • View Profile
Re: Tileset Editor 0.1 Alpha (Released)
« Reply #7 on: February 10, 2014, 05:46:16 PM »
Thanks, found it. Acts as a filter, it is convenient.

Offline Chase

  • NPC
  • **
  • Posts: 104
    • View Profile
Re: Tileset Editor 0.1 Alpha (Released)
« Reply #8 on: February 10, 2014, 08:18:13 PM »
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

Offline ChunkOfMeat

  • Zombie Food
  • *
  • Posts: 73
    • View Profile
Re: Tileset Editor 0.2 Alpha (Released)
« Reply #9 on: February 11, 2014, 07:32:50 AM »
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"

Code: [Select]
{"tile_info":[{"height":32,"width":32}],"tiles":[{"rotates":false,"id":"corpse","fg":0},{"rotates":true,"id":"footstep","fg":1}.....
3. Saves but does not load tilesets in folders without the game. Ie D:\Tmp\gfx\test\
« Last Edit: February 11, 2014, 10:14:32 AM by ChunkOfMeat »

Offline Zireael

  • Survivor
  • ***
  • Posts: 1973
    • View Profile
Re: Tileset Editor 0.2 Alpha (Released)
« Reply #10 on: February 11, 2014, 08:22:30 AM »
This is so cool!

Offline Chase

  • NPC
  • **
  • Posts: 104
    • View Profile
Re: Tileset Editor 0.2 Alpha (Released)
« Reply #11 on: February 11, 2014, 12:05:35 PM »
1. While maintaining the formatting is removed. This causes the file unreadable for humans.
I can make it pretty printing easily enough. But the hope is you will never have to edit it by hand.
2. I would like to swap "rotates":XXX, and "id":"XXX"
Code: [Select]
{"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.
3. Saves but does not load tilesets in folders without the game. Ie D:\Tmp\gfx\test\
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.

Offline Chase

  • NPC
  • **
  • Posts: 104
    • View Profile
Re: Tileset Editor 0.2 Alpha (Released)
« Reply #12 on: February 11, 2014, 03:27:51 PM »
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

Offline ChunkOfMeat

  • Zombie Food
  • *
  • Posts: 73
    • View Profile
Re: Tileset Editor 0.2 Alpha (Released)
« Reply #13 on: February 11, 2014, 03:29:54 PM »
I can make it pretty printing easily enough. But the hope is you will never have to edit it by hand.

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

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.

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.

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"?
« Last Edit: February 11, 2014, 03:59:27 PM by ChunkOfMeat »

Offline Chase

  • NPC
  • **
  • Posts: 104
    • View Profile
Re: Tileset Editor 0.2 Alpha (Released)
« Reply #14 on: February 11, 2014, 05:23:48 PM »
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 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.

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

What do the the option "Optimize" and "Add missing tiles"?
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.
« Last Edit: February 11, 2014, 05:26:39 PM by Chase »