Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/philschatz/puzzlescript-rust
:video_game: Play PuzzleScript games in Rust
https://github.com/philschatz/puzzlescript-rust
game game-engine puzzle-game puzzles rust
Last synced: 2 months ago
JSON representation
:video_game: Play PuzzleScript games in Rust
- Host: GitHub
- URL: https://github.com/philschatz/puzzlescript-rust
- Owner: philschatz
- Created: 2019-07-02T06:32:30.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-06-06T21:43:57.000Z (over 2 years ago)
- Last Synced: 2024-04-12T02:32:46.790Z (8 months ago)
- Topics: game, game-engine, puzzle-game, puzzles, rust
- Language: Rust
- Homepage: https://gitpod.io/#https://github.com/philschatz/puzzlescript-rust
- Size: 6.27 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# What is this?
It is a [PuzzleScript][puzzlescript-url] interpreter written in Rust to play games in your terminal!
## Try it out!
[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/from-referrer/)
# Screencaps
Here are some screencaps of games being played.
### Gravirinth ([original](https://pedropsi.github.io/gravirinth.html))
(click to see the ascii screencast)
### Mirror Isles ([original](http://www.draknek.org/games/puzzlescript/mirrors.php))
This screencast shows playing the game in a terminal using ASCII and ANSI colors.
![mirror-isles](https://user-images.githubusercontent.com/253202/47133542-ce0d1700-d26e-11e8-851f-233d27aaf0b8.gif)
### Pot Wash Panic! ([original](https://hauntpun.itch.io/pot-wash-panic))
(click to see the ascii screencast)
### Hack the Net ([original](http://www.draknek.org/games/puzzlescript/hack-the-net.php))
### Skipping Stones to Lonely Homes ([original](http://www.draknek.org/games/puzzlescript/skipping-stones.php))
### Entanglement ([original](http://www.richardlocke.co.uk/release/entanglement/chapter-1/))
# Install
1. Install Rust
1. Clone this repository
1. Run `cargo run --release` to get the help message
1. Run `cargo run --release -- ./games/{game}.parsed.json` to play a game
- As you complete levels, it will create a save file in the same directory as the game# Test
- `./test.bash` : runs all the tests
- `cargo test` : runs unit tests
- `./test_solutions.bash` : replays real games and verifies the solutions still work## Flamegraph
Flamegraphs are great for finding performance problems. Here's how to generate one:
```bash
echo "DDD" | sudo cargo flamegraph ./games/roll-those-sixes.parsed.json -- --level 0 --scripted
echo "S.D.S.D.DWAASAWWW..............q" | sudo cargo flamegraph ./games/entanglement-one.parsed.json -- --level 3 --scripted
```# TODO
- [ ] Build WebAssembly version and add example of using it in a browser
- [ ] Add a parser so the original `script.txt` files can be used instead of the `*.parsed.json` files[puzzlescript-url]: https://github.com/philschatz/puzzlescript