https://github.com/torahappy/easyrpg-web
EasyRPG web build and a modified index.html optimized for better iOS experiences
https://github.com/torahappy/easyrpg-web
easyrpg emscripten emscripten-game emscripten-port web
Last synced: 10 months ago
JSON representation
EasyRPG web build and a modified index.html optimized for better iOS experiences
- Host: GitHub
- URL: https://github.com/torahappy/easyrpg-web
- Owner: torahappy
- License: gpl-3.0
- Created: 2024-08-25T05:57:23.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-07-01T16:57:02.000Z (12 months ago)
- Last Synced: 2025-07-21T09:33:34.294Z (11 months ago)
- Topics: easyrpg, emscripten, emscripten-game, emscripten-port, web
- Language: JavaScript
- Homepage:
- Size: 12.6 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# easyrpg-web
A custom build script for EasyRPG Player for the web, with advanced features such as batch download save files, various utility functions, better button configuration and fixing some glitches related to iOS/Safari and ARPG support for touch control devices.
## How to build
Prebuilt binaries (the `index.js` file and `easyrpg-player.wasm` file) are included in the `www` directory in this repository. For reference, here is an example build procedure using Docker.
1. `cd build`
2. `docker run --rm -it -v $PWD:/easyrpg ubuntu`
3. `cd /easyrpg`
4. `bash ./build.sh`
5. `exit`
6. `bash ./copy.sh`
Finally, serve `www` using a HTTP(S) server like nginx, or follow the instructions below to setup a HTTP server with utility API activated.
## How to play a game
1. Place the game files in `www/games/`.
2. `cd www/games/`
3. `../../../gencache/gencache`
4. Serve the `www` directory using some HTTP(S) server.
5. Access to `www/index.html?game=` via a modern web browser.
### Web UI features
- basic control (8-direction arrows, Z, X and Shift)
- import/export save data (batch mode and single mode)
- "reload audio" button
- (TODO) other keys (F1, F2, F3, ...)
## Set up a server with API
You can setup a FastAPI server, which serves the main EasyRPG app, game files, and the utility API altogether. The server will start on port 9000. Visit `http://localhost:9000/?game=` and enjoy the game!
1. `cd api`
2. `python -m venv venv`
3. `venv/bin/python3 -m pip install -r requirements.txt`
4. `bash ./start.sh`
### Server features
- Soundfont selection (Replaces `easyrpg.soundfont` via HTTP filesystem.)
- Evaluate javascript codes
- Debug log
- (TODO) serverside savedata backup and restore
- (TODO) filesystem layer management
## Buttons
Unlike the original index.html on , the `data-key` property now can specify multiple keys at once, like `data-key="ArrowUp,ArrowRight"` to denote up-right movement for some action-RPG games. You can easily configure buttons by editing `index.html`.
By default, the keys are placed as such:
```
-----------------
- D F -
- -
- -
- -
- -
- 123 -
- 4 5 X -
- 678 ZS -
-----------------
D ... Open dialog (batch/indivisual download saves, upload saves, evaluate javascript code, resume audio if stopped)
1 ... Up-Left
2 ... Up
3 ... Up-Right
4 ... Left
5 ... Right
6 ... Down-Left
7 ... Down
8 ... Down-Right
X ... X button (Escape, Open Menu, etc.)
Z ... Z button (Confirm, Next, etc.)
S ... Shift button (Special Action for some games.
Also you can use it in the save menu to download/upload
save files! though uploading is not working
on iOS due to some permisssion issue)
F ... Fullscreen
```
## License
This program is licensed under GPLv3.
See `COPYING` for more information.