Ren'Py in the 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
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:

Ren'Py in the Browser

#1 Post by PyTom »

I've been working on a technology for displaying Ren'Py games in a user's web browser, and over the past few days, I've gotten that technology to the point where I can do a public demo.

I still consider browser based games to be inferior to downloadables for a lot of reasons. Probably the most important one is the game preservation aspect - downloading games to peoples' computers distributes them throughout the 'net, ensuring that a single failure won't render the gamer nonexistent. The browser also provides an inferior experience, as it mediates the game's access to input and output hardware. For that reason, I think Ren'Py in the browser should be limited to game demos.
screenshot.png
The way Ren'Py in the browser works is that a server runs Ren'Py, and has it display to a virtual screen. The contents of this virtual screen are then streamed to a user's browser window, and input/output events are sent back to the server, allowing the user to interact with the game.

This approach has upsides and downsides to it. The big upside here is that we support all of the programmability and customizability of Ren'Py. Custom text boxes aren't a problem - neither are turn-based interfaces, like you would see in RPGs or Dating Sims. Screens and python are both supported. RitB supports the same sort of styling you'll see in Ren'Py games.

The downside is that this technology works by remote-display. If the screen updates too quicky, the user's connection won't be able to take that data, and things will begin to lag. Sending the updates can also consume a lot of bandwidth - potentialy, a cost prohibitive amount. I plan to cheat the dissolve transition, but most transitions and animations won't work here. There's also a lag aspect, which is largely controlled by ping time. If it takes you 250ms to ping my server, it means that there will be a minimum of a quarter second between when you click and when the screen updates. There's also a limit to the number of simultaneous sessions that can be running, and the length of a session.

Okay, caveats aside, here's the demo:

http://dev.renpy.org:9999/start/the_question

This is running on my development pc, so it will probably only be up for the next few days. It should work with browsers that support canvas and either Websocket or Flash - so it will likely work in chrome, firefox, safari, and opera, and probably won't work in IE.

Feedback on success or failure is welcome, as is feedback about the performance. Letting me know the ping times you see would also be useful.


This service is fairly expensive to run, hosting-cost wise. My current plan is to revive the Ren'Py Shop project - inspired by the Amazon App Store for Android, people will be able to try out a "game excerpt" for five minutes or so before they decide to purchase the game or download a full demo. The cost of running the service would (hopefully) be offset by affiliate revenue from increased sales.

I'm not sure how this would work with free games. While I'm not morally opposed to hosting demos of free games (I'd never want to put full games up in this manner), I don't know how I'd recover the hosting costs - which are already fairly high.
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
jack_norton
Lemma-Class Veteran
Posts: 4084
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Re: Ren'Py in the Browser

#2 Post by jack_norton »

Good luck with the Ren'Py store, you already know you can have all my games. Last night I played Planet Stronghold in browser and apart the slowness (I have a slow connection) was running like the downloadable. But yes, I agree this is useful in the current state just to let people try immediately the game and then download it.
follow me on Image Image Image
computer games

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 in the Browser

#3 Post by PyTom »

I kind of want people's opinions as to the slowness - is it acceptable to you?
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
redcat
Regular
Posts: 189
Joined: Thu Oct 30, 2008 9:30 am
Contact:

Re: Ren'Py in the Browser

#4 Post by redcat »

@PyTom--> I couldn't even start it. Perhaps my connection was too slow that your server kicked me out instantly. :oops:
I'm using Mozilla Firefox 3.5.8

Code: Select all

Data transfer: 0 KiB (0 Kbps) Ping time: unknown ms Port: 9989 
Meowwngg...??

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 in the Browser

#5 Post by PyTom »

Hmm... firefox 3.5 might be too old to run the current version.
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
jack_norton
Lemma-Class Veteran
Posts: 4084
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Re: Ren'Py in the Browser

#6 Post by jack_norton »

Works in FF4 and Chrome. The Question (so a "normal" VN) is playable here, a bit slow but my connection speed is also slow (640 Kbps)
follow me on Image Image Image
computer games

User avatar
Camille
Eileen-Class Veteran
Posts: 1227
Joined: Sat Apr 23, 2011 2:43 pm
Completed: Please see http://trash.moe
Projects: the head well lost
Organization: L3
Tumblr: narihira
Deviantart: crownwaltz
itch: lore
Contact:

Re: Ren'Py in the Browser

#7 Post by Camille »

I'm using Safari (I'm on an iMac) and I've got Verizon cable internet: Data transfer: 262 KiB (115 Kbps) Ping time: 67 ms Port: 9989

I didn't notice any lag at all, which was great. :3 All the images/text had this sort of JPG garbling effect, though. Aside from that, it felt just like playing a Ren'Py VN normally.

Adorya
Miko-Class Veteran
Posts: 541
Joined: Fri Aug 18, 2006 4:51 pm
Contact:

Re: Ren'Py in the Browser

#8 Post by Adorya »

The game wouldn't start on Firefox 4.01, I could only run it on Chrome.

Data transfer: 552 KiB (91 Kbps) Ping time: 383 ms Port: 9990

My connection is quite below average if you consider net gaming (2 Mb, 300 ms ping at best) so it work like any FPS online : the lag is bearable but when heavy data are sent it will spike up to 1500 ms (at the end of the story with big graphic) and misclick will happen.

If a demo would impress me, especially advanced VN with gameplay part on it, I would prefer to download it instead of streaming it, but as using cloud is supposed to be the future and internet user getting faster connection, I won't mind.

RayRayTea
Regular
Posts: 69
Joined: Thu May 07, 2009 4:16 pm
Projects: The Stolen Diamond Ring (a mystery VN)
Contact:

Re: Ren'Py in the Browser

#9 Post by RayRayTea »

Works for me (using Chrome). Ping time: 248 ms (spikes to 800 occasionally).

From the description of how it works and from playing the demo I got the impression that it's barely usable even for the most straightforward VNs with a bit of branching (without any music or sound effects whatsoever). Maybe downscaling the thing before sending it and then zooming it in on destination would speed it up a bit (at a loss of quality admittedly but at least it'd be responsive)?

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

Re: Ren'Py in the Browser

#10 Post by DaFool »

PyTom wrote:My current plan is to revive the Ren'Py Shop project - inspired by the Amazon App Store for Android, people will be able to try out a "game excerpt" for five minutes or so before they decide to purchase the game or download a full demo. The cost of running the service would (hopefully) be offset by affiliate revenue from increased sales.
I would suggest signing up and coordinating all Ren'Py efforts to be compatible with the upcoming indie portal IndieCity:

http://www.indiecity.com/

since with the stagnation of the Ren'Py shop project, I decided on developing my game with an aim to hit IndieCity's opening release window instead. The promise they make is ALL indie games of sellable quality will be accepted. No need to beg from The Man from Valve or BigFishGames.

Right now they're already working on a distributed bandwidth Steam-like downloader and installer client. They also have a working Achievements-like system and automated referrer to tap into the long tail of indie games. Although I haven't dipped my fingers into the system yet since I'm not yet at that point.

But since more and more people are staking their livelihoods on Ren'Py during these trying times, it would be very beneficial if you can at least sign up and take a look behind the scenes. Since I was going to bug you anyway with regards to Indie City client integration later in the year.

It would be more awesome if Ren'Py projects can be demo'd through browser within IndieCity just as they're planning to do with Unity3D games.

User avatar
backansi
Veteran
Posts: 224
Joined: Sun May 31, 2009 7:15 am
Location: Korea, Republic of
Contact:

Re: Ren'Py in the Browser

#11 Post by backansi »

It worked :D. I think it's little bit slow, though...

Ping time: about 420 ms in both FF 4.0.1 & Chrome 11.0.696.65

User avatar
papillon
Arbiter of the Internets
Posts: 4107
Joined: Tue Aug 26, 2003 4:37 am
Completed: lots; see website!
Projects: something mysterious involving yuri, usually
Organization: Hanako Games
Tumblr: hanakogames
Contact:

Re: Ren'Py in the Browser

#12 Post by papillon »

Works, but seems slightly slow for what's a very simple game (and noticeable jpeging as mentioned). Ping time was 240ms.

If the slowness is fairly consistent no matter how complicated the game is, though, then this could be a useful method for tiny tasters of games. Wouldn't want to play a full demo in it IMO.

Ionait
Regular
Posts: 196
Joined: Wed Aug 26, 2009 5:54 pm
Organization: Chu! Bam! Pow!
Contact:

Re: Ren'Py in the Browser

#13 Post by Ionait »

Ping time 411. Data transfer wavered considerably between 35 and 60-some. A lot of lag the first time, so much that I got a little impatient in between the "I think..." and the small disjointed sentences you have to click through at first. It caused me to accidentally click "ask her later" before the options even appeared on the screen. Very laggy for me indeed.

Oh, running the latest version of Chrome! And proudly. :P

I agree about the statements that Renpy games shouldn't be played mainly in browsers. The reasoning for that is sound, and I think it would be somewhat of a step back in the VN community, honestly.

Wintermoon
Miko-Class Veteran
Posts: 701
Joined: Sat May 26, 2007 3:41 pm
Contact:

Re: Ren'Py in the Browser

#14 Post by Wintermoon »

It's perfectly playable on my ancient PowerPC Mac Mini running Safari 4.1.3. Yes, there's some lag, but the lag is trivial compared to the lag on most other websites. Google images is virtually unusable due to lag on the same computer. Even my good computer has more lag than that when reading online comic archives, and I do that all the time.

I can easily see this becoming the preferred distribution method for very short (i.e. <5 min) visual novels. Let me play through the entire game, then ask me if I want to download it.

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 in the Browser

#15 Post by PyTom »

I'm now somewhat cooling to this whole idea - it seems to be working for some people, but not for others. My gut feeling is that the difference is due to a combination of ping times and personal tolerance for slowness - some people can handle this, and some cannot.

To some extent, this lag is fixable - I can host the application in data centers in the US and Europe, for example. But that would cost more. The lack of sound is also fixable.

I think my big problem is - how does this compare with a simple video demo, hosted on youtube or vimeo or some place like that? Are there many people who would be convinced to download by a demo like this, that wouldn't be convinced by a video trailer?
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

Post Reply

Who is online

Users browsing this forum: No registered users