Spawning Random Enemies in a Roguelike [C#]
The 'improved level generation algorithm' update for Treasure Rogue is now complete, so this article walks through the implementation in detail with code.
Home / Articles / Tag
3 articles
The 'improved level generation algorithm' update for Treasure Rogue is now complete, so this article walks through the implementation in detail with code.
This article introduces the code used to implement a turn-based game loop. Treasure Rogue, the turn-based roguelike I made, basically runs on the code shown here. I leave out anything that is not strictly necessary so the code is easier to read.
Sometimes you want random selection where each item has a different chance of being chosen based on its weight, such as gacha or item drop rates. This article shows one way to implement WeightedRandom in C#.