Page 1 of 1
Play Ren'Py games online, like flash games?
Posted: Tue Oct 28, 2008 8:47 pm
by engchin
Hi. I'm a guy just started to learn Ren'Py. I've been playing with it for few days and it does impress me pretty much
From what I know, Ren'Py build games in .exe format and the games can be played on windows, linux and mac. My question is, is there anyway to create Ren'Py games that can be played online, such as creating/exporting the games in .swf Flash format? I believe it would be great if the games can be played online (like flash games).
Thanks in advanced.
Re: Play Ren'Py games online, like flash games?
Posted: Tue Oct 28, 2008 10:14 pm
by Twar3Draconis
Unless you have an application which translates Python, SDL, and OpenGL into Flash- Then no.
Re: Play Ren'Py games online, like flash games?
Posted: Tue Oct 28, 2008 10:39 pm
by engchin
Twar3Draconis wrote:Unless you have an application which translates Python, SDL, and OpenGL into Flash- Then no.
Hmm.. then is there such a program to do so?
Or perhaps is there any other programs that could create visual novel games like Ren'Py and can be played online? Flash seems a bit too complicated for me and takes quite a lot time to learn. I like Ren'Py because it is easy to build games with it.
Re: Play Ren'Py games online, like flash games?
Posted: Wed Oct 29, 2008 5:57 am
by monele
There is no such conversion program as far as I know, and apart from Flash...... I don't think there's any engine for online VNs.... One could make one in Javascript probably, and I remember seeing one actually, but I think it only allowed one to use the premade graphics.
Re: Play Ren'Py games online, like flash games?
Posted: Wed Oct 29, 2008 8:08 pm
by engchin
Hmm... Ok, I guess I'll just need to work hard and create my animation using flash then, coz i would like to put it on the web...
Thank you all for your kind help...

Re: Play Ren'Py games online, like flash games?
Posted: Fri Oct 31, 2008 9:18 am
by herenvardo
Disclaimer: I have not tried this, and it is entirely based on speculation upon theory.
Said that, here is an idea that maybe could work, based on a few things we know:
- Fact: Ren'py is based on Python, and in principle can be run anywhere where Python and the pygame library could be run.
- Fact: IronPython runs python upon any CLR implementation (such as Microsoft's .Net or Novell's community-powered Mono project).
- Fact: Microsoft's Silverlight (and its Mono counterpart Moonlight) allows embeeding CLR applications on webpages (as long as the browser has the appropriate Silverlight/Moonlight plugin, of course, but that's just like Flash applets require Adobe's Flash Player).
- Speculation: If someone can manage to run Ren'py upon IronPython upon Silverlight/Moonlight; then it would be possible to embeed a Ren'py game on a webpage.
- Fact: I have absolutelly no idea about how hard would this be ^^; Maybe it's enought to toss in everything and it magically works; or maybe it requires a lot of tinkering with Ren'py's and IronPython's code before it does something near enough to "working".
That's just an idea; and in theory it should be possible. I can't say anything about how possible would it be on practice, and I have other priorities before trying to find that out.
Re: Play Ren'Py games online, like flash games?
Posted: Fri Oct 31, 2008 9:58 am
by delta
This will break on the simple fact alone that some of Ren'Py's display routines and libraries are not pure Python (pygame and SDL, i.e. C). It's not impossible to port THOSE to Silverlight too, of course, but it's almost certainly much more trouble than it's worth. I am willing to bet that it will never happen.
Re: Play Ren'Py games online, like flash games?
Posted: Fri Oct 31, 2008 10:59 am
by herenvardo
delta wrote:This will break on the simple fact alone that some of Ren'Py's display routines and libraries are not pure Python (pygame and SDL, i.e. C). It's not impossible to port THOSE to Silverlight too, of course, but it's almost certainly much more trouble than it's worth. I am willing to bet that it will never happen.
Ok... where I said "If someone can manage to run Ren'py upon IronPython upon Silverlight/Moonlight;" I should have said "If someone can manage to run Ren'py
, including pygame and other dependencies, upon IronPython upon Silverlight/Moonlight;". But note that this would only be a clarification, already implicit in the condition "If someone can manage to run Ren'py".
OTOH, it's worth mentioning that I might be porting Ren'py to IronPython anyway,
for some other reason, so you are taking a real risk if you really bet on this

.
Re: Play Ren'Py games online, like flash games?
Posted: Fri Oct 31, 2008 11:50 am
by delta
Well, I was kind of mystified by your statement that "maybe it just runs out of the box", which is 100% definitely not the case, not even close. And while I don't doubt that it can be ported to IronPython (which is, after all, just another Python runtime), running it inside Silverlight is something else again. Mainly because i don't think the graphics engine can be ported just to a sandboxed VM just like that.
Re: Play Ren'Py games online, like flash games?
Posted: Fri Oct 31, 2008 1:47 pm
by Wintermoon
Personally I would aim for
Jython instead.
Re: Play Ren'Py games online, like flash games?
Posted: Fri Oct 31, 2008 2:16 pm
by PyTom
I'm kinda thinking that an eventual goal for Ren'Py might be to abstract out the pygame and ren'py module functionality somehow. If that was placed into a single central place, we could then replace it with new versions, such as an opengl version, and maybe jython/java and ironpython/silverlight versions. (If pypy ever works, it might eventually become possible to compile to flash or even dhtml.)
We're talking about long term goals here, though.
Re: Play Ren'Py games online, like flash games?
Posted: Sun Nov 02, 2008 6:23 pm
by Hentai Senshi
PyTom wrote:I'm kinda thinking that an eventual goal for Ren'Py might be to abstract out the pygame and ren'py module functionality somehow. If that was placed into a single central place, we could then replace it with new versions, such as an opengl version, and maybe jython/java and ironpython/silverlight versions. (If pypy ever works, it might eventually become possible to compile to flash or even dhtml.)
We're talking about long term goals here, though.
A script to convert simple VN code from Ren'Py to some mix of CGI/JS/HTML wouldn't be at all hard, but the trouble is that all but the simplest
of Javascript seems to behave wildly differently from browser to browser. (Also, image load latency would, I think, be unpleasant to most users.)
Re: Play Ren'Py games online, like flash games?
Posted: Sun Nov 02, 2008 8:38 pm
by herenvardo
Hentai Senshi wrote:A script to convert simple VN code from Ren'Py to some mix of CGI/JS/HTML wouldn't be at all hard, but the trouble is that all but the simplest
of Javascript seems to behave wildly differently from browser to browser. (Also, image load latency would, I think, be unpleasant to most users.)
Actually, cross-browser javascript isn't that hard to get right (you need to limit yourself to a well-defined set of browsers, but once you do, you can, for example, write complex applications that work well in IE6+, FF2+, and O8+).
The real issue would come if the game uses python code for something else than declaring characters and images: then you'd need either a Python -> JavaScript translator, which has a huge room for bugs, or a Python interpreter implemented on JavaScript, which can be awfully slow.
About image load latency, <img> elements with style="display: none;" should be enough to "request" the browser to download them all; then use events from the script so the game waits for everything to be downloaded before starting.
Another approach could be going nuts with AJAX, as many sites are already doing (often with no other purpose than showing off); but that'd be equally complex.
If there were any broswer that supported <script type="application/x-python"> things would start getting more interesting, but I don't know of any.
Re: Play Ren'Py games online, like flash games?
Posted: Mon Nov 03, 2008 12:17 am
by Hentai Senshi
herenvardo wrote:Hentai Senshi wrote:A script to convert simple VN code from Ren'Py to some mix of CGI/JS/HTML wouldn't be at all hard, but the trouble is that all but the simplest
of Javascript seems to behave wildly differently from browser to browser. (Also, image load latency would, I think, be unpleasant to most users.)
Actually, cross-browser javascript isn't that hard to get right (you need to limit yourself to a well-defined set of browsers, but once you do, you can, for example, write complex applications that work well in IE6+, FF2+, and O8+).
But an app that only works in IE/Firefox/Opera is
broken! *grin* (I use Konqueror.) Rage about mainstream-centric design aside, though, Javascript support for things like dissolves is dodgy enough that it would likely be better to leave it out entirely.
The real issue would come if the game uses python code for something else than declaring characters and images: then you'd need either a Python -> JavaScript translator, which has a huge room for bugs, or a Python interpreter implemented on JavaScript, which can be awfully slow.
Anywhere where the Python is game logic rather than animation, it could conceivably be handled by a CGI.
About image load latency, <img> elements with style="display: none;" should be enough to "request" the browser to download them all; then use events from the script so the game waits for everything to be downloaded before starting.
I'd thought there at least one browser that optimized away the download of display: none elements - but yeah, that could at least be tried.
Another approach could be going nuts with AJAX, as many sites are already doing (often with no other purpose than showing off); but that'd be equally complex.
And I think anywhere AJAX could be used that better compatibility would likely be attained by just using normal HTML and links.
If there were any broswer that supported <script type="application/x-python"> things would start getting more interesting, but I don't know of any.
I think someone had embedded Python (or perhaps it was Perl?) in a browser back in the late 1990s, but if I'm going to tell users to install a new web browser I might as well just tell them to download the game.
Also I don't think I could have decent soundtracks without an unacceptable amount of lag (unless I went to midi, and that's also quite constraining).
*shrug* At least as long as CHS doesn't see this thread, I won't be forced to mess with Ren'Py->Web conversions, though.
Re: Play Ren'Py games online, like flash games?
Posted: Mon Nov 03, 2008 12:26 am
by PyTom
Honestly, I think the right way to handle this would be to compile a subset of Ren'Py/Python to some sort of bytecode, and then to run that, using javascript, java, silverlight, or something else.
This (ultralight) is a bigger project than I'd be willing to do unfunded. But if someone really wants to write Ren'Py games and run them on the DS or something like that, let me know!