This installment develops a Commodore 64 BASIC dungeon crawler from a single-map game into a five-level adventure. Each level uses the existing map generator, but players must collect every chalice before they can use the stairs. The required number rises from one on levels 1-2, to two on levels 3-4, and three on level 5. Stairs appear in a randomly chosen corner room, while the player starts in the center; the map’s connectivity rules ensure the destination is reachable. Clearing the fifth level ends the game, and the end screen reports the level reached and gold collected.
The code separates character setup from level construction: a new game initializes the player once, while each descent rebuilds only the map and level objects, preserving health, attributes, gold, keys, and magic. Chalices grant 10 gold, and the game counts only those successfully placed, so a crowded map cannot make a level unwinnable. Advancing restores hit points based on constitution and raises strength on even levels or dexterity on odd ones, then recalculates armor. Potions now add up to 50 magic, capped at 100, preparing for spells in a later installment, though magic cannot yet be spent. The author notes that enemy difficulty does not increase yet and raises design questions about backtracking, persistent keys, stat choices, and the number of levels.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.