GenX 2D - Procedural Map Generation Framework

GenX 2D framework provides the user with an extensive set of tools for procedurally generating maps, structures, dungeons and more.
Written in C#.

- Easy to set up
- Visual controls
- Intuitive interface
- Flexible and powerful
Demo

  • Easily generate caves, mazes, artificial looking structures and more, with almost no code.
  • Or access lower level functions for flexible map generation to suit your goal.
  • Limitless dungeon generator with extensive controls.
  • Powerful terrain generator.
  • Configurable object spawner…
    And much more…




Asset Store Link

Demos from cheesegames.net do not work for me. You may wanna upload them somewhere else.

Is source code included?

How much do GenX and Advanced RPG Roguelike overlap? How much code from GenX I will find in Advanced RPG Roguelike?

You can download the demo here.

Yes, source code is included.

GenX contains the improved algorithm used for map generation in Advanced RPG Roguelike, but there’s no other similarities.

I like the asset but it looks unfinished.

Bugs:

  • No terrain is generated if caveMagnitude value is less than 4. Make 4 min value for caveMagnitude.
  • “max chunks” value for biome is ignored. You always get at least 3 chunks.
  • Block and biome inspector values are saved only when you change something in general tab.
  • No terrain will be generated if the first block’s generation type is “group”.
  • Biome drop down menu in demo scene does not work.
  • You have to zoom in to see terrain generated in demo scene.
  • Terrain generation in demo does not work after you click restart button.
  • Structures are placed not in blocks but between them.
  • If one block’s “min y spawn” matches another block’s “max y spawn” there still will be a gap in the generated map.

Suggestions:

  • Add a button to inspector window that will allow users to generate CA, dungeon or terrain( whichever tab is open) in editor mode.
  • Documentation should explain what a chunk and biome is.
  • Blocks should be moved to general inspector tab since CA generation method requires them.
  • Structures should be moved to terrain inspector tab.
  • Add random texture drawing type. A random texture is selected from array.
  • Show block destruction in demo.
  • Add smooth terrain tab to inspector.
  • Option to generate colliders for structures.
  • Generate an empty parent GO for every structure type so they do not clutter up hierarchy window.
  • Make smooth terrain demo scrollable like terrain demo.
  • Generated gameobjects should be flagged as static.
  • Colliders created for blocks should be combined into a composite collider.
  • Convert documentation to pdf. I opened it with openoffice and it did not load pictures for some reason.

What does block y offset do?

Thank you for the feedback!

Y offset is a number added to the height of every block of that type.

This is not the case, it actually depends on all cave generation values. For example you can have magnitude set to 2, ‘Size of Caves’ equal to 1 and terrain will be generated.

Fixed. This could happen because after one biome ended, the next biome could’ve been the same.

I don’t think this happens for me. Can you give more details? Email: ansersoftware@gmail.com

Fixed.

Doesn’t happen for me either, i’ll look into it.

Fixed.

All the restart button does is reload the scene, so i’m not sure how this can happen.

Added option to inverse spawning parameters of a structure.

Fixed.

Suggestions:

Agreed, done.

Structures can actually be placed in dungeons and caves.

Added.

As far as i know, objects can be flagged as static only in editor.

Done.

Package approval will take some time, usually about a day.

Change block’s “max y spawn” value. Save your scene. Close the scene. Open the scene. The value is not saved.

var newFlags = UnityEditor.StaticEditorFlags.BatchingStatic | UnityEditor.StaticEditorFlags.LightmapStatic;
UnityEditor.GameObjectUtility.SetStaticEditorFlags(GOinstance, newFlags);

How big is performance impact if you don’t combine blocks into chunks?

I’m testing v1.0.1.
Inverse option for structures does not do anything. They are still placed between blocks.
Biome drop down menu in demo scene still does not work.
Why complicate things with chunk radius argument? Why not use number of chunks you want as argument in GenerateChunk method?
Can you give example how to destroy a block at mouse cursor position?

Suggestions:
Biome background generation needs more flexibility. Why not generate biome background for every tile without a block and add option for blocks to not generate background above them?
Use biome name to name generated chunks.
You really should use composite collider for blocks. It will reduce number of colliders by order of magnitude.
An inspector button to generate stuff using inspector values would be great.

It does, you just don’t realize it. Sprites probably appear behind the generated terrain. Check ‘Spawn Anywhere’ and see what i mean.

Honestly no idea, works perfectly fine for me, and other PC i tested on.

Radius is easier to work with when procedurally loading chunks. For example you enter a chunk, and chunks around it are generated.

I’ll send you an email soon.

I’ll consider this.

That’s rather trivial, will do by the next version.

Tile based games usually use texture atlases, so it’s better to use gameobjects instead of texture2D for blocks and terrain background.

I’m using one of block textures as structure and it’s clearly placed between blocks.

You should include it in documentation or the demo scene.

https://i.gyazo.com/139eae68e27c2c6c5c7247afb4c9f44a.mp4

Can you send me details? ansersoftware@gmail.com

I will. It’s still kind of WIP.

In the demo scene use one of the block sprites as prefab for structure and it will be placed between 4 blocks.

Will there be any more updates? I wanna integrate some parts of the code into my project.

Yes. Unfortunately i don’t have much free time, but i’m working when i can.