A game framework to build extensible player interactions. Developed to run in the Bun environment.
- Install Bun
- Clone repo
bun install
bun src/game.ts
- Players move between Locations
- Locations can have items (e.g. furniture)
- Items can have sub-items (independent of the parent item) and properties (part of the parent item)
- LocationMap links locations together to determine connections
- Actions take a Game as arguments (to be able to act on anything) and return a Reaction
- Targetting (location to move, item from inventory to combine with location item)
- Moving between locations
- Item state
- Item definitions vs item instances (e.g. multiple batteries)
- Immediately show adjacent locations when looking around
- Select property and open it
- Pick up items
- Focussing items
- Readable Pages and Books
- Look around
- location
- description
- adjacent locations
- items
- Openable containers that have their items hidden otherwise
- Turn into visual Remix app
- More tests
bun test
to run all tests- You can play around in
src/old/example.ts
to get started