Download the PHP package johnsquibb/adventure-game-framework without Composer
On this page you can find all versions of the php package johnsquibb/adventure-game-framework. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download johnsquibb/adventure-game-framework
More information about johnsquibb/adventure-game-framework
Files in johnsquibb/adventure-game-framework
Package adventure-game-framework
Short Description A PHP framework for console text adventure games.
License MIT
Informations about the package adventure-game-framework
adventure-game-framework
A PHP framework for console text adventure games.
Build and play games that use text commands such as:
Installation
Run composer install
from the project directory.
Unit Tests
A suite of PHPUnit tests is located in the test directory.
Run the unit tests:
composer test
Architecture
The Game Execution diagram shows how the framework components interact during a game run. The example game's main.php demonstrates how a game can be set up and run.
Examples
Demo Game
The examples directory contains a game that demonstrates the framework abilities. Run the game on the command line using:
composer example
In the same directory is a diagram showing the layout of the demo game.
Automated Testing
A test client can be used to run automated tests.
Run the example:
composer example-test
The test client will play the game by running each of the test cases in the provided order. The client reports any errors, halting game execution. See test.php for more details.
Optionally specify the number of milliseconds to wait between each test, for
example: composer example-test 100
to wait 100 milliseconds between each test. The default wait
value is 1000 milliseconds.
TODO
- Basic Logging - errors, warnings, etc.
- Stats tracking - number of moves, number of visits to location, number of item uses, etc.
- Improve save/load system to allow for multiple files using choice system.