🗺️ Map Procedual Generation (3.x) [Version 1]
1Hey everyone!
I put together a little script that automatically generates a brand-new infinite map every time you load the scene, and I’d love to share it with you.
It’s super simple to use: • Just drop the prefab into your scene. • Add the layers A, B, C, and Default to the script. • Plug in your tiles for land, water, decorations, and prefabs for Points of Interest (POIs). • If you want enemies, hook them up using the Enemy Spawner prefab, in the POI’s.
The map is created procedurally with Perlin Noise, using either an random, or manual seed, so you’ll get a fresh map every load the scene. Also it goes infinite around the player, loading and unloading chunks of terrain and prefabs, for better performance. Also this will generate POI’s and spawn an amount of prefabs like enemies around those POI’s.
I’ve included both the map generator prefab and the enemy spawner prefab in this post. (The spawner wasn’t a prefab by default, so I made one for you.)
I’ve tested it on my end, but if you run into any bugs or quirks, let me know—I’d be happy to help iron them out.
.

💬 Comments (6)
📎 Files
Hey guys, here is a new versión where all spawned POI objects have now persistent identifiers so we can interact better with them.
Also, i’ve tidy up the cleanup for unleaded tiles and prefabs. This way, all the spawn objects that come through the POI system will unload and reload in a more efficient manner.
📜 Scripts
Want to continue the conversation?