Thread Reader
AikonCWD - Cursed Gem ๐Ÿ’Ž

AikonCWD - Cursed Gem ๐Ÿ’Ž
@aikoncwd

Jan 15, 2024
6 tweets
Tweet

Here is an animated step-by-step of my algorithm to generate a #dungeon for my #roguelike. All is #procgen and coded using #GodotEngine. The detailed process is listed below... ๐Ÿงต

1- Start tilemap full of walls 2- Chose a random point, spawn a drunk-walker to carve an open space 3- Spawn non overlaping rectangles (rooms) 4- Dig straight V or H corridors 5- Find each wall tile that have floor each side, carve that wall
6- Cleanup deadend corridors (each floor tile surronded by 7 walls become a wall) 7- Fill the initial big hole with rocks 8- Find the most left and right rooms to spawn stairs (player start and goal) 9- Draw doors on each carved hole from step 5
10- Find suitable walls to become doors. This will add loops on the dungeon 11- Each rock tile surrounded by 8 rocks will be grass 12- Open holes to connect the open space to the main dungeon 13- Create a lake: Each grass tile that is 3 tiles far from a rock will be water
14- Add plants: 25% of grass tiles that are near a rock or water will be a plant 15- Add trees: 10% os grass tiles that are surrounded by 8 grass tiles will be a tree 16- Animate water tiles 17- Find rooms with only ONE door. Spawn a chest on that room, lock the door
18- Add a key in any other room. This avoid any softlock That's all! I will improve the algorithm by adding more elements like blueprint rooms, monsters, loot, decoration, etc., but this is all I have at the moment. #ProceduralGeneration is awesome and a pleasure to watch!
AikonCWD - Cursed Gem ๐Ÿ’Ž
I am a #sysadmin that loves #indiegames. Developing #CursedGem using #GodotEngine Get it here: https://t.co/WvB71GmEbt
Follow on ๐•
Missing some tweets in this thread? Or failed to load images or videos? You can try to .