Search Unity

2D Isometric Tile Editor

Discussion in 'Works In Progress - Archive' started by tedlin01, Feb 22, 2015.

  1. tedlin01

    tedlin01

    Joined:
    Mar 7, 2013
    Posts:
    23
    Hi, I have been working on an Isometric Tile Editor for a while now and I thought it might be interesting for other people who are creating Isometric Tilebased games (Starcraft, Warcraft, Transport Tycoon Deluxe, etc etc) to follow this.

    Part 1 - Massive amount of objects
    I know that Unity isn't very good at handling massive amounts of objects. I'm not sure how many GameObjects it can handle but at best its about 64k? That would also result in a massive load-time and lagspikes in and outside the editor when working with them. The size of the level would also be tremendous.

    I managed to create a custom rendering system of induvidual objects that can handle a huge amount of objects.

    In this example I have a grid of 1024 * 1024 objects. That's a total of 1 048 576 objects. Each object is an individual and can be treated so. All objects have a bounding box and can be selected and deleted.



    As you can see I have 328 FPS. 1855 objects is visible, meaning that 1 046 721 gets culled. I can move the camera around, zoom in and out and it works just fine so the culling algorithm is working each update.





    The loading time is about 2 seconds and the size of the level is about 29 megabytes . This might seem much but remember that it's over a million individual objects and it's still room for optimization.

    Other things that I am working on:
    - A terrain brush to paint/delete a big amount of objects at the time, including AABB collission testing.
    - Automatic depthsorting in several layers.
    - Pathfinding with up to 4 connections per tile.
    - Easy assetmanagement.
    - Animated objects.
    - An example game, I will recreate one of my favourite games which is Transport Tycoon Deluxe.

    Would anyone else be interesting in the use of this?
    What features would be desirable?
     
    Last edited: Feb 22, 2015
    ZeroPAiN, Extra and EliasMasche like this.
  2. tedlin01

    tedlin01

    Joined:
    Mar 7, 2013
    Posts:
    23
    Part 2 - Painting terrain



    Start with selecting an brush. You can then select the size of the brush. Everything from 1x1 to 20x20 (400 tiles). Still at 400 tiles everything will run very smoothly. While painting, a collission test is made towards all previously placed tiles so that none will be placed on top of another. The math is handling all the snapping and makes sure that the isometric placement is very easy. Even when 1 million tiles is placed on the map, everything will run smoothly.
     
    ZeroPAiN, Extra and EliasMasche like this.
  3. tedlin01

    tedlin01

    Joined:
    Mar 7, 2013
    Posts:
    23
    Part 3 - Depthsorting

    Here is a demostration of depthsorting in action. All objects is sorted using an algorithm following these steps:
    1. Find the tile most to the left in world-space on the object.
    2. Recalulcate that tiles World space position to Isometric space position.
    3. Calculate the depth by adding the x and y value together (depth = isometric_position.x + isometric_position.y)



    In this video I demostrate how well this works.

     
    -Singularity-, ZeroPAiN and Extra like this.
  4. tedlin01

    tedlin01

    Joined:
    Mar 7, 2013
    Posts:
    23
    Part 4 - Pathfinding

    This is how pathfinding will work. When an object is to be added to the set of available objects, each tile will be allowed to have 4 path-connectons. One in each direction. In this movie I am demostration an example when this is useful. In this case we are adding road-tileds to the scene. Some roads are straight, but some are crossroads and in the future we might have corners as well. In the "add tileobject tool" I am enabling and disabling the nodes so that the system will know how to connect them to other objects.

     
    -Singularity-, ZeroPAiN and Extra like this.
  5. Extra

    Extra

    Joined:
    Feb 13, 2015
    Posts:
    3
    I am working on something similar and i must admit your work seems absolutely great. Would love to see a release :)
     
  6. tedlin01

    tedlin01

    Joined:
    Mar 7, 2013
    Posts:
    23
    Hello Extra!

    That's great to hear. Are you working on a 2D Isometric editor or are you planning to create an 2D isometric game?
    I am hoping to have a beta out by a week or two.

    Cheers!
     
  7. Extra

    Extra

    Joined:
    Feb 13, 2015
    Posts:
    3
    Hi Tedlin,

    I am working on a Isometric Tile Editor, but in a far less advanced state as I am quite a beginner in game development.
    When it will be ready, my goal is to make an adventure game, but I am focusing on learning technical things right now.

    I am very curious to see how you managed to optimize performances. My guess is that you avoid having one gameobject per tile. Maybe using planes ? But I can't find a way to manage z-sorting when working on a single plane with vertices.

    Anyway, keep up the good work, and if you need someone to test it, I am definitely your man ;)
     
    tedlin01 likes this.
  8. ZeroPAiN

    ZeroPAiN

    Joined:
    Mar 5, 2015
    Posts:
    2
    No way - I just decided with a buddy of mine that we were gonna work on making an isometric turn-based game, this looks marvelous - you mentioned that you'd like to have a public version of it released soon. Any goals?
     
    tedlin01 likes this.
  9. tedlin01

    tedlin01

    Joined:
    Mar 7, 2013
    Posts:
    23
    That sounds great! Hopefully I can have e beta ready after this weekend :)
     
  10. Stonewood1612

    Stonewood1612

    Joined:
    Sep 15, 2014
    Posts:
    32
    Very nice. One of the types of games I want to create at some point is an isometric city-builder, with the graphics style of TTD. And this is exactly what I could use for that.
     
    tedlin01 likes this.
  11. Gamingbir

    Gamingbir

    Joined:
    Apr 1, 2014
    Posts:
    195
    i would love to see something like this for unity. Unity should have a default built in tool like this T_T
     
    tedlin01 likes this.
  12. tedlin01

    tedlin01

    Joined:
    Mar 7, 2013
    Posts:
    23
    I have been working hard but I still think it's too early for a beta. There is still some matters to take care of but I'll keep updating to let you know of the progress. Here is a demo of how I created a Transport Tycoon -like game using the tile editor. More to come!

     
    Last edited: Mar 11, 2015
    -Singularity-, T-Naka and Gamingbir like this.
  13. Gamingbir

    Gamingbir

    Joined:
    Apr 1, 2014
    Posts:
    195
    may i use it :D . Give it already xD
     
  14. Stonewood1612

    Stonewood1612

    Joined:
    Sep 15, 2014
    Posts:
    32
    Have you thought about supporting a transition system for using transition tiles to blend two different textures? Like in Warcraft 3 or what this asset does for Unity terrains.

    I guess you could paint them manually with the current system you have, but that would be pretty time consuming.
     
  15. tedlin01

    tedlin01

    Joined:
    Mar 7, 2013
    Posts:
    23
    Everything is possible in the future but it was nothing that I had previously planned for.
     
  16. T-Naka

    T-Naka

    Joined:
    Jan 13, 2015
    Posts:
    2
    I really want this!
     
  17. tedlin01

    tedlin01

    Joined:
    Mar 7, 2013
    Posts:
    23
    That is great. I am accually wrapping up a beta as we speak. It will be far from perfect and missing out on alot of documentation but atleast you guys will have a chance to try it out and contribute to the development of it :)
     
    T-Naka likes this.
  18. T-Naka

    T-Naka

    Joined:
    Jan 13, 2015
    Posts:
    2
    Wow! That's great:)
    I can't wait to use this Editor!
     
  19. MickM

    MickM

    Joined:
    Nov 19, 2012
    Posts:
    166
    With your pathfinding setup, is it possible to have different path 'layers' defined per tile?
    ie. the road demo is great for vehicles but you might want a separate navigation graph for dismounted movement.
     
  20. tedlin01

    tedlin01

    Joined:
    Mar 7, 2013
    Posts:
    23
    This was planned in the original roadmap and I started to implement it but then I removed it as I wanted to keep things simple at the beginning. I can easily implement this though. You want it?
     
  21. tedlin01

    tedlin01

    Joined:
    Mar 7, 2013
    Posts:
    23
    Okey. Here we are: http://tedlindstrom.se/2DITAlpha1.unitypackage

    This is an early alpha so there is still alot of features missing, no documentation and bugs will be encountered so please be patient. My plans is to keep working on it and release this on the asset store in the future. but for now, enjoy it for free.:)

    Have a look at the OpenTTD example that comes with the package to learn how to use it.

    Cheers!
     
  22. Extra

    Extra

    Joined:
    Feb 13, 2015
    Posts:
    3
    Hi there,

    I have been testing your work on Unity 5 lately.
    Any news on this, any new Beta ?
    The process of converting it to Unity 5 is not perfect, there is bugs in the editor Window.
    Well, I'll keep looking for any news about your work ;)
     
  23. MickM

    MickM

    Joined:
    Nov 19, 2012
    Posts:
    166
    Sorry for the delay - I think this would be a great option. Even something like a separate pathfinding object where we can define pathing layers so when you are setting up the pathfinding as per the video you can specify the movement cost for each direction by layer.

    Love the look of it - A bit snowed under at the moment but will check it out when I get a chance!
     
  24. freeflyShaw

    freeflyShaw

    Joined:
    Aug 2, 2015
    Posts:
    1
    Is there a free version of the latest version? Or a paid version on the asset store?