User Tools

Site Tools


development:player:web

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
development:player:web [2017/08/30 18:48] – Improve formatting fdelapenadevelopment:player:web [2020/09/20 21:54] – recommend python server. improve ?game wording ghabry
Line 5: Line 5:
 If you want to test it you can play with a [[https://easyrpg.org/play/|Demo of our TestGame]]. Try also a working game: [[https://easyrpg.org/play/?game=ib|Ib]] If you want to test it you can play with a [[https://easyrpg.org/play/|Demo of our TestGame]]. Try also a working game: [[https://easyrpg.org/play/?game=ib|Ib]]
  
-===== How does it work =====+===== 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 13:
 ===== 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 ====
Line 22: Line 22:
  
   * index.html   * index.html
-  * index.html.mem+  * index.wasm
   * index.js   * index.js
   * games/   * games/
  
-Note: if you want to try it locally you need a HTTP server, using ''file:'' protocol locally will not work, install Apache httpd server (or any other) on localhost instead. +If you want to //try it locally// you need a HTTP server. Just opening the ''index.html'' in your browser will not work. If you don't have a local webserver the simplest way is installing Python and running ''python -m http.server''. Then open ''http://localhost:8000/'' in your browser and navigate to your directory.
  
 ==== Deploying a game on your server ==== ==== Deploying a game on your server ====
Line 35: Line 34:
 You can get the tool here: You can get the tool here:
  
-  * {{https://ci.easyrpg.org/job/tools-win32/lastSuccessfulBuild/artifact/gencache/bin/gencache.exe|gencache for Windows}}+  * {{https://ci.easyrpg.org/job/tools-win32/lastSuccessfulBuild/artifact/bin/gencache.exe|gencache for Windows}}
   * {{https://ci.easyrpg.org/job/tools-linux/lastSuccessfulBuild/artifact/gencache.tar.gz|gencache for Linux}}   * {{https://ci.easyrpg.org/job/tools-linux/lastSuccessfulBuild/artifact/gencache.tar.gz|gencache for Linux}}
  
Line 42: Line 41:
 Your games are expected in subdirectories of the ''games'' directory. The default game executed is the one in ''games/default''. You can create further games by just by putting them in subdirectories of the ''games'' directory. Your games are expected in subdirectories of the ''games'' directory. The default game executed is the one in ''games/default''. You can create further games by just by putting them in subdirectories of the ''games'' directory.
  
-Now open the ''index.html'' file and your default game should start. To play a different game pass ''?game=folder_name'' to your index file.+Now access the ''index.html'' file and your default game should start. To play a different game pass ''?game=folder_name'' as part of the URL (query string) to your index file.
development/player/web.txt · Last modified: 2021/11/11 09:38 by ghabry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki