Problem with procedurally generated map
The main problem of this week's development process apparently is generating random map. When I was testing on the procedural map generation, I faced a problem of how to connect rooms with each other. The easiest solution I can think of is using a 2d array to generate the map, and make each room a perfect sqaure shape. But this approach makes the map looks too neat, and I don't really likes it. Here are some generated result:
Another approach I attempted is to make different room prefabs, and each of them has one ore more doors, and after I recorded each door's position, I can connect them by simply using the position of the doors. The result looks like this:
However as showed above simply choose a room prefab from the list can cause the rooms overlap with each other. So what I did is that I combined the 2D array version with this one to make the rooms only generate towards forward direction to make them separate as much as possible. The result looks like this:
They now look better but still there are chances of overlapping. But it can be easily solve that by making room prefabs take similar spaces. There are much more advanced and better random room generating algorthems, but this one is the easiest I can think of.
Author: Zeyuan Song
Posted on 04/12/2024
Get Suits of the Abyss
Suits of the Abyss
Status | In development |
Author | AstralArchitects |
Genre | Action, Platformer |
Tags | Roguelike |
More posts
- Carrying player data between scenes in Unity (Pt.3, The Finale)May 04, 2024
- Player ground detection issueMay 02, 2024
- URP sprite shader issueApr 27, 2024
- Carrying player data between scenes in Unity (Pt.2)Apr 27, 2024
- Weapon Effects and AnimationsApr 27, 2024
- Resolution issuesApr 27, 2024
- Minimap and fog of warApr 20, 2024
- Player WeaponsApr 20, 2024
- Carrying player data between scenes in UnityApr 13, 2024
- Poker Hand DetectionApr 13, 2024
Leave a comment
Log in with itch.io to leave a comment.