2026 Summer Roguelike project, Part 9

 from Red Blob Games
18 Aug 2026

Part 9 has a lot going on.

There’s a new command, three new items, and a new behavior:

I used Jujutsu to go back to an earlier change and clean up the event handlers in preparation for these changes.

Instead of making an object hierarchy for these new consumable items, I made a consumable optional component, and I used a switch (consumable.type) statement to choose what behavior to apply. This means all consumable behavior is in one place instead of scattered among multiple classes. There are pros and cons of this “union + pattern matching” style, but I generally prefer it over inheritance hierarchies. Scroll to the end of the page to see health_potion, confusion_scroll, etc. defined in the prototype table.

The async/await approach from Part 7 worked very nicely for these new interactions.

I also spent some time making the rest of the table editable, and then added a flag for entities to block the field of view. Try these things:

  1. Change your hp.
  2. Make potions block your view.
  3. Pick up an item by editing its location to held by 1.
  4. Change the type of a orc into an troll.
  5. Change the color or shape of a potion.
  6. Make orcs have higher defense.
  7. Make corpses holdable, and then go pick one up.

Here’s the game at the end of Part 9:

Email me , or comment here: