← All projects
Project record1 mention
Originally shared on Hacker News

NPC/Item/Attack game interaction system

A past, abandoned attempt at building a game system similar to Easel, structured around NPC, Item, and Attack classes with a corresponding NPC Manager, Item Manager, and Attack Manager that calculated all their interactions and states each cycle.

Last shared
01 / The problem

What it addresses

Handling interactions between different game elements — declaring which objects were affected by attacks or were player/NPC interactive, plus inheritance and whether objects or a manager should perform calculations — became deeply tangled and a fresh reset would have been better.

02 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. NPC/Item/Attack game interaction system

    A past, abandoned attempt at building a game system similar to Easel, structured around NPC, Item, and Attack classes with a corresponding NPC Manager, Item Manager, and Attack Manager that calculated all their interactions and states each cycle.

    Problem: Handling interactions between different game elements — declaring which objects were affected by attacks or were player/NPC interactive, plus inheritance and whether objects or a manager should perform calculations — became deeply tangled and a fresh reset would have been better.

    Posted by @eastoeast · Original source ↗

    Source text · @eastoeast · · Source ↗

    I ended up having NPC, Item, Attack classes and for each a NPC Manager, Item Manager, and Attack Manager to calculate all their interactions and states.