Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

UniTile - 2d Tile-based Map Editor within Unity

Discussion in 'Assets and Asset Store' started by mudloop, Jan 6, 2011.

  1. wesllg

    wesllg

    Joined:
    Jan 8, 2011
    Posts:
    18
    Thanks for the reply Smag. I've been using Unitile for a day or so now, great tool, thanks.

    Yeah, it sounds like that would do what I need. In short I am looking for a way to easily place objects that match the alignment of the other tile layers, so an object layer sounds like exactly what I need. This will be used as an interactive/collectables layer, so anything that needs to be animated or collected by the player will be place onto the object layer.

    Optimally, we'd be able to paste/duplicate objects with a set of brushes as easily as we do now with the tile layers. That would be awesome! :)

    I know this is a horrible question, but do you have a time frame you are looking at for release of the next version?
     
  2. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    Well, the object layer is finished, but I need to improve a couple of other things as well before I can release this, and I'm swamped with work. But I'll do my best not to keep you guys waiting for too long - probably early next week.
     
  3. wesllg

    wesllg

    Joined:
    Jan 8, 2011
    Posts:
    18
    Thanks Smag, let me know if you need help testing.
     
  4. monsterhead

    monsterhead

    Joined:
    Mar 22, 2010
    Posts:
    16
    I just purchased UniTile from your website. Was just wondering how future updates will be handled once your in the asset store. Will the ones who purchased from your website have to download updates directly from you? Or maybe a email notification with download instructions could work?

    Keep up the awesome work!
     
    Last edited: May 15, 2011
  5. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    @monsterhead: thanks for purchasing UniTile. I will always send updates to the current users by email.

    @cjcurrie: I have finally implemented the scroll view. This will be in the update that will come out later this week.
     
  6. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    I was considering doing something like this next, after getting some Asset Store success with my RageSpline -product.

    Decided to do a little market research and after seeing your video, I see no point, because you already have pretty much everything I visioned too.

    One thing that I planned, and you don't currently seem to not have, is to use vertex color as an effect to colorize/lighten/darken individual tiles. Just store color per vertex and have a shader multiply your texture value with vertex color. You could do local lightning effects pretty easily and the performance hit is near to nothing. Would really spice up the repeating tiling look that sprites have.

    You'd need to split the single tile to 5 polys diamond instead of 2 poly split for interpolation smoothness. but polycount isn't really an issue or so I have learned with my own product anyways.

    I'm sure it's not as easy as it sounds and this is not a request but I just wanted to pass on my idea, since I feel it would add a lot of value.
     
  7. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    That's a pretty good idea, but it's not that simple. I have lots of calculations going on for edge bleed compensation, for decreasing transparent parts, etc, and changing the shape of the tiles won't be that simple because of that. I will keep it in mind for the future though.
     
  8. mojtaba64

    mojtaba64

    Joined:
    Aug 3, 2010
    Posts:
    56
    I've been using Unitile for a day now, It covers most of my needs.

    The collider system is very nice, the only problem is I can't set the offset for start collider on the tiles that character should place on them.
    so the character goes into tiles or above them ( the same problem is on down, right and left edge tiles ). This is very nice if i could set the offset for colliders or something like that to solve the problem.

    Can i use 1.1 version and update my project with newer version? or I should wait to use new releases?

    thank you and sorry for my bad english ;-)
     
  9. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Just thinking about this. I'm sure you know your stuff and are right about the difficulties, but I'm just curious about everything so I got to ask.

    I don't understand what you are doing with edge bleed or what it even means. Is it something like the edgemost pixels get doubled with certain camera/position combinations when using the point filtering?

    If you would add one vertex in the middle of the quad and build triangles accordingly, you're existing vertices should be positioned like they were before so maybe it's still possible to have you're calculations like they were.

    Then again, I'm just shooting blind since I have no idea how you build your stuff. Maybe I should just buy it for curiosity. You have source code bundled?
     
  10. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    I'm not completely sure what your problem is - if you could send me some screenshots to info at mudloop dot com, I'll have a look and see if I can come up with a solution.
    And yes, the upcoming update will be compatible with the previous version, so you can already get started.

    Yep, the edge bleed compensation is a small overlap of the tiles, and also some spacing between the tiles in the tileset.
    You're right about just being able to add a vertex in the middle and keep the other coordinates the same. This should not interfere with the edge bleed compensation, but it will be harder (not impossible) to combine with my code that leaves out parts of transparent tiles to minimize overdraw. I would also have to keep it optional so people who don't need it don't get twice the polycount. So yes, I'll consider it, but not quite yet :)

    And yes, it comes with the full source code. I bought your RageSpline tool yesterday btw, it's a really good tool.
     
  11. BloodWraith86

    BloodWraith86

    Joined:
    May 16, 2011
    Posts:
    136
    Would this 2D tile based map editor work with Dimetric Tiles?

    2:1 pixel square tiles (100x50)?
     
  12. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    Yes, that shouldn't be a problem at all.
     
  13. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Ok, thanks for the explanation. I'll return the favor later today.
     
  14. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    UniTile 1.2 has been released.

    - There's a new Object Layer which can be used to easily position objects on top of your maps.
    - I've added an option to view the tileset in a scrollview
    - You can now set the output size of tiles independently from their actual size
    - You can also select to enter the tile sizes in UV-space instead of pixel space
    - When instantiating prefabs assigned to a tile, they will now have a prefab connection to the prefab
    - Some minor bugs have been fixed.
     
  15. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    UniTile is now available on the Asset Store as well.
     
  16. monsterhead

    monsterhead

    Joined:
    Mar 22, 2010
    Posts:
    16
    Hey just wanting some advice from people who have been using UniTile for a while. Wondering whats a good way to set up my tile sets so I don't get any noticeable edge bleeding. My set up right now is a 256x256 - 512x512 pixel tile sets with no borders between tiles. Should I be using padding? Seems I can't get that to look right either. So basically what settings work for you guys to get the cleanest result. Thanks!
     
  17. wesllg

    wesllg

    Joined:
    Jan 8, 2011
    Posts:
    18
    Hi monsterhead,

    I've actually been using TexturePacker for packing my tilesets. It has an extrude function that will pad the edges of your tiles to avoid the bleed that occurs when the tiles are filtered. Other option, though less appealing, is to set your texture to use point filtering.
     
  18. wesllg

    wesllg

    Joined:
    Jan 8, 2011
    Posts:
    18
    Having used Unitile for a while now it struck me that being able to setup individual tilemaps as prefabs would be a great way to build maps. This way you could save a tile layer to a prefab for reuse through multiple scenes. Additionally, one could arrange their own colliders for that layer. This would allow arbitrary rotations for each segment in the map and easy depth organizations for segments. There may be a performance cost for this however.

    So I tried saving the layer to a prefab, but upon clicking the prefab in the editor I received the message:

    Setting the parent of a transform which resides in a prefab is disabled to prevent data corruption.
    UnityEngine.Transform:set_parent(Transform)
    UniTileManager:get_marker() (at Assets/UniTile/Scripts/UniTileManager.cs:54)
    TileLayerEditor:OnEnable() (at Assets/UniTile/Editor/TileLayerEditor.cs:559)

    It appears to be related to allocating a marker object for the tilelayer. I forged ahead anyway and tried using the prefab in a scene. But there are no tiles rendered on the tile layer once it is dragged into the scene, though it is the correct height and width, just no rendered tiles. The tilesheet used to create the tile map and all its settings appear fine in the inspector however.

    Don't know if this would be possible with the current Unitile code base, but I'd like to forward it as a possible future usability addition. :)
     
  19. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    UniTile comes with a TexturePadder script that can be used to add padding between your tiles (not just empty space but repeats of the tile edges). I use a 1px border on my regular tileset and a 2px border on the HD version. This will off course change the size of your texture so if you want power-of-two textures you'll have to make your original a little smaller.
    Besides the padding, I also let the tiles overlap a little bit, because otherwise you sometimes get an empty row/column of pixels.

    I will look into this for the next version. Without looking at it, I'm guessing that the problem may be that it doesn't find the UniTileManager.
    One possible workaround would be to remove the UniTileLayer component from the gameobject before making it a prefab. You won't be able to edit it anymore (so maybe keep a copy), but I think you will be able to instantiate them that way.
    I do think that all referenced prefabs are kept into memory at all time, even if they're not in use. So if you want to have a large pool of maps that you can instantiate at runtime, you may get memory problems.
     
  20. monsterhead

    monsterhead

    Joined:
    Mar 22, 2010
    Posts:
    16
    Thanks for the help wesllg and Mudloop. Never Heard of that TexturePacker program I'll give it a shot.
     
  21. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    How can UniTile work with RageSpline?
    Ist there anything that i have to think about before(i.e. do i have to put the RageSpline objects in an own objectlayer or something different)?
     
  22. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    Hmm, have you tried it yourself, and are you having a specific problem? If the RageSpline objects end up behind the map, it's probably a shader issue. The included shader often ends up in front of other things, but you could try some of Unity's mobile shaders.
     
  23. nnx

    nnx

    Joined:
    Jun 16, 2011
    Posts:
    1
    I would just like to voice that I would absolutely love this feature.
     
  24. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    Ok, I've added it to my todolist, but it might take a while before I'm done with it since I'm in the middle of a large project for a client. But I'll do my best not to keep you waiting too long :)
     
    Last edited: Jun 16, 2011
  25. futurefive

    futurefive

    Joined:
    Jul 1, 2011
    Posts:
    4
    Sorry if this has been covered before.

    I am currently working on a project where we already have 50+ levels created with an external tile based editor on 16x16 grid.

    The file format is very simple like this IsSpecialObject:TilesetID:TileID:Layer:XPos:YPos:Width:Height e.g. |0:1:52:2:44:21:2:2|
    Special objects are things like player start position, or enemy start positions, etc...

    We also have invisible tiles that have collisions set. Like an invisible platform. That have a blue texture in the editor but disappear in game.

    Does UniTile support file import plugins? Would it be difficult to write one so the levels can be further edited in Unity with UniTile?

    How does UniTile handle tile layers?
     
    Last edited: Jul 1, 2011
  26. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    UniTile doesn't have support for import plugins, but I plan to work on an API for changing tiles in the next couple of weeks.
     
  27. futurefive

    futurefive

    Joined:
    Jul 1, 2011
    Posts:
    4
    What about layering tiles over each other is that supported?
     
  28. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    Yes, different layers are supported.
     
  29. futurefive

    futurefive

    Joined:
    Jul 1, 2011
    Posts:
    4
    Ok I might just buy a copy and have a play around. If I have any more questions is this the best thread to ask in?
     
  30. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    Yes, this is the best thread for questions. You can also mail me directly (sven at mudloop dot com).
     
  31. MetaMythril

    MetaMythril

    Joined:
    May 5, 2010
    Posts:
    150
    Does unitile have a script for creation of texture atlases from individual images to construct the tile sheets? Also, if I purchase from your site, are updates obtained through the site or email? Looks like an interesting product that would be perfect for my first game I'm working on.
     
  32. MetaMythril

    MetaMythril

    Joined:
    May 5, 2010
    Posts:
    150
    Ok, bought it through your website a few hours ago. Noticed that the upgrade question has been answered before. So far I'm working through a bit of frustration with the demo scene.

    From the thread I've read that when you place a block down it is supposed to automatically place a collider with it, but it doesn't seem to do it. I'm not sure what I'm missing.

    I'm also not sure of how to best make use of prefabs. The demonstration video seems to cover the bare minimum so it is a little difficult to see all of the potential hidden within this system. It also doesn't specify how to delete existing painted tiles. I guess you just paint over it with an blank texture space tile, but I hate making assumptions. I hope the documentation can be improved to help users get over the learning curve quicker.

    I have a bit of a side question about the demo. I made a basic movement and jump script to attach to the sphere object, which also has the camera follow it like a traditional 2D platformer. I'm not sure why, but it seems like the gravity is really light as the ball falls pretty slowly as if it were in water. I looked at the gravity settings and it seems correct at Y: -9.81, so I'm not sure why it behaves like this. Any ideas?

    Thanks again for making this!
     
  33. MetaMythril

    MetaMythril

    Joined:
    May 5, 2010
    Posts:
    150
    Just to note, I fixed the floaty falling issue by increasing the gravity. The issue stems from the objects being at a large size since they pixel size for the orthographic camera.

    I would really like to know more about how to setup placement of tiles where a collider can be placed along with it by default.

    It's a bit concerning that I haven't seen any activity nor a response to my previous questions since about 2 weeks ago. Is support for this plug-in still going or has it died out? For now I'm just going to assume the developer is busy with other work at the moment as he has mentioned it in the past.
     
    Last edited: Jul 30, 2011
  34. MetaMythril

    MetaMythril

    Joined:
    May 5, 2010
    Posts:
    150
    Ok, I was finally able to sit down and take another look at UniTile today and made some progress with working with the creation of colliders by setting their properties on the tile and clicking the "Create Objects" button for the selected layer in order for the colliders for those tiles to be generated.

    Maybe someone can answer this. It was mentioned before about optional grid snapping, is there a way for me to place tiles down without it snapping to the grid? I can't seem to figure out if it is possible yet.

    Also, I would definitely like to request the feature to be able to flip/rotate tiles as well, as it would save on texture space if I could have, say one-half of a window textured and simply construct the rest of window from it being symmetrical.

    Thanks again for the awesome product, I hope to hear from someone. :)
     
  35. Rayzer

    Rayzer

    Joined:
    Nov 25, 2011
    Posts:
    2
    Is anyone aware of where the author is, or how to contact him? Spent 50 buks on this, and no documentation, no contact/support email, no answer to a basic question - how to delete existing tile?
     
    Last edited: Nov 25, 2011
  36. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    Hi Rayzer,

    There should be a text file with documentation included. Let me know if it's not there for you.
    There's a contact button on my website ( www.mudloop.com ).
    You can delete existing tiles by control-clicking.

    For some reason, the Unity forums didn't let me know about some of the posts here (edit: or the mails ended up in my spam box), so I may have missed some questions. I will go over this thread tomorrow to answer any unanswered questions.

    Thanks!
     
    Last edited: Nov 25, 2011
  37. Rayzer

    Rayzer

    Joined:
    Nov 25, 2011
    Posts:
    2
    Sorry for being so rough, somehow contact button leads to nowhere for me, probably because i don't have mail client, it would be great to add text version of email address on your site for such a horrible persons like me ))) Anyways thanks for a quick reply, not taking into account lack of documentation, you'r doing a great product ;)
     
  38. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    The reason I don't have my email in plain text on the site is to avoid spam. I will consider a contact form though.



    Tiles can only be placed in the grid.


    I will put this on my list.

    I have an update ready that I should have released a while ago, but I need to update the documentation, and I had some tight deadlines that kept me from doing so. But I should have time for UniTile next week.
     
  39. MetaMythril

    MetaMythril

    Joined:
    May 5, 2010
    Posts:
    150
    Thanks for the update! I appreciate the work you are doing! Looking forward to future updates! :)
     
  40. mojtaba64

    mojtaba64

    Joined:
    Aug 3, 2010
    Posts:
    56
    Hi,

    I think there is a problem when you need to use textures with "Tile Border".
    I created a 960*960 texture with 30*30 tile and recreate a 1024*1024 from it with "Texture Padder" ( new one has 30*30 tile size with 1 pixel tile border... ) ( I min-max Unity to update new texture... )
    I set the settings in "Layer Properties" : Tile Size 30 30, Tile Border Size : 1 1 ... etc ... then Rebuild Map...
    When I Select a tile in tile viewer it is Ok but when i use it in editor it use other UVs ...

    with smaller texture like 256*256 , 512*512 , 962*962 it works without problem but with 992*992 and 1024*1024 it does not work correctly...

    you can try it yourself!

    http://i42.tinypic.com/r6zt36.png

    I really need this to be fixed, please fix !

    Thanks
     
  41. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    Hi,

    Is it possible to mail me a test project? sven at mudloop dot com. Thanks!
     
  42. mojtaba64

    mojtaba64

    Joined:
    Aug 3, 2010
    Posts:
    56
    I've just sent it,

    Thanks
     
  43. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    Does anyone want to try out the RC for UniTile v1.3? (Customers only :))
    Lots of new features, including tile rotation/flipping, changing tiles at runtime, and a whole bunch of usability improvements and bugfixes.
     
  44. mojtaba64

    mojtaba64

    Joined:
    Aug 3, 2010
    Posts:
    56
    thank you...

    your support is great
     
  45. MetaMythril

    MetaMythril

    Joined:
    May 5, 2010
    Posts:
    150
    I would definitely be interested in trying out the latest changes! Glad to see the addition for tile rotation/flipping! :)

    Also quick question. When I move around in a scene with my tiled objects, I notice gaps between the tiles every so often while moving, is there something I can do to eliminate or at least minimize that? Thanks!
     
    Last edited: Jan 17, 2012
  46. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    Send me an email to sven at mudloop dot com and I'll hook you up.

    As for the gaps, you can solve that by setting the tile overlap to a small value (start with 0.5, but it depends on your setup and it takes some experimentation).
    If you can't figure it out, mail me a sample project and I'll do it for you.
     
  47. MetaMythril

    MetaMythril

    Joined:
    May 5, 2010
    Posts:
    150
    Thanks! I'll send you that email and try out that suggestion.
     
  48. Tab

    Tab

    Joined:
    May 13, 2011
    Posts:
    7
    Do you have any more recent videos for this? The video is a year old now and after reading through the thread I've seen you've updated it a few times. However, you never got around to updating the actual list (here, or on your site) to include rotating tiles for example.
     
  49. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    Thanks for your interest. The version with the rotating tiles have not been released yet. It's almost complete, but a few testers found some bugs, and I've been tied up with another project. Luckily that project should be done this week, and I'll have time to finish the update, and hopefully create a new video soon.
     
  50. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    Hi Mudloop,
    I am wondering if the tilemaps support 3D space. What I mean is, can I pace my background, 2D tileMap at z = -30, and my foreground at z = 0? The reason being is I would like to create a parallax.



    Thanks.