image/svg+xml

About

I'm working on porting the Ren'Py framework to the HTML5 web browser - so you can publish Visual Novel games online :)

Donate and help the development go faster!

Test the current version (7.3.0.155 / 2019-05-26)

(start-up may be long, let it load for half a minute)
The Question - Web Edition Tutorial - Web Edition
(Shitf+O for dev console, F3 for perfs)

Download

RenPyWeb is now integrated in the official Ren'Py launcher (development version)!
Can you fetch it at
nightly.renpy.org/current/. Leave feedback!

Development: contributions much welcome. Check the official Ren'Py repository at:
github.com/renpy/renpyweb

Plug: I also develop the Ren'Py Translator ToolKit for PO files - give it a try :)

For the stable versio of Ren'Py (7.2.2), there's a also separate devkit without Launcher integration:

Examples:
beuc.itch.io/the-question-web
newgrounds.com/portal/view/729314
You can also include more than one game and select them using ?game=xxx.zip
renpy.beuc.net/play/?game=the_question.zip
renpy.beuc.net/play/?game=tutorial.zip
(renpy.beuc.net/play/?game=https://somewhere-else.net/game.zip is blocked so a user cannot be tricked into running a malicious game)

Testing locally: with Firefox, just double-click on index.html. With Chromium, you need a local webserver; python3 -m http.server 8080 in the RenPyWeb directory, or install XAMPP.

Games

Here are a few public games that use RenPyWeb.

This list of games is not curated, use at your own risk.

Let me know if you made a web version of your game :)

F.A.Q

RenPyWeb's goal is to run your game without additional work. However the web is a very different environment so here are a couple things to know.

Size: RenPyWeb currently needs to download the full game before playing, so you'll need to optimize your game if you want your players to be patient enough to play it (100-150MB tops)!
I'm thinking of download and cache strategies that will help with that (see
roadmap). But even then this is the web, things need to be lighter.
Solutions include: using layered images, making a lower-res or lossy/jpg version, use the .webp image format, dropping (some) audio, drop videos (not supported yet), splitting in chapters, etc.
Note on Python environment: the RenPyWeb Python environment is minimal for size reasons. You may ship additional Python modules in your Ren'Py game. Alternatively you can try placing additional .pyo files (e.g. from your Ren'Py SDK) in /lib/python2.7 in your game.zip.

Savegame: user savegames are linked to the webpage domain.
Ideally, provide a stable (sub)domain - like this page.
Some hosts may change your domain on new upload, causing previous savegames to become unreachable.
In addition, a game can read/modify savegames from other games hosted at the same domain. Ren'Py will ignore them, but a malicous game developer could do bad things.
For itch.io (hosts at XXX.ssl.hwcdn.net, previously at commondatastorage.googleapis.com) it's not clear how often the domain may change: see How to save data? and HTML5 game : Save data locally.
For newgrounds all games are hosted at uploads.ungrounded.net so other games could read your player's data. NG passes the user identity and session as querystring, though that only helps for logged-in users.
Last, if the user blocked 3rd-party cookies (by default in Debian Chromium) and running the game in a iframe (most web game hosts), savegames are lost on reload (discuss).
In doubt, remind players to export their savegames from RenPyWeb's top-left menu.

Network: browser outgoing connections are secured by Same-origin policy. In addition, the browser can only perform XHR and WebSocket (i.e. no direct TCP/IP or UDP/IP connections).
WebSockets are initiated transparently when you make a TCP/IP connection from Python, but you need a specific server, or a service proxy (cf. Introduction to Emscripten Sockets) on the developer's server side.
Dev notes: more generally if your game waits on a connection (which may take several seconds) this will freeze the game (graphics and sound, as there's no threading). We probably need an asynchronous Python lib for HTTP connections (i.e. a "grequests"-like rather than "requests"-like), based on WebSockets. Alternatively the game could use XHR through Emscripten-specific functions such as emscripten_async_wget (which I didn't expose yet in RenPyWeb/python-emscripten) and is asynchronous. emscripten_wget is synchronous and requires -s ASYNCIFY=1 which is deprecated/broken. emscripten_fetch has similar features & restrictions.
Suggestions welcome :)

Mobile: mobile browsers are a bit behind when it comes to web technologies, and RenPyWeb currently may not work well on these.
Another issue is the lack of text input, which is common to mobile games in general; if you require the user to enter text, you may need to implement a virtual keyboard in Ren'Py itself. If you know a technique to display use the virtual keyboard in mobile games, please share :)

Presplash: add a web-presplash.png or web-presplash.jpg at the top-level of your game (above, not inside, your game directory, along with android-presplash.*).

Web hosts format: zip all the files from the build directory (so index.html, game.zip, index.wasm.gz, etc. are at the top-level of your zip archive). For itch.io, tick "This file will be played in the browser" when uploading.

Feedback

Feedback welcome!
Patreon - e-mail - Lemma Soft Forums - itch.io - newgrounds

Roadmap

(in no definite order)

Status reports

2019 week 25 (2019-06-23)

2019 week 24 (2019-06-16)

2019 week 23 (2019-06-09)

2019 week 22 (2019-06-02)

2019 week 21 (2019-05-26)

2019 week 20 (2019-05-19)

2019 week 19 (2019-05-12)

2019 week 18 (2019-05-05)

2019 week 17 (2019-04-28)

2019 week 16 (2019-04-21)

2019 week 15 (2019-04-14)

2019 week 14 (2019-04-07)

2019 week 13 (2019-03-31)

2019 week 12 (2019-03-25)

2019 week 9 (2019-03-03)

2019 week 8 (2019-02-24)

2019 week 6 (2019-02-10)

2019 week 5 (2019-02-03)

2019 week 4 (2019-01-27)

2019 week 3 (2019-01-20)

2018 week 52 (2018-12-30)

2018 week 50 (2018-12-16)

2018 week 49 (2018-12-09)

2018 week 48 (2018-12-02)

2018 week 47 (2018-11-25)

2018 week 46 (2018-11-18)

2018 week 45 (2018-11-11)

2018 week 44 (2018-11-04)

2018 week 43 (2018-10-29)

2018 week 42 (2018-10-21)

2018 week 41 (2018-10-14)

2018 week 40 (2018-10-07)

2018 week 39 (2018-09-30)

Before