[WIP] 2d Tileset Editor using Unity's built in sprite engine (low draw calls)

Hey guys, I’ve started working on a simple 2d tileset editor for use in basic games with unity. Because it uses the built in sprites, a single tileset is one draw call, no matter how many tiles or layers you have. It’s really basic at the moment, but still, it’s a good start.

Here’s a basic example video of it in use. Tileset’s are a very fast form of development, so it’ll be nice to have the tool finished. Right now, there is a basic paint, erase, and layer tool.

[edit]setting the layer to 10 didn’t work, cause the camera is at 10 and it was drawing behind/inside the camera.[/edit]

I do plan to add features over time. I’d like to do a fill tool, as well as make groups, for things like trees, lamp posts, signs, etc. I also need to add an option for collision. Problem with an individual box collider on each tile is unity has issues with physics and individual box colliders. Characters will stick even if it’s a flat surface. Maybe it was the way I programmed it (changing the velocity), but meh.

Anyway, let me know what you think. Any suggestions on what’s done? (I know that displaying the tiles in the editor isn’t working right… I just got it placing the tiles and using the proper tileset correctly.)

Hey guys, I’ve worked a bit more on this recently, and it’s starting to look pretty good as far as it’s usefulness. First thing that’s a major improvement and makes it near impossible to place a tile improperly, I added an indicator to show what tile is selected. This makes things so much less frustrating. Past that, I have made layers able to be hidden or shown. Right now I’m doing it a little funky (searching through all sprite objects, seeing what layer they are on, and disabling the sprite renderer if it’s on the current layer), but I’ll be making empty game objects for each layer, and then placing all tile inside those game objects for the layer they are on. This makes it easier, not only to hide layers by simply enabling/disabling one game object (which enables/disables all child objects), but it will allow for layer sorting via Photoshop layer reordering. If you want to move a layer in front of a different layer, you’ll be able to. You can’t at the moment, but that’s what I plan.

The other plus of that layer option is it will make things like setting colors to the entire layer, or applying things in general. This is really cool in my opinion, and could open up a lot of features that are layer specific.

I’m also thinking up a way to add colliders. I don’t know if this will be per tile or row, or a dynamic one that checks it’s neighbors and builds a polygon collider based on a value being set (possibly a tag so I don’t have to add a script to hold values). This could be cool, but for ease of use may only be valid for a convex shape (no inside walkable area), but meh. We’ll see what I can come up with. I may just make it simply do rows and columns. Testing will be done.

Anyway, if you have any suggestions for features past what I’ve said here, let me know. Past colliders and layers, I don’t really have much of an idea. Extra tools I suppose (flood fill{only valid if in an enclosed area, otherwise it’d make a ton of tiles}, box drawing are the only two other main ones I can think of), oh, and I was planning on making a second tool to go with this for object painting, as in you would make something like a tree, or a sign, or whatever out of multiple tiles, then in the main tile editor, let you select those grouped objects instead of a tileset and paint the whole object in one click.

Anyway, that’s getting pretty far up there in my list of wants. Other suggestions still wanted.

Oh, yeah, video…

Worked on it some more, and finished the layers a bit better. I was debating on whether or not you should be able to make text layers like photoshop, and at the moment, just to get it out faster, I’m going to just use numbered layers. I may come back to it later and make it a bit better that way, but for now, I’ll leave it as is.

So, this update, I added a +/- layer button, just so you don’t have to type it in. I also made it where you can select layers by literally selecting them in the scene view hierarchy. Not a massive update, but still good. The layers also make a sub object and places the tiles inside of it. This makes this a bit easier and faster. Before I was just going through all game objects, and comparing the name to see what layer it was on and then enable/disable the sprite renderer if it was the correct layer. Now it looks at the layer game object and then enables/disables all child sprite renderers. This makes things faster in general. It may not matter on a higher end system all that much, but when you start to have a possible hundreds of thousands of tiles, it could make things different.

I also think I’ve found the best way to make a dynamic collider system, and that’s to use an edge collider. This will allow for a low number of colliders, but still allow for there to be a hollowed out inside section as well as an outside section. It may take a little bit to figure out how to create them dynamically, but meh :stuck_out_tongue: I’ll figure it out. There may be a button to recalculate collisions though as modifying it every tile placed may just be to slow. Maybe just recalculate on mouse up. I don’t know. :stuck_out_tongue: I’ll work on it and see. I can see a potential first release after getting colliders working. :smile:

Anyway, here’s a video showing the new layer system.

First Here =D Love what you have done so far. Keep it going.
Was just wondering if this will be freebie? or are you planing something else?

Reminds me a little of the RPG Toolkit, back in the day!

Good stuff, can’t wait to see what this turns into.

This looks great! I’m working on a project where I need to use something like this myself. Are you planning on releasing it any time soon? I’ve been looking everywhere for a free alternative, but it looks like I’m gonna have to make one myself. Got any pointers on things to consider when developing one?

where can i get this?

It’s on the asset store now actually. :smile: Quite a bit more polished then the last video in this post, and now even has layers like photoshop does. :smile:

Unfortunately, it’s not free. I’ve put too much time and effort into it for that.

Looks good except the first thing you are showing people is to do a search and grab someone’s tile sets. Of course, if they are on “for free” sites that is cool.