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.
Message
Author
User avatar
Beuc
Newbie
Posts: 21
Joined: Sat Sep 29, 2018 3:38 pm
Contact:

Ren'Py for the web browser

#1 Post by Beuc » Sun Sep 30, 2018 6:15 am

Hi,

A few month ago I ported the old-style 2D/RPG Dink Smallwood desktop game to the web (https://play.freedink.org/).
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/

Naturally I'd very much welcome your feedback (does it work for you, what browser...)
Last edited by Beuc on Tue Nov 20, 2018 8:52 am, edited 3 times in total.

User avatar
PyTom
Ren'Py Creator
Posts: 15269
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 » Sun Sep 30, 2018 1:42 pm

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
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Beuc
Newbie
Posts: 21
Joined: Sat Sep 29, 2018 3:38 pm
Contact:

Re: Ren'Py for the Web - first version

#3 Post by Beuc » Sun Sep 30, 2018 4:39 pm

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
Newbie
Posts: 21
Joined: Sat Sep 29, 2018 3:38 pm
Contact:

Re: Ren'Py for the Web

#4 Post by Beuc » Sun Oct 07, 2018 7:06 am

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
Newbie
Posts: 21
Joined: Sat Sep 29, 2018 3:38 pm
Contact:

Re: Ren'Py for the Web

#5 Post by Beuc » Sun Oct 14, 2018 2:26 pm

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: 15269
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 » Mon Oct 15, 2018 9:02 pm

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
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Beuc
Newbie
Posts: 21
Joined: Sat Sep 29, 2018 3:38 pm
Contact:

Re: Ren'Py for the Web

#7 Post by Beuc » Wed Oct 17, 2018 3:59 pm

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
Newbie
Posts: 21
Joined: Sat Sep 29, 2018 3:38 pm
Contact:

Re: Ren'Py for the Web

#8 Post by Beuc » 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.

User avatar
Andredron
Veteran
Posts: 207
Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:

Re: Ren'Py for the Web

#9 Post by Andredron » Mon Oct 22, 2018 3:00 pm

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
I know, I have terrible English
I'm writing a Renpy textbook (in Russian). I would be glad if someone translated into an English or German textbook https://yadi.sk/d/ZX_DonP63USRru Update 22.06.18

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

Re: Ren'Py for the Web

#10 Post by Imperf3kt » Mon Oct 22, 2018 3:55 pm

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.

User avatar
Beuc
Newbie
Posts: 21
Joined: Sat Sep 29, 2018 3:38 pm
Contact:

Re: Ren'Py for the Web

#11 Post by Beuc » Mon Oct 22, 2018 4:39 pm

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
Newbie
Posts: 21
Joined: Sat Sep 29, 2018 3:38 pm
Contact:

Re: Ren'Py for the Web

#12 Post by Beuc » Mon Oct 29, 2018 2:13 pm


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

Re: Ren'Py for the Web

#13 Post by ComputerArt.Club » Tue Oct 30, 2018 11:01 am

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

User avatar
Beuc
Newbie
Posts: 21
Joined: Sat Sep 29, 2018 3:38 pm
Contact:

Re: Ren'Py for the Web

#14 Post by Beuc » Tue Oct 30, 2018 4:43 pm

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

User avatar
Beuc
Newbie
Posts: 21
Joined: Sat Sep 29, 2018 3:38 pm
Contact:

Re: Ren'Py for the Web

#15 Post by Beuc » Sun Nov 04, 2018 4:27 pm


Post Reply

Who is online

Users browsing this forum: No registered users