https://github.com/blocknotes/my-rpg
A simple textual RPG written in Ruby
https://github.com/blocknotes/my-rpg
Last synced: 10 months ago
JSON representation
A simple textual RPG written in Ruby
- Host: GitHub
- URL: https://github.com/blocknotes/my-rpg
- Owner: blocknotes
- License: mit
- Created: 2021-07-29T19:44:21.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-06-18T08:50:51.000Z (over 2 years ago)
- Last Synced: 2025-02-10T12:29:49.005Z (12 months ago)
- Language: Ruby
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
# my-rpg
This is MyRPG - a simple textual RPG written in Ruby.
## Usage
- Install the dependencies:
```sh
bundle
```
- Run the game:
```sh
bundle exec ruby -r ./app/game.rb -e 'Game.start'
```
- Use the keys as input (h for help)
## Config
In _data/_ path there are 2 yaml files to define events and rooms.
Rooms:
- they are linked together by name+direction;
- the "desc" is used as introduction when the player come in and when looking around;
- a room can optionally have an event;
- if final is set, that room is isolated once the player come in.
Events:
- they must be referenced by a room;
- the "intro" is shown when the player come in the room for the first time only;
- the "idle" is shown when the player looks around;
- the "actions" define extra actions available to the player, it's also possible to define conditional step and change the game state. The action's key could even override the default actions (ex. directions or look around).
## Specs
- Run specs:
```rb
bundle exec rspec
```
- Coverage generated in _coverage/_
## Contributors
- [Mattia Roccoberton](https://blocknot.es/): author
## License
The gem is available as open source under the terms of the [MIT License](MIT-LICENSE).