Progress with Tilesets and Map Generation

I posted these images on Facebook a couple of weeks ago, and they somehow never made it here.  After struggling with a few things related to graphics and map/level generation, I feel like I finally broke through the wall that was holding me back.  I started working on character creation, mobs, and am starting to work on some game mechanics finally after months of scrapping attempt after attempt.

I figured one of the core ideas behind Labyrintheer was, well… labyrinths: mazes, dungeons, et cetera.  If I couldn’t get those done right, or at least make some progress toward them, then the rest of it was all for nothing.

image-1-1
A progression of map/level layouts, all randomly generated in one way or another.

This image shows progress on level generation.  There were actually a few iterations that don’t show up here.  I’m not even sure I have screenshots of them.  Maybe at some point I’ll look back and try to find a few.  It really started out with an idea that I wanted to create levels using cellular automata.  And I did.  And they actually were simply too organic.  I made a small, playable game that would randomly generate a new map every time the spacebar was pressed, and would spawn the player in to one of eight edge/corner areas and create a goal that was as far away from the player as possible.

Map generation was very quick, even with large maps, but trying to skin everything immediately made me realize it just didn’t feel right.  At this point, though, I wanted a true top-down 2D game (think Legend of Zelda on the NES).

After that experiment, I started looking at graph grammars and how they could apply to attaching branching groups of pre-made sections of dungeon together.  I started down this road and was using Tiled and Tiled2Unity to import simple square rooms that had varying exits and would connect via those exits (top-left).  The upside to this approach was that maps generated just as fast as the CA map generation, were much less organic, and had order (top-right).  Green rooms came first, then yellow, the red.  After, a purple room was created (boss room) and then all dead ends were capped off (blue rooms).  This actually solved a few problems that I’ll now have to resolve entirely.

The downside to this approach was that it felt TOO inorganic.  Even using a wider variety of rooms and hallways to create a dungeon via graph grammars gave it a feeling of being too symmetrical.  I was able to use that to test some stuff with random placement of torches in a dungeon and allowing that to be the sole source of light (bottom-left).

Still, something new needed to be done.  I decided that an angled view of a 3D world would fix a lot of issues, many of them related to physics, line of sight (LoS) and environments.  I ended up trying, and am currently using, Dungeon Architect with Unity to create the maps (bottom-right).  This has allowed me MUCH greater freedom to customize pseudo-random levels.  So far I’m quite pleased.

Sample of a too-symmetrical, but very large map.
Sample of a too-symmetrical, but very large map.

The next part of my struggle was related to assets.  I presumed there were two options – pay through the nose for an artist to give me custom assets, which is what I preferred, or use free/cheap assets and run the risk of the game looking very similar to other games out there.  Neither of those were great options.

Tileset progression over time.
Tileset progression over time.

The top-left (yeah, very similar to the first top-left, right?) shows some very 8-bit stylings, which would’ve been fine if they weren’t so utterly generic.  I ended up using Photoshop to create the top-right tileset for Tiled when I thought I’d use shape grammars.  It wasn’t too bad, actually, for not being an artist.  Multi-directional blending of regular, light, and dark dirt floors gave me pretty good control to paint tiles as I saw fit within those parameters.  It still just didn’t feel right.

The bottom-left shows some early work (two months ago or so) with Dungeon Architect, some great assets from InfinityPBR that I somehow screwed up royally, and a REALLY bad camera design.  The bottom-right is more or less the current look of the dungeon biome for the game.  I have tons of biomes still to design, and tons and tons of stuff to still bring into the dungeon biome, but I have a good enough playable space that feels and looks “right” that I’ve gone, as I said, into the mechanics of things for a while so that I can do greater play-testing as I move along.

As a note to anyone reading this because they are embarking on their own game development adventure, just because I stopped using some tools or processes does not mean they aren’t great tools.  They just weren’t right for this project.  Tiled is a fantastic tool to design tile-based maps for many, many types of games and can deal with top-down, isometric, and even hexagonal tile systems.  Tiled2Unity is a life saver if you’re using Tiled for a project in Unity, and Sean is incredibly helpful and quick to respond to things.  Cellular automata is… well, it’s just fun.  There’s tons that you can do with it, and making EXTREMELY organic feeling maps is one of those things.  If you’re developing a game that is in caves or other natural systems, give it a shot.  Graph/shape grammars is also really cool, and you can do a lot of different things with it.  In fact, I still might use it for custom weapon creation, and even if I don’t I have another game idea for someday where shape grammars would be a perfect fit.

In the end, don’t be afraid to throw away a few months worth of work because it isn’t working.  Don’t let it get you down, either.  Sometimes that’s just the way of things.  And I had heard it before it happened to me.  It’s different when it is actually happening to you.  Just know that many, many people have been there, too, and great things can come from it.

One thought on “Progress with Tilesets and Map Generation”

Leave a Reply

This site uses User Verification plugin to reduce spam. See how your comment data is processed.

This site uses Akismet to reduce spam. Learn how your comment data is processed.