Ren'Py for the web browser

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
User avatar
Beuc
Regular
Posts: 85
Joined: Sat Sep 29, 2018 3:38 pm
Contact:

Ren'Py for the web browser

#1 Post by Beuc »

Hi,

A few month ago I ported the old-style 2D/RPG Dink Smallwood desktop game to the web.
Since then I've been experimenting on porting the next best thing in the browser: Ren'Py ;)

After lots of pitfalls and dead-ends, several layers of portability, I'm glad to present a first working tech demo!

Image
https://renpy.beuc.net/demo/


Also I'm freelance/self-employed and I'd very much like to dedicate more time on this so it can be 100% functional and integrated in the standard Ren'Py in the end, so I've setup a Patreon if you want to the project get out [faster] :)

Image
https://www.patreon.com/Beuc


More info on this project at:
https://renpy.beuc.net/

-

EDIT: now integrated in Ren'Py!
Image

Naturally I'd very much welcome your feedback (does it work for you, what browser...)
Last edited by Beuc on Mon Sep 30, 2019 12:19 pm, edited 8 times in total.

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Ren'Py for the Web - first version

#2 Post by PyTom »

This is officially one of the coolest things I've ever seen.

Edit: Would you mind pming me, when you get a chance. I'd be interested in how you managed to get Ren'Py running inside the browser, since it seems like you would have had to eliminate the threading from the main loop. I didn't think that would be possible - I'd like to know how you did it, and see if we can integrate these changes into Ren'Py proper so they don't go stale.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
Beuc
Regular
Posts: 85
Joined: Sat Sep 29, 2018 3:38 pm
Contact:

Re: Ren'Py for the Web - first version

#3 Post by Beuc »

Thanks!

Glad to hear you're willing to include web-related changes in standard Ren'Py :)

Currently I have mods in lots of components (Ren'Py and non-Ren'Py), I'm progressively isolating and cleaning each so they can be officially included.
(also sent PM with more technical stuff)

User avatar
Beuc
Regular
Posts: 85
Joined: Sat Sep 29, 2018 3:38 pm
Contact:

Re: Ren'Py for the Web

#4 Post by Beuc »

Hey,

I made some improvements, now it's faster with Firefox, and there's initial sound support.
I also added the Tutorial for testing.

More importantly, you now can test your own local game in the web player:

Image


Check https://renpy.beuc.net/ , share the news if you like this project, and leave feedback!

User avatar
Beuc
Regular
Posts: 85
Joined: Sat Sep 29, 2018 3:38 pm
Contact:

Re: Ren'Py for the Web

#5 Post by Beuc »

New version uploaded at https://renpy.beuc.net/
- Improve performances (WASM support) for Chrome/Chromium
- Contribute transparency (alpha) fix in official Emscripten
- Start structuring the compilation process to test multiple emscripten versions/patches

Feedback welcome!

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Ren'Py for the Web

#6 Post by PyTom »

That really is much nicer in Chrome. I'd say that with the exception of the stuttering in sound, it's rapidly getting playable.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
Beuc
Regular
Posts: 85
Joined: Sat Sep 29, 2018 3:38 pm
Contact:

Re: Ren'Py for the Web

#7 Post by Beuc »

Thanks for testing and sharing the feedback, much appreciated.
I myself get audio jitter at game interactions in Chrome, and normally not in Firefox (except sometimes when it happens all the time).

After more testing the bottleneck doesn't seem to be the audio decoding, but simply the rest of Ren'Py taking too long.
Due to a limitation in today's WebAudio, audio is not completely separate, see this fix attempt.

I plan more testing to see if there's a better way.

User avatar
Beuc
Regular
Posts: 85
Joined: Sat Sep 29, 2018 3:38 pm
Contact:

Re: Ren'Py for the Web

#8 Post by Beuc »

This week's progress:

- Presplash image
- Image prediction now working
- Open web links in a new tab (you'll get a popup warning though, I don't think that can be bypassed)
- emscripten: now can query current WebGL attributes (notably alpha/transparency)
- Audio optimization tests. My current opinion is we'll need multithreading support to get better perfs; this requires me to contribute more with the Emscripten project as well as incoming support in the browsers (more precisely "SharedArrayBuffer" - Chrome starts enabling it but it doesn't work for me yet, and in Firefox you can enable it with a few clicks).
- SharedArrayBuffer experiments

Let me know how well/bad that works for you.

User avatar
Andredron
Miko-Class Veteran
Posts: 700
Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:

Re: Ren'Py for the Web

#9 Post by Andredron »

Beuc wrote: Sun Oct 21, 2018 4:14 pm This week's progress:

- Presplash image
- Image prediction now working
- Open web links in a new tab (you'll get a popup warning though, I don't think that can be bypassed)
- emscripten: now can query current WebGL attributes (notably alpha/transparency)
- Audio optimization tests. My current opinion is we'll need multithreading support to get better perfs; this requires me to contribute more with the Emscripten project as well as incoming support in the browsers (more precisely "SharedArrayBuffer" - Chrome starts enabling it but it doesn't work for me yet, and in Firefox you can enable it with a few clicks).
- SharedArrayBuffer experiments

Let me know how well/bad that works for you.
Hello, With Android can not run your projects online
Image

Black screen

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3785
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Ren'Py for the Web

#10 Post by Imperf3kt »

Android's Google Chrome is actually Chromium. I'm not sure about Firefox, but my guess is maybe the browser?
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
Beuc
Regular
Posts: 85
Joined: Sat Sep 29, 2018 3:38 pm
Contact:

Re: Ren'Py for the Web

#11 Post by Beuc »

Thanks for the screenshot!
I got this myself when testing on Android today:
- with the stock browser, I couldn't get the reason
- with new Firefox and Chromium (and remote debugging) I was told "out of memory"
With Android Firefox this works sometimes, so I suspect my phone indeed doesn't have enough memory to run RenPyWeb (I have 2BG, these web things are hungry) :/

Maybe there's a way to optimize the memory footprint.

I also should check how to make these errors more visible, they are hidden by default.

User avatar
Beuc
Regular
Posts: 85
Joined: Sat Sep 29, 2018 3:38 pm
Contact:

Re: Ren'Py for the Web

#12 Post by Beuc »


User avatar
ComputerArt.Club
Veteran
Posts: 427
Joined: Mon May 22, 2017 8:12 am
Completed: Famous Fables, BoPoMoFo: Learn Chinese, Santa's workshop, Cat's Bath, Computer Art Club
Location: Taiwan
Contact:

Re: Ren'Py for the Web

#13 Post by ComputerArt.Club »

Wow! This is cool! I'm surprised it hasn't received more attention! Well done!

User avatar
Beuc
Regular
Posts: 85
Joined: Sat Sep 29, 2018 3:38 pm
Contact:

Re: Ren'Py for the Web

#14 Post by Beuc »

Thanks!
If you've got suggestions on where to reach out fellow VN devs, I'm all ears ;)

User avatar
Beuc
Regular
Posts: 85
Joined: Sat Sep 29, 2018 3:38 pm
Contact:

Re: Ren'Py for the Web

#15 Post by Beuc »


Post Reply

Who is online

Users browsing this forum: No registered users