development:player:web
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
development:player:web [2016/03/19 16:47] – Fix link to player-js tarball and update php file finder path fdelapena | development:player:web [2021/11/11 09:38] (current) – outdated ghabry | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== EasyRPG Player for the Web ====== | ====== EasyRPG Player for the Web ====== | ||
- | EasyRPG supports running games directly inside your web browser. | + | EasyRPG |
- | If you want to test it you can play with a [[https://easy-rpg.org/ | + | If you want to test it you can play with a [[https://easyrpg.org/ |
- | ===== How does it work ===== | + | ===== THIS GUIDE IS OUTDATED ===== |
+ | |||
+ | **Please do not follow this guide anymore!** | ||
+ | |||
+ | **[[https:// | ||
+ | |||
+ | ===== How it works ===== | ||
Web request are asynchronous. This means that all assets like pictures and music must be fetched asynchronously. When the Player wants to display a new graphic it will appear on the desktop versions (Windows, Linux, Android, ...) immediately but on the web it will be invisible while the file is downloaded. Once the downloaded finishes it is replaced with the real image. | Web request are asynchronous. This means that all assets like pictures and music must be fetched asynchronously. When the Player wants to display a new graphic it will appear on the desktop versions (Windows, Linux, Android, ...) immediately but on the web it will be invisible while the file is downloaded. Once the downloaded finishes it is replaced with the real image. | ||
Line 13: | Line 19: | ||
===== Hosting your own games ===== | ===== Hosting your own games ===== | ||
- | Hosting your own games is quite simple. Just follow these three steps. | + | Hosting your own games is quite simple. Just follow these steps. |
==== Deploying the Player on your server ==== | ==== Deploying the Player on your server ==== | ||
- | [[https://easy-rpg.org/jenkins/ | + | [[https://ci.easyrpg.org/ |
- | Your server needs support for PHP (most servers support this). | + | You will get the following files and folder: |
- | + | ||
- | You will get the following files: | + | |
* index.html | * index.html | ||
+ | * index.wasm | ||
* index.js | * index.js | ||
- | | + | * games/ |
- | | + | |
- | ==== Preprocessing steps for games ==== | + | If you want to //try it locally// you need a HTTP server. Just opening the '' |
- | Because of current player for the web is not supporting MP3 playback properly in browser yet (there are resampling and buffering issues in SDL_mixer) you should convert '' | ||
- | |||
- | === MP3 to Ogg Vorbis conversion === | ||
- | |||
- | == GNU/Linux command line option == | ||
- | |||
- | * First, install '' | ||
- | |||
- | for song in *.mp3; do lame --decode " | ||
- | |||
- | * Then, install '' | ||
- | |||
- | oggenc -q-1 *.wav | ||
- | |||
- | Beware of existing MS ADPCM WAV files, they are not supported by oggenc. If you get conversion errors, use '' | ||
- | |||
- | == Windows drag and drop tools option == | ||
- | |||
- | * First, download [[http:// | ||
- | |||
- | * Open the LameDropXPd app (it is a square window), select all MP3 files from the folder, then drag and drop them over the square app window. They will be converted to WAV. | ||
- | |||
- | * Then, download [[http:// | ||
- | |||
- | * Open the oggdropXPd app (it is a square window), select all WAV files from the folder, then drag and drop them over the square oggdropXPd window. They will be converted to Ogg Vorbis. If you want to make smaller Ogg Vorbis files, do secondary mouse button click over the square window to select options and adjust the compression quality option to -1 (~48 kbps) or -2 (~32 kbps). | ||
==== Deploying a game on your server ==== | ==== Deploying a game on your server ==== | ||
- | The following only apply when you use our '' | + | Because |
- | + | ||
- | Your games are expected in subdirectories of the '' | + | |
- | + | ||
- | If your '' | + | |
- | + | ||
- | Run '' | + | |
- | + | ||
- | Now open the '' | + | |
- | + | ||
- | ===== Technical details about the server side ===== | + | |
- | + | ||
- | The '' | + | |
- | + | ||
- | Depending on the requested '' | + | |
- | + | ||
- | This is required because Windows is case-insensitive | + | |
- | + | ||
- | ==== Example ==== | + | |
- | + | ||
- | The file '' | + | |
- | + | ||
- | ==== API ==== | + | |
- | + | ||
- | Our file finder is stored under '' | + | |
- | The directory struture of the '' | + | You can get the tool here: |
- | The only GET arguments that must be supported are '' | + | * {{https:// |
+ | * {{https:// | ||
- | '' | + | Place the gencache executable in a game working folder (the folder containing RPG_RT.* files) to generate the '' |
- | '' | + | Your games are expected in subdirectories of the '' |
- | When a '' | + | Now access the '' |
development/player/web.1458406059.txt.gz · Last modified: 2016/03/19 16:47 (external edit)