https://github.com/philschatz/puzzlescript
:video_game: Play Accessible PuzzleScript games in your terminal or embed them
https://github.com/philschatz/puzzlescript
accessible game game-engine hacktoberfest puzzle puzzle-game
Last synced: 4 months ago
JSON representation
:video_game: Play Accessible PuzzleScript games in your terminal or embed them
- Host: GitHub
- URL: https://github.com/philschatz/puzzlescript
- Owner: philschatz
- Created: 2018-05-16T03:05:59.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2024-08-17T02:39:26.000Z (almost 2 years ago)
- Last Synced: 2026-01-11T17:42:15.247Z (5 months ago)
- Topics: accessible, game, game-engine, hacktoberfest, puzzle, puzzle-game
- Language: TypeScript
- Homepage: https://philschatz.com/puzzlescript/
- Size: 17.7 MB
- Stars: 32
- Watchers: 0
- Forks: 11
- Open Issues: 30
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Accessible PuzzleScript
[![NPM version][npm-image]][npm-url]
[![Downloads][downloads-image]][downloads-url]
[![Code coverage][coverage-image]][coverage-url]
## Play in a browser or on your mobile device
1. Visit the [website](https://philschatz.com/puzzlescript)
1. Click the "Add" button at the bottom to keep playing even without an internet connection
1. Plug in a :video_game: controller! (tested with PS3/4/XBox)
If you are using iOS (Apple phone or tablet) click here for instructions
1. Visit the [website](https://philschatz.com/puzzlescript)
1. Click the Share button in Safari
1. Scroll over and click "Add to Home Screen"

## Play from the command line terminal
1. Run `npx puzzlescript-cli` to start playing!
# Screencaps
Here are some screencaps of games being played.
### [Pot Wash Panic!](https://philschatz.com/puzzlescript/#/pot-wash-panic) ([source](https://hauntpun.itch.io/pot-wash-panic))
(click to see the ascii screencast)
### [Skipping Stones to Lonely Homes](https://philschatz.com/puzzlescript/#/skipping-stones) ([source](http://www.draknek.org/games/puzzlescript/skipping-stones.php))
### [Hack the Net](https://philschatz.com/puzzlescript/#/hack-the-net) ([source](http://www.draknek.org/games/puzzlescript/hack-the-net.php))
### [Entanglement](https://philschatz.com/puzzlescript/#/entanglement-one) ([source](http://www.richardlocke.co.uk/release/entanglement/chapter-1/))
### [Mirror Isles](https://philschatz.com/puzzlescript/#/mirror-isles/0) ([source](http://www.draknek.org/games/puzzlescript/mirrors.php))
This screencast shows playing the game in a terminal using ASCII and ANSI colors.

# Video games that blind people can play?
PuzzleScript lends itself nicely to be playable by people with low or no vision:
1. each level is small (~10x10)
1. each sprite has a human-readable name (since the whole game is in 1 text file and the logic refers to the sprites)
1. a blind person has 2 sets of directions (one to move the player and one to move the “eye” which reads off which sprite is in that spot)
1. the games do not require quick reflexes and have Undo built-in so it is easy to think and try different options
1. we can just print to the terminal whenever something needs to be read (presumably the terminal is read aloud to the person)
If you are blind, you can play the games by running `puzzlescript --no-ui` and use the I, K, J, L, and P keys to move the cursor to explore the level.
If you want to experience what a non-sighted person would experience but still see the level, run `NODE_ENV=development puzzlescript` and use the I, K, J, L, and P keys to move the cursor to explore the level.
### Screencap
This screencap is a visual demonstration of exploring and then playing a level.
This screencap is the **non-visual** version of the same steps as shown above. This is what vision-impaired people will read when they move the Inspector cursor around and then move the player to play the game.
# About
The goal of this project is to do 3 things:
1. make PuzzleScript easier to embed (like in 404 pages, easter eggs, etc). See [docs](https://philschatz.com/puzzlescript/docs/classes/_engine_.gameengine.html)
1. allow **blind people to play video games** (by passing the `--no-ui` argument)
1. use the terminal as a GUI for playing games
# Accessibility Notes
To use https://chromevox.com, table navigation keys on the Mac are Ctrl + Command + Up.
# Development Instructions
1. Install [lerna](https://lerna.js.org)
1. `lerna bootstrap --force-local`
1. `lerna run compile`
1. `lerna run test --stream`
- you can run `test:unit` or `test:web` to just run tests specific to a package
1. `lerna run test:integration --stream` (this runs several games and takes about 30min)
1. `lerna run start:server --stream` to start up a server
## Maintainer Instructions
To publish a new version of the packages:
```sh
lerna publish prerelease
```
## TODO
- [x] Move to a monorepo
- [x] Add embedding example
- [ ] Upgrade dependencies
- [x] Move CLI code into a separate package
- [x] Update so that the puzzlescript package (or puzzlescript-web package) has 0 dependencies
- [x] Get CI tests running again
- [x] get Codecov reporting
- [x] Lint again
- [ ] Support when `` does not have an aria-live caption (by adding one)
- [ ] change the web handler to create a different event when a checkpoint occurs (so saving is easier)
- [ ] change the CLI so that you can specify the path to a puzzlescript game.
- [ ] get code coverage up to 100% by skipping untested code
- [ ] Generate ESModules and CJS: https://www.sensedeep.com/blog/posts/2021/how-to-create-single-source-npm-module.html
- [ ] convert puzzlescript-web to use Cypress and sourcemaps
- [ ] move the games and solutions into a separate package (`puzzlescript-games`)
- [ ] :fire: default exports because they are hard on IDEs and make for a confusing API
[npm-image]: https://img.shields.io/npm/v/puzzlescript.svg
[npm-url]: https://npmjs.org/package/puzzlescript
[downloads-image]: https://img.shields.io/npm/dm/puzzlescript.svg
[downloads-url]: https://npmjs.org/package/puzzlescript
[coverage-image]: https://img.shields.io/codecov/c/github/philschatz/puzzlescript.svg
[coverage-url]: https://codecov.io/gh/philschatz/puzzlescript





