Search Unity

[RELEASED] Super Tilemap Editor

Discussion in 'Assets and Asset Store' started by CreativeSpore, Feb 21, 2016.

  1. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    Pixel Snap doesn't work very well with tiles. It is because it creates a separation between tiles. I added it before knowing this fact and kept it in the options, but it is not a good option.

    You have two ways to remove lines between tiles:

    First of all, uncheck Pixel Snap and be sure the texture Filter mode is Point (no filter), or just press the button in the tileset inspector view:
    upload_2018-9-5_17-18-46.png

    Now you have two options:
    • Set the Tile Inner Padding to value like 0.2
    upload_2018-9-5_17-22-49.png
    • Use the Atlas Editor Window to extrude the tiles
    upload_2018-9-5_17-28-54.png
     
  2. CaptCollins

    CaptCollins

    Joined:
    Jan 27, 2016
    Posts:
    13
    The inner padding crops my tiles? The more padding I have the more the tearing goes away, but it's clipping the edges of my tiles. And the more the resolution gets bigger, the more padding I need to not see tearing?
     
  3. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    Yes, Inner Padding is a fast way to fix the lines by cropping the tiles a little (really, it crops the UV rect).
    There is a third method to remove the lines and it is using a pixel perfect camera.
    And, if with more resolution you mean zoom out (so the tiles are smaller) you need to adjust the extrude padding or inner padding to be greater. Usually, in tile based games, you ended by using a pixel perfect camera and a constant zoom or integer zoom like 1x, 2x, 3x, etc.
     
  4. CaptCollins

    CaptCollins

    Joined:
    Jan 27, 2016
    Posts:
    13
    Turning off anti aliasing in unity seemed to have fixed everything? Working great thanks.
     
  5. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    I forgot that one. Some quality settings in Unity enables Anti-Aliasing in textures and could create gaps between the tiles.
    I wrote about that in a tweet that could be interesting to check if you want to create your own pixel perfect camera.
    https://twitter.com/CreativeSpore/status/1018408144689647616
     
  6. andympage101

    andympage101

    Joined:
    Jun 7, 2013
    Posts:
    12
    Hi, apologies if this has been answered before, I am working on a game which has some procedural generation, this means each room will effectively be a different tile group.

    At the moment every tileset under the tilegroup consumes draw calls. I saw it mentioned briefly but is there a way to merge the tilesets with the same material so they consume less draw calls?

    Thank you
     
  7. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    At the moment you change the texture of the material, a new draw call is performed.
    Anyway, the drawcalls are also limited by the number of vertices in the mesh and tilemap chunks are close to the limit, so it is already consuming few drawcalls.
    If you want enable Unity dynamic batching, the chunks should have a size of 8, but changing this will make all previous tilemaps incompatible with the new size:
    upload_2018-9-6_11-38-55.png
     
  8. ralphyua

    ralphyua

    Joined:
    Mar 28, 2017
    Posts:
    22
    How do I uncheck pixel snap? Every time that I uncheck it, leave the scene, then open the scene again, the pixel snap check box under the render tab becomes checked again. I thought I was going crazy for a second. Is there a reason the pixel snap setting would not save? Is there some other place that I have to uncheck pixel snap? Screen Shot 2018-09-07 at 11.20.34 AM.png

    Edit: For some reason, if you have the material set to Sprite-Default, some times the Pixel Snap checkbox does not save. I created a custom material that is a clone of the Sprite-Default, then the checkbox saved.
     
    Last edited: Sep 8, 2018
  9. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    I couldn't replicate the error. Maybe it is related with the Unity version you are using, but I added an extra check to save the value of pixel snap in the attached package.
     

    Attached Files:

  10. ralphyua

    ralphyua

    Joined:
    Mar 28, 2017
    Posts:
    22
    I've been getting some of the dreaded lines and noticing that some of the pixels are shaking or glowing as I move from left to right. So far I have:

    1. Turned the Tilemap sprites to Point no Filter
    2. Turned Compression to None.
    3. Turned off Pixel Snap for all Tilemaps.
    4. Turned off Anti_aliasing in Quality Settings

    I tried to do an Extrude using the Atlas Editor, but it screwed up all of my maps. I don't know what happened when I hit apply, but the tiles suddenly turned into a jumbled mess. It did ask me if I wanted to apply some sort of setting from the original Tileset (Don't remember the wording completely), and I clicked yes. Was I suppose to click "No"? I will try to do the inner padding trick to try and get rid of the lines. I don't think that will get rid of the strange artifacts I see when the camera moves horizontally. Is that what the pixel perfect camera is suppose to fix?
     
  11. andympage101

    andympage101

    Joined:
    Jun 7, 2013
    Posts:
    12
    Hey, Thanks very much this has worked great so far. Loving the program, hoping to use it in lots of projects :)
     
    CreativeSpore likes this.
  12. ralphyua

    ralphyua

    Joined:
    Mar 28, 2017
    Posts:
    22
    So it looks like the inner padding worked! All those nasty lines finally disappeared. The last thing I need to do is make the background tiles not blur and distort in a weird way while the camera is moving. I'm going to try the pixel perfect camera script that was posted. I haven't had much luck with pixel perfect scripts. I've tried a few, and they have all failed. Hoping this one will give me the desired results.

    Edit: So I was looking at the code that was posted in the tweet. I'm pretty confused on what some of the variables are referring to. Is there a tutorial that guides and explains step by step how this code works? Sorry, but I'm kind of a newbie to this stuff. If there isn't a guide, can someone point me to a pixel perfect tutorial that has worked for them. I remember trying several, and none of them seemed to work right. A recommendation would be greatly appreciated. Thanks.
     
    Last edited: Sep 11, 2018
  13. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    First of all, it depends on the view resolution.
    Try to play your game at full screen and you would notice it less that in a small editor view.
    The pixel perfect camera fix that snapping the position to the screen pixel grid and also changing the camera zoom so the texture pixel size is scaled with an integer value, like 1x, 2x, 3x, etc.
    In my example, you should use an integer zoom factor.
     
  14. lonehamster

    lonehamster

    Joined:
    Aug 14, 2018
    Posts:
    37
    Some help please.

    Apart from Super Tilemap Editor, what other tools would I need in order to "easily" create a game like "To The Moon"? Or would RPG Map Editor be better place to start?
     
    Last edited: Sep 29, 2018
  15. Khena_B

    Khena_B

    Joined:
    Aug 21, 2014
    Posts:
    273
    I'm getting these errors 50% of the time when I build my game, 2018.2.2f1, latest STE version no tilemaps in the scene, only way to solve it is to restart the editor and give it another try until it builds.

    Error.jpg
     
  16. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    Well, it depends on your skills and what features you need to be implemented.
    I would say, Super Tilemap Editor is a better tilemap editor that RPG Map Editor, but RPG Map Editor is more easy to use if you want to use RPG Maker style tilesets and also comes with extra features like basic player controller, AIs, path finding (this is also included in STME), etc.
     
  17. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    I am not sure what is causing those errors. It looks like a Unity bug with serialization, like if it was skipping one of the serialized fields.
    Did you downgrade your Unity version at some point? Unity doesn't support downgrading very well.
    A possible way to fix that could be closing the project, removing the Library folder, and opening it again to force a full reimport.
     
  18. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    I have fixed a bug with Unity version 2018.3.0b2 related with the Group Autotiling Mask.
    Apply the attached package to fix it if you are updated to this version.
     

    Attached Files:

  19. Khena_B

    Khena_B

    Joined:
    Aug 21, 2014
    Posts:
    273
    I've never downgraded Unity, I didn't know this was possible, I've never downgraded my projects either, I always make backups before upgrading and go back to my backup if there are issues, I also delete the library folder from time to time, I did it right now and the first build still failed, 2018.3 is still in beta so I don't want to make the switch yet, 2018.2.2f1 is really stable so I'll stick with it for a while, let me know if you need more help figuring this out.
     
  20. Khena_B

    Khena_B

    Joined:
    Aug 21, 2014
    Posts:
    273
    I'm not 100% certain because of how random it happens, but it only seems to happen when using .NET 4.x Equivalent, I've done a couple of builds with 3.5 and the error hasn't come up yet, but in a new project I can't reproduce the error, not sure why.
     
  21. Landa_In_Castle

    Landa_In_Castle

    Joined:
    Sep 9, 2018
    Posts:
    74
    Does this support like this size tileset... each scene tile has Main 64 x 64 pixels and with corner 16 x 16. finally, I only can slice individual by 16 x 16. so I got 16 tiles in main tiles after sliced. not 9 tiles, like your video showing...

    How to resolved?
     

    Attached Files:

  22. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    I am not sure what is causing this bug, but could be related with the use of partial classes because m_meshRenderer is declared in a partial class.
    Maybe this is something fixed in a newer version. But I couldn't find more information. Only that could be related with cloud builds.
     
  23. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    The problem here is that you should use 32x32 tiles, not 16x16.
     
  24. Khena_B

    Khena_B

    Joined:
    Aug 21, 2014
    Posts:
    273
    The problem also happens with the latest version of Unity 2018.2.11f1, can you contact Unity and see if this is something that can be solved for 2018.3? I can try and make a bug report with a stripped down version of my project.
     
  25. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    Could you try the attached patch? I have moved all serializable properties to the main class file. If it was a partial class bug, it should be fixed now.
     

    Attached Files:

  26. Khena_B

    Khena_B

    Joined:
    Aug 21, 2014
    Posts:
    273
    I'm getting an error with the patch:

    Assets\Plugins\CreativeSpore\SuperTilemapEditor\Scripts\Tilemap\TilemapChunk_TileObjFactory.cs(166,127): error CS1061: 'TilePrefabData' does not contain a definition for 'rotation' and no extension method 'rotation' accepting a first argument of type 'TilePrefabData' could be found (are you missing a using directive or an assembly reference?)
     
  27. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    Try this new package.
     

    Attached Files:

  28. Khena_B

    Khena_B

    Joined:
    Aug 21, 2014
    Posts:
    273
    I've managed to do a dozen builds without seeing the error so it seems to have fixed it, I'll let you know if it comes up again, thanks!
     
  29. NathanGroovy

    NathanGroovy

    Joined:
    Sep 9, 2015
    Posts:
    43
    I just bought and imported this from the asset store but I immediately got these compile errors:

    Assets/CreativeSpore/SuperTilemapEditor/Scripts/Tilemap/TilemapChunk.cs(209,29): error CS0117: Event' does not contain a definition forcurrent'

    Code (CSharp):
    1. Event e = Event.current;
    Assets/CreativeSpore/SuperTilemapEditor/Scripts/Tilemap/TilemapChunk.cs(210,32): error CS1061: Type Event' does not contain a definition fortype' and no extension method type' of typeEvent' could be found. Are you missing an assembly reference?

    Code (CSharp):
    1.   if (e != null && e.type == EventType.ExecuteCommand && (e.commandName == "Duplicate" || e.commandName == "Paste"))
    Assets/CreativeSpore/SuperTilemapEditor/Scripts/Utils/EditorCompatibilityUtils.cs(19,77): error CS0117: Event' does not contain a definition forcurrent'

    Code (CSharp):
    1. Handles.DotHandleCap(controlID, position, rotation, size, Event.current.type);
    Anybody know what the problem could be?
     
  30. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    Probably you have another class named Event that is not enclosed inside a name space.
    If you double click the error, select the word Event clicking on it and press F12 you will navigate to the location of the Event class that is causing the problem. Enclose the class inside a name space and that will fix the issue.
     
  31. PrettyFlyGames

    PrettyFlyGames

    Joined:
    Aug 30, 2012
    Posts:
    74
    Hey!
    I must say that I love this tool. Lovely to work with :)

    But I do have an issue, I'm trying to color the tiles from code and it works when I run the game in the editor. But if I compile to game for PC (or any other platform) then the color is ignored.
    I change the color of the grid by calling: steTilemap.SetTileColor(0, 1, Color.red, eBlendMode.AlphaBlending);

    I assume that this is not the correct way as it's not working :D Is there some other way to change colors of tiles at runtime?
     
  32. PrettyFlyGames

    PrettyFlyGames

    Joined:
    Aug 30, 2012
    Posts:
    74
    Ahh never mind! I had forgotten to call steTilemap.UpdateMesh();
     
    CreativeSpore likes this.
  33. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    No problem! Good to know you found the answer ;)
     
  34. NathanGroovy

    NathanGroovy

    Joined:
    Sep 9, 2015
    Posts:
    43
    Yeah, that's exactly what happened. Thanks for the input. Also, is there any way to use multiple tilemaps in the same tilemap group?
     
    CreativeSpore likes this.
  35. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    Good to know it was fixed ;)
    You can use multiple tilemaps in the same tilemap group, so I am not sure what you mean.
     
  36. Raseru

    Raseru

    Joined:
    Oct 4, 2013
    Posts:
    87
    There's been a bug I've noticed in STE for awhile and still present in 1.6.0, at least for me. Was curious if others get it or know about it.

    Go to paint bucket, have mouse somewhere on scene view and press control. It will paint on the screen. This can be sometimes frustrating because you are trying to press Ctrl+Z to undo something but instead it paints. Not a big deal, and the work around is just moving mouse off the scene to undo.
     
    Last edited: Oct 23, 2018
    CreativeSpore likes this.
  37. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    Thanks for telling me about this bug.
    I have fixed it in the attached package.
     

    Attached Files:

  38. GaDeMy

    GaDeMy

    Joined:
    Mar 22, 2016
    Posts:
    9
    Considering that the source code is included. How possible do you see the chance of adapting this for a 2.5D workflow? I mean swapping the 2D sprites for 3D meshes.
     
  39. XaneFeather

    XaneFeather

    Joined:
    Sep 4, 2013
    Posts:
    97
    Is it possible to attach a custom texture as an icon when attaching prefabs to a TileMap? Simultaneously, could it be possible to create an empty TileMap of set size without using a dummy texture?
    We want to split logic prefabs (puzzle triggers, etc) from regular tiles, by separating them into their own tilemap, most of which do not have a SpriteRenderer attached (e.g. Spawn Points) yet we want them to be distinguishable in the TileMap by giving them an icon.
     
  40. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    You can already use prefabs to place 3D objects in a plane (the tilemap plane) if that is what you mean.
     
  41. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    The only options to preview a tile is, showing the tile or, if you attach a prefab with a sprite renderer to a tile, you can choose to display the prefab preview instead through the Tile Property Window.
    For the last question, I am not sure if I understood you. Do you want to paint a set of tiles like painting a single tile? That is not possible, but you can use the Tile Views to save a tile configuration and you can attach any prefab to any tile to instantiate the different objects like spawners and use a sprite renderer with any icon to show it in the tile palette. Just remember to add the logic to hide the icon on instantiate or during game play.
     
  42. XaneFeather

    XaneFeather

    Joined:
    Sep 4, 2013
    Posts:
    97
    Essentially I want a preview icon without the needs of attaching a SpriteRenderer to said prefab as it is just a logic object and shouldn't be visible to the player.
     
  43. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    You can use the tile where the prefab is attached as preview.
    By default, the tile is not rendered if there is a prefab attached.
    You can check it in the Tile Property Window.
     
  44. SiliconAvatar

    SiliconAvatar

    Joined:
    Mar 23, 2014
    Posts:
    50
    Feature request:

    Ability to start the tile ID at some arbitrary number per tileset.

    All my tilesets start at 0. I want one to start at 0, another at 650, and another at 1500 (for example).

    Reason: I have a lot of tiles across several tilesets and I was using tile IDs in a database as an index, but I can't have repeating ID numbers as I now have. As far as I can tell there is no way to set what number the tile ID starts at per tileset. It always starts at 0.

    I guess I could lump all my tiles into one massive sheet but boy is it ever going to be big.

    Edit: I can probably set up a schema in my database to handle this. That might even be the preferred method. Still would not be a bad feature to have if it's possible.
     
    Last edited: Nov 7, 2018
  45. hublard

    hublard

    Joined:
    Aug 19, 2015
    Posts:
    79
    Hey there,

    someone already tried to Export map data?

    i use this asset for my 2d multiplayer (Server/Client)

    Player can build stuff and that will synchronized and stored (save) in Server database (mongodb)
    when a new Player Login he will get updated from Server (load)

    so e Need to save serializated data.


    if someone already worked on this and can help me i would be very thankful :)


    best regards
     
  46. lonehamster

    lonehamster

    Joined:
    Aug 14, 2018
    Posts:
    37
    Is there someone familiar with this that might be able to help mentor me in using it for my project? I would be happy to pay for the help.



     
  47. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    Check this out. It may help:
    https://creativespore.com/2018/07/03/how-to-iterate-a-tilemap/

    If you need more help let me know.
     
  48. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    That would be complicated to do without changing the workflow a lot, so it won't be possible in a short term.
     
  49. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    Not sure what you need help with. With the tool or with the tileset?
     
  50. gferrari

    gferrari

    Joined:
    Jan 14, 2015
    Posts:
    135
    Hi! I have an issue with the playmaker for STE Actions

    Assets/PlayMaker4STE/Scripts/TilemapActions/SetTilemapChunkRendererProperties.cs(61,25): error CS1061: Type `CreativeSpore.SuperTilemapEditor.STETilemap' does not contain a definition for `UpdateChunkRenderereProperties' and no extension method `UpdateChunkRenderereProperties' of type `CreativeSpore.SuperTilemapEditor.STETilemap' could be found. Are you missing an assembly reference?

    I use the last STE vesion and 2018.2 unity version.