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

TerraTiler2D

Discussion in 'Assets and Asset Store' started by SCPrototype, Jun 23, 2021.

  1. SCPrototype

    SCPrototype

    Joined:
    Nov 4, 2013
    Posts:
    6
    The official forums of TerraTiler2D, the procedural 2D world generation tool soon to be available on the Unity Asset store.
     
  2. SCPrototype

    SCPrototype

    Joined:
    Nov 4, 2013
    Posts:
    6
    LaunchAnnouncement_Reddit.png
    TerraTiler2D is now officially available on the Unity Asset store!

    Check it out here: https://assetstore.unity.com/packages/tools/terrain/terratiler2d-198030

    TerraTiler2D is a visual scripting Unity extension that assists developers in the procedural generation of 2D game worlds during runtime.

    Documentation | Roadmap | Unity Forums | Discord | Twitter

    Description
    TerraTiler2D makes use of a node-graph UI system to define the procedural generation of worlds, and has over 120 different nodes to help users create exactly what they envision, including 4 different noisemap generators, and 6 different tile placing algorithms.

    All of these nodes have extensive documentation describing their functionality and purpose available on the documentation website.

    Features

    - Intuitive visual scripting node-graph UI

    - Workflow is contained in one editor window

    - Over 120 different nodes with in-editor tooltips, and online documentation

    - Execute graphs during runtime

    - Change property values during runtime

    - Save and load graph states during runtime. Perfect for roguelikes with unlockable content.

    - Create custom nodes

    - Demo scenes

    - Basic tools to help designers get from nothing to a working game

    - Assign unique behaviours to every tile
     
  3. manpower13

    manpower13

    Joined:
    Dec 22, 2013
    Posts:
    140
    Looks nice! Neat use of nodes.

    I saw some nodes with randomization values, is it possible to set either a global seed or a per-node seed such that results are reproducible?
     
  4. SCPrototype

    SCPrototype

    Joined:
    Nov 4, 2013
    Posts:
    6
    Thanks for the kind words!

    As for your question, yes! There is a 'Set Seed' node, which will apply a global seed to the graph so that it will produce the same result every time.
     
  5. SCPrototype

    SCPrototype

    Joined:
    Nov 4, 2013
    Posts:
    6
    Version 1.1.0
    TerraTiler2D version 1.1.0 is now available on the Unity Asset store!

    This update brings a number of awesome new features, such as tilemap support, and the ability to spread out the workload of graphs over multiple frames, allowing you to generate larger worlds.

    For more information head over to the documentation website, or read the full changelog below.

    TerraTiler2D_1_1_0_UpdateAnnouncement_1920x1080.png

    1.1.0 Changelog
    New features


    ◾️ TerraTiler2D now uses Tilemaps instead of GameObjects for its generation. You can still use GameObjects, but you will have to instantiate them through the Tilemap system.

    ◾️ Implemented a PauseBetweenNodes option, which inserts a 1 frame pause between nodes. This allows TerraTiler2D to create larger worlds, since it won't try to jam everything into 1 frame and crash the Unity Editor.

    ◾️ New node: Merge Tile Layers

    ◾️ Added a Stop Graph button to the toolbar.

    ◾️ Added a Report Bug button. If you encounter any bugs or unexpected errors, please inform me about them so I can fix them.

    ◾️ Implemented a GraphDataToolVersionManager, which will try to automatically upgrade any existing GraphData objects when a newer version of TerraTiler2D gets installed.

    ▪️ NOTE: Version 1.0.0 of TerraTiler2D did not have this feature yet, so old GraphData objects are not compatible with version 1.1.0. This will not be the case for future updates, as there is now an update framework to build upon.


    Improvements
    ◾️ Increased the default max world size to 500.

    ◾️ Added a Position port to the Perlin and Value noisemap nodes, making it a lot easier to take connecting samples of a seeded noisemap.

    ◾️ Added a Position port to the AddLayerToWorld node, making it easier to generate a world consisting of smaller chunks.

    ◾️ Reversed the TileLayer Z Index on AddLayerToWorld nodes. A higher Z index is now placed on top of lower index layers.

    ◾️ Added a 'uniqueGuidExtension' parameter to the Port constructor, which makes saving and loading their data from GraphData objects more consistent.

    ◾️ SetSeed node now uses 'System.DateTime.Now.Ticks' instead of 'Random.Range(int.MinValue, int.MaxValue)' as the default value, meaning that it can be used to produce randomized results in an otherwise seeded graph (before, it would always produce the same random number if the graph was seeded, so Random.Range basically did nothing).

    ◾️ Node previews now use ScaleToFit instead of StretchToFill, meaning you will always be able to see the entire preview at the correct ratio.

    ◾️ Greatly improved user feedback about everything TerraTiler2D does, or fails to do, and why. The DebugLevel setting controls how many debugs from TerraTiler2D you will see, with the choice between None, User, Low, Medium, High, and All.


    Fixes
    ◾️ Blackboard properties no longer duplicate when loading a different GraphData object that has properties with the same name and type.

    ◾️ GraphData properties no longer persistently change their values when loading a GraphData save file in the Unity Editor.

    ◾️ Tiles now use the center of their (default) sprite as preview in graphs (used the bottom left corner before). This should more often prevent tiles from having no preview color due to having transparency.

    ◾️ Fixed a stretching issue with previews that occured when the LayerSize was larger than MaxWorldSize.

    ◾️ Previews now correctly display Sprites that have a Color other than white.

    ◾️ Made the demos frame-rate independent.

    ◾️ Unsaved changes pop-up no longer appears after every recompile.

    ◾️ Unity should no longer crash upon trying to load a custom layout that contains the TerraTiler2D window.

    ◾️ Ports with a field should now correctly get disabled upon being connected.

    ◾️ A duplicated GraphData object no longer gets overwritten when the original GraphData object gets saved due to sharing the same GUID.

    ◾️ Vector to Vector nodes no longer throw an 'invalid cast' error.

    ◾️ The A* Pathfinder node no longer uses a random starting and end point within the shapes, and instead calculates the closest starting and end points.

    ◾️ Pathfinding nodes no longer try to avoid the shapes they are trying to connect.

    ◾️ Texture2D nodes and properties no longer lose their reference upon reopening Unity. Texture2D objects should now be placed in the Resources folder.

    ◾️ The first graph loaded after opening Unity no longer loads on top of the TempGraphData.

    ◾️ Opening the TerraTiler2D window using the toolbar no longer causes incorrect property node names.

    ◾️ Edges that were disconnected due to another edge being connected no longer get reconnected upon recompiling.

    ◾️ If a graph fails to complete due to an error, it will no longer throw 'Infinite loop detected' errors during future graph executions.
     
  6. valentinwinkelmann

    valentinwinkelmann

    Joined:
    Nov 3, 2014
    Posts:
    188
    Wow the asset looks damn good and maybe exactly what I've been hoping for for a very long time. Before I buy it a couple questions:
    1. are there ways to spawn objects, like trees on the surface and mushrooms in caves or treasure chests in certain other areas? ( Like in Terraria )
    2. is it possible to work with several tile levels, for example: a foreground and a background level. ( Like in Terraria )?
    3. you write in the changelog "Increased the default max world size to 500." Does that mean a world can only consist of 500x500 tiles? That sounds pretty small for a sandbox game.
     
  7. SCPrototype

    SCPrototype

    Joined:
    Nov 4, 2013
    Posts:
    6
    Hey Valentin, thanks for your interest in TerraTiler2D!
    1. Although there are ways to achieve it, spawning objects on specific positions is not inherently possible in TerraTiler2D. Defining spawn locations based on Y-position or biome is easily done using masking, but placing objects in realistic positions is too difficult (like a 'tree object' that spawns 'on top of a grass tile', or a 'chest object' that requires '2 tiles directly below it'). There are too many possible criteria for such things that it is not realistic for me to implement a uniform way of doing this.
      For a Terraria-like world the best approach would be to use TerraTiler2D to generate a world consisting of an overworld, caves, and biomes, and then doing a second pass with your own code to populate that world with things like trees, chests, pots, etc.
    2. Yes! TerraTiler2D calls these TileLayers. For each TileLayer you can define a Z-index and a collision layer, so you could have one TileLayer at Z-index 1 with full collision, and a second TileLayer at Z-index 0 with no collision to act as a background.
    3. There is indeed a limit of 500x500 tiles per Graph that gets executed, as generating bigger worlds will cause too big of a performance hit for Unity to handle, causing it to crash often.
      This does however not mean that your worlds have to be limited to 500x500! By using a seed you can generate the same world every time, but by feeding it a different offset you could generate multiple chunks of 500x500 tiles that can be connected seamlessly.
    I hope that answers your questions :)