A Crystal library for serving TypeScript compiled Phaser web-based games. Using utilities of the Crystal standard library and Kemal, as a server for Phaser allows for super-fast serving and socketing stuff.
Example serving with Kemal:
2016-10-28 22:58:15 +0200 200 GET /style/main.css 65.6µs
2016-10-28 22:58:15 +0200 200 GET /script/phaser.min.js 542.2µs
2016-10-28 22:58:15 +0200 200 GET /script/game.js 31.8µs
2016-10-28 22:58:15 +0200 200 GET /assets/profile.png 81.6µs
Add this to your application's shard.yml
:
dependencies:
prism:
github: teasquat/prism
require "prism"
To setup basic Phaser things:
$ make setup
To build server binary and TypeScript files:
$ make
To run server:
$ make run
If running into weird stuff:
sudo ln -s /usr/bin/nodejs /usr/bin/node
- Add socket-based connections to Phaser (for multiplayer)
- Add database handling
- Add TypeScript *framework* for online-multiplayer/highscore/saves etc.
- Implement templates for different example games
- Add possibility of *Electron* desktop apps
- Get hyped and make nice web-based games
- Fork it ( https://github.com/teasquat/prism/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
-
nilq Lord Niels N. Horn - crystal cooking
-
snillerboy William Kattrup - crystal cooking, Phaser magic
-
FuzzyLitch Emile - UDP wizard