this generates a map out of carcassonne tiles. there's a readme and the source code in there if you want it.
WASD to pan
SPACE BAR to refresh the box of tiles
not a game, more of a toy I made just to see if I could do it
additional info: "drawtex.bb" doesn't contain any of my own code, it's a free library for blitz that I've used forever and is required for this to work
Comments
Well Done!
Elegant and simple. It's very interesting to see the "almost invisible" indicators that surround each tile, identifying what needs to be placed there next. It's a visualization of what happens in a player's brain when they are looking for options on where to place tiles.
Carcassonne was my first-ever "eurostyle" board game I remember playing, and I have many fond memories of playing it (and now, it's expansions and spin-offs). Very nice work on this. :)
thank you! those
thank you! those almost-invisible border tiles are a seperate object class, and every time a tile is placed, it creates one of them on every empty tile surrounding it. it tweaks it for every tile placed next to it, so it has a clue what the edge tiles are. every loop, it fills one of these border-tiles in based on what information it knows about it, and picks a tile that will fit (and if there's nothing bordering it on an edge, anything can be on that edge) which is also why it struggles to fill in some empty tiles after a while.
I've also just noticed I
I've also just noticed I have a bug: in that gif you can see some edges where the tiles don't fit! but I was trying to figure out why this happens a small percentage of the time- turns out, the pieces always fit, but sometimes it puts them in at the wrong angle. hmmmm