[Coming soon] 2D Tile based map generation

Hello everyone,
I was working on 2D tile based map generation, so far this is the result:

Update 1

Advantages:

  • Terrain consist of one mesh(one draw call, only one chunk)
  • Simple water system(fast)
  • Terrain can be easily saved and loaded(you need to save one array and to load it, every block with specific texture and values will be loaded)
  • Terrain is using simple collider(at the cost of performance)
  • Terrain runtime editor(add, check , edit or remove blocks)
  • Choose when and how to generate each block in whole map
  • Terrain is using one texture map(it consist from different textures)
  • Water is seperated mesh with collider
  • Square lighting
  • Many more

Disadvantages:

  • Whole map is generated at the start game(not infinite, I tried 10000*300 blocks - Generated for less than 2s)
  • No marching squares algorithm(terrain is using simple squares)

Tell me what you think…would you like to see it on asset store? :wink:

When first opening this post I expected just another tile editor, but this is actually really cool. I’m guessing this could be easily used as an actual game, just take away the editing ability and you basically have a Terraria-style terrain to work with, very very cool.

Thanks TheCowMan for your feedback.
This terrain should be used for an actual game :wink: …and terrain editing is just another script which can be disabled.

New update*

I have changed a lot of things, here is the list:

  • Terrain is now static object
  • Water is separated mesh with its own collision
  • Added terrain render distance , terrain collision distance
  • Now you can set transparent tiles
  • New water pressure
  • Only square lighting, with multiple lights
  • Water use its own tiles - 4 of them (based on how much water is in one square)
  • Water will move down even if it hit the edge of the rendered part of the terrain
  • Better performance
  • Only 32*32 textures allowed for tiles
  • …as always a lot more.

New update :smile:
I think that this new light effect is much better than the last one… In both images just one light is used!


Soon I will upload demo so you can test it…

Hello guys, I started re working whole terrain, Now I will keep my eye on performance. :wink:
Today I tried 140 blocks X 140 blocks(witouth mesh collider or water) updating each frame without any lag or lag spike. Scene run at 14ms.

Don’t believe me?