Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

dukeofdummies

4
Posts
A member registered Jun 12, 2020

Recent community posts

(1 edit)

So I think you're talking about giving each biome a layer and stacking them on top of each other. That works for 98% of scenarios. But any time you have a section of width/height 1 tile, you run the risk of covering it up by another layer. (at least in a 2x2 bitmask, may not be an issue in a 3x3. ) I did that for the longest time, until I started noticing small peninsula's and bays in my ocean were appearing/disappearing where my code said there wasn't one. Place a single random tile of iceland in the dirtland and depending on how you layer things, it can vanish entirely.

I have my auto tiling working pretty damn well at the moment.  lacks a buttload of polish, but it even wraps around. The ultimate goal I'm trying to do is be able to "lock" tiles into place and then reroll the world around them. I haven't actually tried exporting something in godot yet but I bet I could throw something up in github once I figure it out.

If people are interested

From what I tried the art doesn't quite work, at least from a procedural generation standpoint. I had to adjust the art assets to make it fully automatic. I was using a bunch of this as a reference https://michagamedev.wordpress.com/2018/02/24/181/

Even if you're not using Godot, the high level "this is how bitmaps and autotiling works" helps immensely.

I gave each biome its own tileset and just stacked them all on top of each other.

(2 edits)

Ok so lets say we have this example map. Grassland, Dirtland, and Iceland. everything works fine until you hit a border (in purple)

Let's just look at the top purple tile. I need the left half of the tile grassland, and the right half dirtland. Basically I need two tiles stacked on top of each other to make that effect. My first attempt is to just give every biome its own tileset layer and stop at the purple border, that gets this.


You see the purple leaking between the borders? Now this is really easy to fix by hand, just pick an edge and make the lower layer a full tile and not a half. But programatically that means making a non binary bitmap. Basically make a ruleset for edges on what biomes overlaps what, make a ruleset for where three biomes meet, then make a ruleset where 4 biomes meet. Even after all that work that still might not cover every scenario and get weirdness. If you look at this super basic 16x16 tileset instead though...


You'll notice you don't have that purple peeking through problem. Because the borders are flush against each other. Everything extends 8 pixels into the middle so there is never a gap. You can stack 6 binary tilemaps (basically a ruleset of "either there is a tile, or there is not) on top of each other and everything just works. They don't even need to be flush, You could expand the white areas and have tilesets overlap, and it will still work fine. Just some examples of what I threw together (the top left tile is just an icon)


That gets you this

No gaps, just map

I absolutely love the art style, You totally nailed the Heroes of Might and Magic aesthetic. They work great for building a beautiful world by hand. However I am at my wits end trying to autotile these.

I'm trying to build a procedurally generated world and I am having a devil of a time meshing two random biomes together. The bottom right nine tiles do not play well between biomes because they don't extend 8 or more pixels into the center. So if I have a grassland right meet a winter left, I get stuck with a transparent gap between the two that is only easily fixed by hand.

The diagonals have a concave curve that passes the center as well. So when two diagonals meet, you have a little football shaped hole.

I'm working on tweaking it a bit to suit my own needs, but if you ever decide to do tweaks, just a few pixel shift to the center would make procedural generation a whole lot easier.