Play Ren'Py games online, like flash games?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
engchin
Newbie
Posts: 3
Joined: Tue Oct 28, 2008 8:25 pm
Contact:

Play Ren'Py games online, like flash games?

#1 Post 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). 8)

Thanks in advanced.

Twar3Draconis
Regular
Posts: 129
Joined: Thu Apr 19, 2007 12:07 am
Location: Michigan, United States, Terra
Contact:

Re: Play Ren'Py games online, like flash games?

#2 Post by Twar3Draconis »

Unless you have an application which translates Python, SDL, and OpenGL into Flash- Then no.
Image

engchin
Newbie
Posts: 3
Joined: Tue Oct 28, 2008 8:25 pm
Contact:

Re: Play Ren'Py games online, like flash games?

#3 Post 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.

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

Re: Play Ren'Py games online, like flash games?

#4 Post 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.

engchin
Newbie
Posts: 3
Joined: Tue Oct 28, 2008 8:25 pm
Contact:

Re: Play Ren'Py games online, like flash games?

#5 Post 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... :)

herenvardo
Veteran
Posts: 359
Joined: Sat Feb 25, 2006 11:09 am
Location: Sant Cugat del Vallès (Barcelona, Spain)
Contact:

Re: Play Ren'Py games online, like flash games?

#6 Post 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.
I have failed to meet my deadlines so many times I'm not announcing my projects anymore. Whatever I'm working on, it'll be released when it is ready :P

delta
Epitome of Generic
Posts: 525
Joined: Sat Dec 22, 2007 12:59 pm
Projects: yes
Contact:

Re: Play Ren'Py games online, like flash games?

#7 Post 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.
The rest is left as an exercise for the reader.

herenvardo
Veteran
Posts: 359
Joined: Sat Feb 25, 2006 11:09 am
Location: Sant Cugat del Vallès (Barcelona, Spain)
Contact:

Re: Play Ren'Py games online, like flash games?

#8 Post 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 :P.
I have failed to meet my deadlines so many times I'm not announcing my projects anymore. Whatever I'm working on, it'll be released when it is ready :P

delta
Epitome of Generic
Posts: 525
Joined: Sat Dec 22, 2007 12:59 pm
Projects: yes
Contact:

Re: Play Ren'Py games online, like flash games?

#9 Post 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.
The rest is left as an exercise for the reader.

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

Re: Play Ren'Py games online, like flash games?

#10 Post by Wintermoon »

Personally I would aim for Jython instead.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
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: Play Ren'Py games online, like flash games?

#11 Post 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.
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

Hentai Senshi
Regular
Posts: 105
Joined: Wed Aug 08, 2007 9:37 pm
Contact:

Re: Play Ren'Py games online, like flash games?

#12 Post 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.)
Project statii:
Yuri no Yume: Wet Night: Released!
Tentacularity: Released!
LoliFindsKitten: AlphaBetaThingy...

herenvardo
Veteran
Posts: 359
Joined: Sat Feb 25, 2006 11:09 am
Location: Sant Cugat del Vallès (Barcelona, Spain)
Contact:

Re: Play Ren'Py games online, like flash games?

#13 Post 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.
I have failed to meet my deadlines so many times I'm not announcing my projects anymore. Whatever I'm working on, it'll be released when it is ready :P

Hentai Senshi
Regular
Posts: 105
Joined: Wed Aug 08, 2007 9:37 pm
Contact:

Re: Play Ren'Py games online, like flash games?

#14 Post 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.
Project statii:
Yuri no Yume: Wet Night: Released!
Tentacularity: Released!
LoliFindsKitten: AlphaBetaThingy...

User avatar
PyTom
Ren'Py Creator
Posts: 16096
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: Play Ren'Py games online, like flash games?

#15 Post 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!
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