# Map Graph – Node-based Random Map Generation

**URL:** https://discussions.unity.com/t/map-graph-node-based-random-map-generation/802981
**Category:** Community Showcases
**Tags:** Asset-Store-Assets
**Created:** [August 3, 2020, 3:44pm UTC](https://discussions.unity.com/t/map-graph-node-based-random-map-generation/802981 "2020-08-03T15:44:24Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![InScatterbrain](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/inscatterbrain/32/896884_2.png) [@InScatterbrain](https://discussions.unity.com/u/InScatterbrain)
#### Post date: [August 3, 2020, 3:44pm UTC](https://discussions.unity.com/t/map-graph-node-based-random-map-generation/802981/1 "2020-08-03T15:44:24Z")

</div>

**Map Graph** is _the_ plugin for all of your level generation needs.

Map Graph is more than a procedural level generator. It doesn’t just provide you with a single level generation solution, with limited customization options. Instead Map Graph offers you the tools to easily create your own level generators, opening up a wide range of customizations and enabling you to create **your own**  **unique level generators,** that perfectly suit the needs of your own unique game.

[Map Graph is now available on the Asset Store!](http://u3d.as/202S)

[WebGL: Demo Project](https://insane-scatterbrain.itch.io/map-graph-demo-project)

**[https://www.youtube.com/watch?v=Kr1NIlCQiTE](https://www.youtube.com/watch?v=Kr1NIlCQiTE)**

![](https://europe1.discourse-cdn.com/unity/original/4X/d/8/a/d8a66a73557482dcabb3bd3862dd2bda928727a4.gif)

️\_\_ **Features** \_\_

• The **visual node-based editor** makes it easy to create your own level generators by dragging, dropping and connecting nodes. **No coding required.**

• **Preview images** show the result of each node, allowing you to easily see what’s happening and to make quick adjustments, so you end up with the exact level generator you need.

• With over a **100 different nodes** at your disposal, you can completely customize your level generators.

• Generate levels **in the editor** or at **runtime**.

• Generate **game objects from prefabs** or **tilemaps**.

• Create your own reusable **subgraphs**.

• Includes a [**sample project** consisting of **16 examples**](https://insane-scatterbrain.itch.io/map-graph-demo-project) **.**

• Includes [**extensive documentation**](https://mapgraph.insanescatterbrain.com/manual/getting_started.html), containing [tutorials](https://mapgraph.insanescatterbrain.com/manual/creating_your_first_map_graph.html), [a complete node index](https://mapgraph.insanescatterbrain.com/nodes.html) and [API reference](https://mapgraph.insanescatterbrain.com/api/InsaneScatterbrain.html).

**Features for coders**

• **Easy to use API** , to generate maps from scripts.

• **Easily**  **extendable** by writing your **own custom nodes**.

• **Source code** included.

![](https://europe1.discourse-cdn.com/unity/original/4X/8/9/d/89d27711a13eeec03467010d65b24710066cf5e1.gif)

[Map Graph is available here on the Asset Store!](http://u3d.as/202S)

---

<div class="post-metadata">

### Author: ![InScatterbrain](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/inscatterbrain/32/896884_2.png) [@InScatterbrain](https://discussions.unity.com/u/InScatterbrain)
#### Post date: [August 7, 2020, 3:11pm UTC](https://discussions.unity.com/t/map-graph-node-based-random-map-generation/802981/2 "2020-08-07T15:11:01Z")

</div>

Here’s a new map generator I made with Map Graph. It generates world maps in the style of a treasure map. Though I can feed it any set of sprites I want. 🙂

![](https://europe1.discourse-cdn.com/unity/original/4X/8/c/0/8c0c2f4a374e690ff9441b4b704cddde45f66625.gif)

The tileset I used was created by Kenney. You can check it out here! → [Cartography Pack · Kenney](https://kenney.nl/assets/cartography-pack)

---

<div class="post-metadata">

### Author: ![InScatterbrain](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/inscatterbrain/32/896884_2.png) [@InScatterbrain](https://discussions.unity.com/u/InScatterbrain)
#### Post date: [August 14, 2020, 2:42pm UTC](https://discussions.unity.com/t/map-graph-node-based-random-map-generation/802981/3 "2020-08-14T14:42:30Z")

</div>

Here’s another generator I made with Map Graph. This one generates cave-like dungeons. 🙂

![](https://europe1.discourse-cdn.com/unity/original/4X/6/4/4/64472da9824620ab40eeaff0931b3cc18888b967.gif)

The tileset was made by Buch and can be found here: [A blocky dungeon | OpenGameArt.org](https://opengameart.org/content/a-blocky-dungeon)

---

<div class="post-metadata">

### Author: ![InScatterbrain](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/inscatterbrain/32/896884_2.png) [@InScatterbrain](https://discussions.unity.com/u/InScatterbrain)
#### Post date: [August 21, 2020, 8:28pm UTC](https://discussions.unity.com/t/map-graph-node-based-random-map-generation/802981/4 "2020-08-21T20:28:14Z")

</div>

This one generates a little village and some surrounding forest and farmland.

![](https://europe1.discourse-cdn.com/unity/original/4X/e/3/5/e3542882252078f31d4057dd7d20a593a459d4d7.gif)

This tileset was made by ArMM1998. Check it out here! → [Zelda-like tilesets and sprites | OpenGameArt.org](https://opengameart.org/content/zelda-like-tilesets-and-sprites)

---

<div class="post-metadata">

### Author: ![InScatterbrain](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/inscatterbrain/32/896884_2.png) [@InScatterbrain](https://discussions.unity.com/u/InScatterbrain)
#### Post date: [August 22, 2020, 6:57pm UTC](https://discussions.unity.com/t/map-graph-node-based-random-map-generation/802981/5 "2020-08-22T18:57:03Z")

</div>

I wanted to make something that’s a little different this time, so I created a starmap generator.

![](https://europe1.discourse-cdn.com/unity/original/4X/1/9/a/19a3a20d561c5a7458ad0db6acbab32243436e56.gif)

Graphics were made by Rawdanitsu and Kenney.

You can find them here:

> **[Planets and stars set (high-res)](https://opengameart.org/content/planets-and-stars-set-high-res)**
>
> Some planets and stars in ~1350 resolution. 

> **[Particle Pack (80+ sprites)](https://opengameart.org/content/particle-pack-80-sprites)**
>
> This package includes 80 sprites for particles, light cookies and shaders. Also includes a Unity package with particle effect samples (fire, smoke, magic, hearts, sparks and electricity). Files: Separate PNG files (80×) Tilesheet(s) Vector file(s)...

---

<div class="post-metadata">

### Author: ![InScatterbrain](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/inscatterbrain/32/896884_2.png) [@InScatterbrain](https://discussions.unity.com/u/InScatterbrain)
#### Post date: [September 4, 2020, 4:20pm UTC](https://discussions.unity.com/t/map-graph-node-based-random-map-generation/802981/6 "2020-09-04T16:20:27Z")

</div>

I turned the examples into a demo project that will be included with the asset as example material. 🙂

You check it out a WebGL build of it here: [Map Graph - Demo Project by Insane Scatterbrain](https://insane-scatterbrain.itch.io/map-graph-demo-project)

---

<div class="post-metadata">

### Author: ![InScatterbrain](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/inscatterbrain/32/896884_2.png) [@InScatterbrain](https://discussions.unity.com/u/InScatterbrain)
#### Post date: [October 16, 2020, 2:53pm UTC](https://discussions.unity.com/t/map-graph-node-based-random-map-generation/802981/7 "2020-10-16T14:53:18Z")

</div>

Map Graph’s first release is almost done! 😄

Please check out the feature showcase video!

[![](https://europe1.discourse-cdn.com/unity/original/4X/3/4/7/3474a235dfb0b17ce5ffb0227ac31f5952701f0a.jpeg "Map Graph - Showcase") ](https://www.youtube.com/watch?v=Kr1NIlCQiTE)

---

<div class="post-metadata">

### Author: ![InScatterbrain](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/inscatterbrain/32/896884_2.png) [@InScatterbrain](https://discussions.unity.com/u/InScatterbrain)
#### Post date: [October 28, 2020, 1:44pm UTC](https://discussions.unity.com/t/map-graph-node-based-random-map-generation/802981/8 "2020-10-28T13:44:50Z")

</div>

[Map Graph is now available on the asset store!](http://u3d.as/202S)

I’m doing a **50% off** release sale until 11/11/2020! 🙂

---

<div class="post-metadata">

### Author: ![Idealisers](https://avatars.discourse-cdn.com/v4/letter/i/e95f7d/32.png) [@Idealisers](https://discussions.unity.com/u/Idealisers)
#### Post date: [October 29, 2020, 8:33pm UTC](https://discussions.unity.com/t/map-graph-node-based-random-map-generation/802981/9 "2020-10-29T20:33:33Z")

</div>

Hi, I’m testing your asset for use in one of my games but I can’t seem to find out how to delete nodes in a graph? In your manual the key to press is also strikken through?  
I’m working a mac Catalina and using Unity 2020.1.11f1

![6471587--726392--GraphNodeDelete.png](https://europe1.discourse-cdn.com/unity/original/4X/0/0/d/00daa752fd4725af83a7a658604718e21efce3df.png)

---

<div class="post-metadata">

### Author: ![InScatterbrain](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/inscatterbrain/32/896884_2.png) [@InScatterbrain](https://discussions.unity.com/u/InScatterbrain)
#### Post date: [October 29, 2020, 8:49pm UTC](https://discussions.unity.com/t/map-graph-node-based-random-map-generation/802981/10 "2020-10-29T20:49:39Z")

</div>

> [@Idealisers](#):
>
> Hi, I’m testing your asset for use in one of my games but I can’t seem to find out how to delete nodes in a graph? In your manual the key to press is also strikken through?

Oh, that’s weird! It should say: “Press the **DEL** key on your keyboard.” I’ll fix that asap. Thanks for letting me know.

Sorry about that! Let me know if you need more help!

---

<div class="post-metadata">

### Author: ![Idealisers](https://avatars.discourse-cdn.com/v4/letter/i/e95f7d/32.png) [@Idealisers](https://discussions.unity.com/u/Idealisers)
#### Post date: [October 29, 2020, 10:50pm UTC](https://discussions.unity.com/t/map-graph-node-based-random-map-generation/802981/11 "2020-10-29T22:50:19Z")

</div>

> [@InScatterbrain](#):
>
> Oh, that’s weird! It should say: “Press the **DEL** key on your keyboard.” I’ll fix that asap. Thanks for letting me know.
> 
> Sorry about that! Let me know if you need more help!

Thanx for your quick answer!

I found out I needed to change my unity shortcuts for the delete key. The default forward delete key mapping doesn’t work on my mac which is weird since it works fine in all my other programs.

Now I can finally delete all those unused and un-deletable nodes 😉

---

<div class="post-metadata">

### Author: ![InScatterbrain](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/inscatterbrain/32/896884_2.png) [@InScatterbrain](https://discussions.unity.com/u/InScatterbrain)
#### Post date: [October 29, 2020, 11:05pm UTC](https://discussions.unity.com/t/map-graph-node-based-random-map-generation/802981/12 "2020-10-29T23:05:54Z")

</div>

> [@Idealisers](#):
>
> Thanx for your quick answer!
> 
> I found out I needed to change my unity shortcuts for the delete key. The default forward delete key mapping doesn’t work on my mac which is weird since it works fine in all my other programs.
> 
> Now I can finally delete all those unused and un-deletable nodes 😉

That sounds a bit inconvenient, I’ll see if I can bind both forward and backward delete, so both of those can be used to delete nodes. And I’ll add a Delete option in the context menu, in case all else fails. 😉

Thanks a lot for the feedback! I don’t own any Apple hardware so this is extra useful information for me. 🙂

---

<div class="post-metadata">

### Author: ![InScatterbrain](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/inscatterbrain/32/896884_2.png) [@InScatterbrain](https://discussions.unity.com/u/InScatterbrain)
#### Post date: [October 30, 2020, 12:19pm UTC](https://discussions.unity.com/t/map-graph-node-based-random-map-generation/802981/13 "2020-10-30T12:19:38Z")

</div>

The new version is online.

Both backspace and delete (I assumed those are the equivalent of forward and backward delete on a Mac ;)) will now delete selected nodes in the Map Graph editor. I also added a “Delete” option to the context menu that does the same thing.

I hope this makes it a bit more intuitive to delete stuff, especially on a Mac. 🙂

---

<div class="post-metadata">

### Author: ![spryx](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/spryx/32/507726_2.png) [@spryx](https://discussions.unity.com/u/spryx)
#### Post date: [October 30, 2020, 1:42pm UTC](https://discussions.unity.com/t/map-graph-node-based-random-map-generation/802981/14 "2020-10-30T13:42:49Z")

</div>

@InScatterbrain Hi, I am currently using [Karcero](https://github.com/odedw/karcero)for a RPG project i’m working on. It works well, but I had to adapt the system for use in my game and write wrappers/translators to do so. Do you think Map-Graph could be used to generate something like this? Asset looks really cool btw.

---

<div class="post-metadata">

### Author: ![InScatterbrain](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/inscatterbrain/32/896884_2.png) [@InScatterbrain](https://discussions.unity.com/u/InScatterbrain)
#### Post date: [October 30, 2020, 2:07pm UTC](https://discussions.unity.com/t/map-graph-node-based-random-map-generation/802981/15 "2020-10-30T14:07:14Z")

</div>

> [@spryx](#):
>
> @InScatterbrain Hi, I am currently using [Karcero](https://github.com/odedw/karcero)for a RPG project i’m working on. It works well, but I had to adapt the system for use in my game and write wrappers/translators to do so. Do you think Map-Graph could be used to generate something like this? Asset looks really cool btw.

I’m not familiar with how Karcero works exactly, but getting similar results is certainly possible!

In fact, I’ve used an earlier version of Map Graph to do something similar for a [game jam game I made with a friend of mine.](https://itslu.itch.io/guntlet)(It’s a 3D first person game, so it’s a bit hard to see the exact result, sorry 🙄)

In Map Graph the approach would be to use the BSP (Binary Space Partitioning) nodes to generate rooms in addition to nodes to connect those rooms together.

There isn’t an example that uses the BSP nodes included in the sample project yet (I will add one in the near future), but I’ll gladly help you set things up!

---

<div class="post-metadata">

### Author: ![InScatterbrain](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/inscatterbrain/32/896884_2.png) [@InScatterbrain](https://discussions.unity.com/u/InScatterbrain)
#### Post date: [October 31, 2020, 8:48pm UTC](https://discussions.unity.com/t/map-graph-node-based-random-map-generation/802981/16 "2020-10-31T20:48:21Z")

</div>

@spryx I’ve added a new example to the sample project that uses the BSP nodes. There’s a web build of it [here](https://insane-scatterbrain.itch.io/map-graph-demo-project). You can see this example by selecting “Roguelike Level (Rooms)” in the dropdown at the top.

Is this close to what you’re looking for? 🙂

The new example will be included in the next release.

---

<div class="post-metadata">

### Author: ![clagrens](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/clagrens/32/215233_2.png) [@clagrens](https://discussions.unity.com/u/clagrens)
#### Post date: [November 4, 2020, 7:16am UTC](https://discussions.unity.com/t/map-graph-node-based-random-map-generation/802981/17 "2020-11-04T07:16:44Z")

</div>

Would you willing to make compatibility with TileWorldCreator？  
Actually I am making a 3d tile game using TileWorldCreator.  
It seem that your Map Graph support Generate 3D Map.

---

<div class="post-metadata">

### Author: ![InScatterbrain](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/inscatterbrain/32/896884_2.png) [@InScatterbrain](https://discussions.unity.com/u/InScatterbrain)
#### Post date: [November 4, 2020, 11:09am UTC](https://discussions.unity.com/t/map-graph-node-based-random-map-generation/802981/18 "2020-11-04T11:09:34Z")

</div>

> [@clagrens](#):
>
> Would you willing to make compatibility with TileWorldCreator？  
> Actually I am making a 3d tile game using TileWorldCreator.  
> It seem that your Map Graph support Generate 3D Map.

Maybe, though I’m not familiar with TileWorldCreator.

Could you explain what you’re trying to accomplish and what kind of interaction you’d like to see between Map Graph and TileWorldCreator? 🙂

---

<div class="post-metadata">

### Author: ![InScatterbrain](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/inscatterbrain/32/896884_2.png) [@InScatterbrain](https://discussions.unity.com/u/InScatterbrain)
#### Post date: [November 5, 2020, 11:38am UTC](https://discussions.unity.com/t/map-graph-node-based-random-map-generation/802981/19 "2020-11-05T11:38:52Z")

</div>

**Map Graph v1.1 is now available.**

**Changes:**

- Added a new example to the sample project to demonstrate how to create rectangular shaped rooms using BSP nodes.

- Added checks before running a graph to output more specific error messages whenever an input parameter is unassigned or port need to be connected, instead of the generic NullReferenceException messages.

- Added the “Skip Checks” option to the Script Graph Runner component. When enabled the newly added port and input parameter checks are not performed.

- The graph view no longer gets rebuild completely each time a node is added or removed. This would make the graph editor unresponsive for a short moment. This was especially noticeable for larger graphs.

[Check out the complete changelog here.](https://mapgraph.insanescatterbrain.com/changelog.html)

---

<div class="post-metadata">

### Author: ![InScatterbrain](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/inscatterbrain/32/896884_2.png) [@InScatterbrain](https://discussions.unity.com/u/InScatterbrain)
#### Post date: [November 10, 2020, 3:53pm UTC](https://discussions.unity.com/t/map-graph-node-based-random-map-generation/802981/20 "2020-11-10T15:53:22Z")

</div>

I was made aware today of a bug with the sample installer. If you try to install the samples in a project based on the 2D template, it might fail with a bunch of errors and the map generators won’t work correctly.

Luckily, it seems easily fixed by restarting Unity afterwards.

I’ll look into this issue and will fix it for the coming release. In the meantime, if you run into this issue, please be aware that you might need to restart Unity for the sample project to work!

If this workaround doesn’t seem to work for you or you run into any other issues, please don’t hesitate to let me know!

[Next page](https://discussions.unity.com/t/map-graph-node-based-random-map-generation/802981.md?page=2)
