nitrpg -
Welcome to NitRPG!
NitRPG is a Role Playing Game that takes place on GitHub.
In NitRPG, GitHub users are represented by players that battle on repo for nitcoins and glory.
Features
- Auto-update with GitHub hooks
- Display repo statistics
- Display players statsitics
- Repo actions are rewarded by nitcoins
- Players can unlock achievements
How to install
From the nit
root:
> cd contrib/nitrpg
> make
Configuring the GitHub hook
NitRPG needs you to add a new GitHub hook on your repo to keep the game
listener
up-to-date automatically.
Hook configuration:
- Payload URL: URL and port to the listener (ex:
http://yourdomain.com:8080
) - Content type:
application/json
- Wich events:
Send me everything
Be sure to set the hook as Active
in the GitHub admin panel.
Starting the listener
The listener
program is used to listen to GitHub hooks and update game data.
It should alwaysd be up if you want your game to be kept up-to-date.
To run the listener:
./listener <host> <port>
The arguments host
and port
must correspond to what you entered in your
GitHub hook settings.
Starting the web server
The web
program act as a nitcorn webserver that display the game results live.
To run the webserver:
./web <host> <port> <root>
The arguments host
and port
must correspond to what you entered in your
GitHub hook settings.
The root
argument is used to specify the path from the domain url to the
NitRPG root.
For example, if NitRPG is installed in yourdomain.com/nitrpg
:
./web localhost 3000 "/nitrpg"
Leave it empty if NitRPG is installed at the root of the domain:
./web localhost 3000 ""
The webserver can then be accessed at http://yourdomain.com:3000/nitrpg/
.
RoadMap
NitRPG stills under heavy development. Incomming features contain (but are not limited to):
- Periodized stats (weekly, monthly, yearly, overall)
- Display graphs with stats
- More achievements
- Shop: exchange Nitcoins against glorifying items
You can suggest new achievements or ideas in the NitRPG RoadMap Issue.
Content
- nitrpg: Welcome to NitRPG! (contrib/nitrpg)
- src (contrib/nitrpg/src)
- achievements:
nitrpg
achievements. (contrib/nitrpg/src/achievements.nit) - events:
nitrpg
game events. (contrib/nitrpg/src/events.nit) - events_generator: Generate Github events from repo data. (contrib/nitrpg/src/events_generator.nit)
- game:
nitrpg
game structures. (contrib/nitrpg/src/game.nit) - listener: This tool is runned to listen to
Github::Event
and update the game. (contrib/nitrpg/src/listener.nit) - reactors: Various implementations of
GameReactor
can be found here. (contrib/nitrpg/src/reactors.nit) - statistics: Statistics about the Game. (contrib/nitrpg/src/statistics.nit)
- templates (contrib/nitrpg/src/templates)
- panels: Panels templates for
nitpg
. (contrib/nitrpg/src/templates/panels.nit) - templates: Templates that compose the
nitrpg
site. (contrib/nitrpg/src/templates/templates.nit) - templates_base: Base HTML rendering templates for
nitpg
. (contrib/nitrpg/src/templates/templates_base.nit) - templates_events: Templates to display
GameEvent
kinds. (contrib/nitrpg/src/templates/templates_events.nit)
- panels: Panels templates for
- test_achievements: Test module for
achievements.nit
(contrib/nitrpg/src/test_achievements.nit) - test_events: Test module for
events.nit
(contrib/nitrpg/src/test_events.nit) - test_game: Test module for
game.nit
. (contrib/nitrpg/src/test_game.nit) - test_helper: Test tools for NitRPG. (contrib/nitrpg/src/test_helper.nit)
- test_listener: Test module for
listener.nit
(contrib/nitrpg/src/test_listener.nit) - test_statistics: Test module for
stats.nit
(contrib/nitrpg/src/test_statistics.nit) - web: Display
nitrpg
data as a website. (contrib/nitrpg/src/web.nit)
- achievements:
- www (contrib/nitrpg/www)
- src (contrib/nitrpg/src)