puritandesigns / expotition
Classes to build a gamebook story
v0.2
2019-03-03 15:47 UTC
Requires (Dev)
- phpunit/phpunit: ^7.2
This package is auto-updated.
Last update: 2025-03-06 10:58:36 UTC
README
PHP classes to build a Gamebook story.
View a slideshow from a TrianglePHP Meetup
Getting Started
- Run
composer require puritandesigns/expotition
- Require composer's autoload and create an adventure:
$adventure = new Adventure();
- Create settings that have actions:
$town = new Setting( $adventure, 'Town', 'You find yourself in a small town bustling with activity.', ); $tavern = new Setting( $adventure, 'Tavern', 'You are in a single-room tavern.', new Actions( new SimpleResponseAction( 'Talk to Bartender', $adventure, 'The Bartender grunts, "Welcome to my pub."' ), new LeaveAction( 'Head outside', $adventure, $town ) ) );