https://github.com/132ikl/game
eccentric skinner box point-collecting game
https://github.com/132ikl/game
rust webgame
Last synced: over 1 year ago
JSON representation
eccentric skinner box point-collecting game
- Host: GitHub
- URL: https://github.com/132ikl/game
- Owner: 132ikl
- License: agpl-3.0
- Created: 2020-11-14T07:09:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-30T00:33:22.000Z (over 5 years ago)
- Last Synced: 2025-02-28T13:17:45.648Z (over 1 year ago)
- Topics: rust, webgame
- Language: Rust
- Homepage: https://game.ikl.sh
- Size: 95.7 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# game
There is a button that you can press every day to receive a point. Compete with your friends to see who can get the most points.
# what's the technical implementation?
* uses [Rocket](https://github.com/SergioBenitez/Rocket/) to serve webpages
* uses [tera](https://github.com/Keats/tera/) for templating
* uses a [sled](https://github.com/spacejam/sled/) database
* uses [bcrypt](https://github.com/Keats/rust-bcrypt) to hash/salt passwords
* pulls some trickery in order to embed static files and templates directly into binary:
1. uses [rust-embed](https://github.com/pyros2097/rust-embed/) to embed static/template directories into the binary
2. unzips static/template directories to a [temporary directory](https://github.com/Stebalien/tempfile)
3. creates a new Rocket config (so any Rocket.toml or env vars still get parsed) which grabs templates from the temp dir
# ...why?
In the first iteration of this game I wanted to throw together some fun program in one night. Then, some people actually started playing it. The old code was super unstable and difficult to change because it was thrown together, and I wanted to learn Rust, so I decided to rewrite it.