Dark Theme

Click here for InteliMap on the Unity Asset Store



Description

InteliMap is the tool for you to use if you are looking to improve your 2D map design workflow, or if you want to create stunning AI generated tilemaps. It's main features are editor tools for you to easily and quickly create entire environments that look handcrafted, it also includes tools for highly performant runtime generation.

InteliMap supports any 2D tilemap, allowing you to simply use any tilemap you desire and start creating quicky, no coding required! Designed to be as simple and hassle-free as possible, this is sure to be the ideal asset for your game.

Features:

Includes third-party tilemap assets. All third-party assets used are public domain. More information can be found in the Third-Party Notices.txt file in the package.

Links

Guides

This quick start guide is intended to get you using InteliMap AI Tilemap Generator as quickly as possible. If you'd like to learn more please watch the advanced guide as well, thank you!

This advanced guide will teach you many tips and tricks of InteliMap. It includes information on all the different settings, how to resolve common issues, and how to use the API to create your own runtime generation behaviour.

Trailers

How to Build A Generator

InteliMap works using a system of builders and generators. First a builder analyzes some example environment, then it produces a generator that can generate environments just like what the builder analyzed.

To begin this process first make sure you have added a tilemap to your scene, and created an example map using a tile palette of your choice (this is done exactly the same as in vanilla Unity, if you would like to learn how, watch the beginning of the Quick Start Guide). Next you'll want to add an IntelliMapBuilder component to any object in your scene. Now you'll need to add the example tilemap as a BuildMap for the builder, there are two ways to do this.

  1. On the left side of the scene view there will be a tool bar. When you have selected an object with an IntelliMapBuilder component, there will a tool with a hammer icon. Simply selecting that tool and dragging a box over the example map will add that area to the builders build maps.
  2. Clicking the plus icon on the build maps list will add a new build map. On the new entry you can select the map layers and bounds you would like to use. You can add multiple layers to build a multi-layered tilemap.

After you added all your build maps, you can simply click Build Generator on the builder. This may take a short time, but once it is done it will have produced an InteliMapGenerator component, this is what can actually produce the generation. To get started generating, you have three options.

  1. On the left side of the scene view there will be a tool bar. When you have selected an object with an IntelliMapGenerator component, there will be a tool with a map icon. Simply selecting that tool and dragging a box over the area you would like to generate will generate in that area.
  2. The InteliMapGenerator component includes a few buttons that will cause it to instantly generate at that generators boundsToFill. Change the bounds to whatever you would like, then hit the Generate button.
  3. You can also generate during runtime, this can be done either on scene start, or however else you like according to your custom runtime behaviours. You can read more about runtime generation in section 4.

Runtime Generation

On Start

By default, InteliMapGenerator's generateOnStart property is set to true. This means that if that InteliMapGenerator component is enabled. Then upon the scene starting (MonoBehaviour.Start), the area corresponding to that components boundsToFill and areaToFill will be generated.

How to Create Custom Runtime Behaviour

If you need more functionality than just generating on start, you will need to interact with the InteliMapGenerator through a script. In this short step by step guide you will learn how to create your own custom runtime generation behaviour with InteliMap.

Step 1: First create the component you wish to use to control this runtime generation. To do this right click on the assets panel, then Create > C# Script. This script will be responsible for controlling, in this example I'll be naming this script RuntimeExample. All of InteliMaps code is under the InteliMap namespace, thus you must should put using InteliMap; at the top of your project. At the end of step one your script should look like this (extra comments have also been included):

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using InteliMap; // needed to interact with InteliMapGenerator

public class RuntimeExample : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
    
    }

    // Update is called once per frame
    void Update()
    {
    
    }
}

Step 2: Next you'll need to be able to interact with an InteliMapGenerator. To do this add a public InteliMapGenerator variable, this will allow you to set your generator through the inspector. Now to generate you will want to call the StartGeneration() method of that generator (if you want seeded generation, you can use the StartGenerationWithSeed(int seed) method).

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using InteliMap; // needed to interact with InteliMapGenerator

public class RuntimeExample : MonoBehaviour
{
    public InteliMapGenerator generator; // the generator to use for runtime generation

    // Start is called before the first frame update
    void Start()
    {
        generator.StartGeneration(); // starts the generator upon Start
        // generator.StartGenerationWithSeed(1234); // also for generating with a seed
    }

    // Update is called once per frame
    void Update()
    {

    }
}

Step 3: Now that you have the basic generation working, you can do anything you'd like with the generator by moving its boundsToFill property and then calling StartGeneration. For example, if you wanted to make a side scrolling environment, you could you could incrementally move the boundsToFill's position to the right, and then call generate. One thing to note is to make sure the bounds overlap with what is already placed, if there is no overlap then the generator will not bother to meaningfully connect the tiles and you will end up with rough boundaries between the generated areas.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using InteliMap; // needed to interact with InteliMapGenerator

public class RuntimeExample : MonoBehaviour
{
    public InteliMapGenerator generator; // the generator to use for runtime generation

    public int chunkSize = 16;
    public float timePerChunk = 1.0f;

    // Start is called before the first frame update
    void Start()
    {
        generator.StartGeneration(); // starts the generator upon Start
        // generator.StartGenerationWithSeed(1234); // also for generating with a seed

        // Set the generators bounds to fill size to match the chunk size (+1 to ensure an overlap)
        generator.boundsToFill.size = new Vector3Int(chunkSize + 1, generator.boundsToFill.size.y, generator.boundsToFill.size.z);
    }

    // Update is called once per frame
    void Update()
    {
        // Increase the timer
        timer += Time.deltaTime;

        if (timer > timePerChunk)
        {
            // Reset the timer
            timer = 0.0f;

            // Tell the generator to generate
            generator.StartGeneration();

            // Move the generators position to the right
            generator.boundsToFill.position += new Vector3Int(chunkSize, 0, 0);
        }
    }
}

v1.1 Update

Multi-layered Tilemaps

InteliMap version 1.1 introduced support for multi-layered tilemaps. This means that you can now build and generate multi layers at once, and each layer will interact with and influence each other. For example: you can now design a portion of one layer, then generating in that area will fill in all the layers, based on what you designed. The multiple layers also have strongly enforced connections, meaning that if a connection doesn't appear in one of the build maps, it will never appear in one of the generated maps. For example: if a tree tile never appears on top of water in any of the build maps, then a tree tile will never be placed in the generated area.

How to Build and Generate Multi-layered Tilemaps

The process to build and generate multi-layered tilemaps is nearly identical to the process for single-layered tilemaps. To build, open up the build maps property of the InteliMapBuilder, then input multiple layers into the mapLayers property of each build map. All build maps should have the same number of layers. The ordering of the layers also matters, all build maps should have their layers ordered in the same way, or else you may encounter tiles generating on layers you don't expect. To generate mutli-layered tilemaps, make sure to include the appropriate amount of tilemaps in the mapToFill property of the InteliMapGenerator. I.e., if the generator was built with 2 layers, the mapToFill must include 2 tilemaps.

Updating a Generator from v1.0 to v1.1

If you built a generator prior to v1.1, you may find that attempting to generate with it, now produces errors. This is because v1.1 uses a different system for storing unique tiles compared to v1.0. If you don't want to retrain a new generator, you are able to update a generator to v1.1 assuming you haven't changed any of the build maps. To update the generator, ensure that generator is on the same object as the builder. Then select LoadFromGenerator as the build mode, and set epochs to 0. Building will update the unique tiles and connection information, without retraining the generator.

v1.2 Update

Hexagonal Tilemaps

InteliMap version 1.2 introduced support for hexagonal tilemaps. In order to correctly build a generator for a hexagonal tilemap, you must make sure the connectivity settings under the advanced settings for the InteliMapBuilder is set to Connectivity.Hexagonal. One other thing to note is that when you are creating a flat topped hexagonal tilemap, the grid is actually oriented such that positive y is to the right and positive x is up. For example, look at example scene 8, enforceBorderConnectivity is set to true for left and right, however due to how the directions are changed, it is actually enforcing border connectivity up and down. However for pointed top tilemaps, it is oriented normally.

Script Reference

Everything in InteliMap is under the InteliMap namespace.

Major Objects

InteliMapBuilder

Used for building InteliMapGenerators, which can be used to create AI generated tilemaps. Intended to be used while creating your scene, then removed before release. You can build during runtime, however it is not recommended due to the sometimes long build times.

public class InteliMapBuilder : MonoBehaviour

InteliMapGenerator

Used to create AI generated tilemaps, can be used in the editor or at runtime.

public class InteliMapGenerator : MonoBehaviour

Minor Objects

GeneratorBuildResult

An enumerator of the result code of the most recent build from an InteliMapBuilder.

public enum GeneratorBuildResult

BuildMode

An enumerator that dictates what mode to use while building a generator.

public enum BuildMode

DirectionalBools

A struct that allows storing four bools that correspond to the four orthogonal directions.

public struct DirectionalBools

GeneratorMap

A single entry in the InteliMapBuilder's build maps.

public class GeneratorMap

InteliMapBuilderAdvanced

The advanced settings for the InteliMapBuilder component.

public class InteliMapBuilderAdvanced

Connectivity

An enum dictating how to enforce which tiles can connect to which other tiles. Four way connectivity (Connectivity.FourWay) means only the orthogonal connections are enforced, eight way (Connectivity.EightWay) means diagonal connections are also enforced. Hexagonal connectivity (Connectivity.Hexagonal) should be used on hexagonal grids.

public enum Connectivity

Contact Information

If you have any questions or inquires please email intelimapai@gmail.com.