I've made a very basic renpy player in flash as3

A place to discuss things that aren't specific to any one creator or game.
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Message
Author
SelakSalamSalak
Newbie
Posts: 23
Joined: Sun Feb 13, 2011 7:29 pm
Contact:

I've made a very basic renpy player in flash as3

#1 Post by SelakSalamSalak »

Hi Guys,

I needed an engine to play visual novels in flash, like Raitendo's port of Air Pressure, so I've tried a very basic parser that will read a script.rpy file and try to load the images from the game folder and support simple choices, so I started this open source project:

http://code.google.com/p/renpy-player-as3/

Is not at real parser, only extracts dialogues and recognizes some commands so it will never parser full python syntax, but is enough to play The Question.

You might need to be and AS3 coder familiar with Flashdevelop or flex to use it, but I also included an .fla to compile it with the flash IDE and play the game in the /bin/game folder

Contributors welcomed.

User avatar
EwanG
Miko-Class Veteran
Posts: 711
Joined: Thu Oct 26, 2006 5:37 pm
Location: San Antonio, TX
Contact:

Re: I've made a very basic renpy player in flash as3

#2 Post by EwanG »

An interesting first step. Are you planning to add in some of the simple animations or... ?

Even if someone didn't want to port their full game, I would think that this would be useful as a preview that they could then link to their main game. Nice job!
Working on something... might even be something good :D

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: I've made a very basic renpy player in flash as3

#3 Post by PyTom »

This is interesting. I wasn't able to get this going under Linux, but there's certainly a lot of demand for this sort of thing, so I wish you the best in trying to get it to work.

I do worry that people could get confused if they go to your project page, and they don't already know what Ren'Py is. I'd ask that you add a link to renpy.org so people can find out what Ren'Py is they don't know. I'd also mention that isn't officially supported by the Ren'Py project.

I'm wondering if it makes sense to add support to Ren'Py for exporting to a format the flash version can easily read.
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

SelakSalamSalak
Newbie
Posts: 23
Joined: Sun Feb 13, 2011 7:29 pm
Contact:

Re: I've made a very basic renpy player in flash as3

#4 Post by SelakSalamSalak »

EwanG wrote:An interesting first step. Are you planning to add in some of the simple animations or... ?
I've tried to play Air Preassure (hope their creators don't mind) and it runs their png sequence animations. I'm not planning to add more stuff for now, I'll try writing my novel and see what else I need. Would be cool if someone else tests it and let me know if the tool runs their novels or what errors they get.

SelakSalamSalak
Newbie
Posts: 23
Joined: Sun Feb 13, 2011 7:29 pm
Contact:

Re: I've made a very basic renpy player in flash as3

#5 Post by SelakSalamSalak »

Hi PyTom!
PyTom wrote:This is interesting. I wasn't able to get this going under Linux, but there's certainly a lot of demand for this sort of thing, so I wish you the best in trying to get it to work.
Are you compiling in flash getting IO errors? I guess you'll need to try it on flashdevelop or upload the content of /bin/ to a server. I can try to fix something with the Access Local files setting in flash.
PyTom wrote:I do worry that people could get confused if they go to your project page, and they don't already know what Ren'Py is. I'd ask that you add a link to renpy.org so people can find out what Ren'Py is they don't know. I'd also mention that isn't officially supported by the Ren'Py project.
Added, let me know if there's anything else you want me to add.
PyTom wrote:I'm wondering if it makes sense to add support to Ren'Py for exporting to a format the flash version can easily read.
Can't think of anything now but sounds cool.

User avatar
jack_norton
Lemma-Class Veteran
Posts: 4087
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: I've made a very basic renpy player in flash as3

#6 Post by jack_norton »

tried to run it, even compiling it (have original Flash CS4) but nothing worked :(
I personally would be interested in a full renpy port to swf/html5 though so I can code anything with it :D
Making a VN system in flash is rather easy, I had one done by a friend coder but since flash sucks so badly (ton of bugs/problems) I didn't had the time/motivation to finish it.
follow me on Image Image Image
computer games

SelakSalamSalak
Newbie
Posts: 23
Joined: Sun Feb 13, 2011 7:29 pm
Contact:

Re: I've made a very basic renpy player in flash as3

#7 Post by SelakSalamSalak »

jack_norton wrote:tried to run it, even compiling it (have original Flash CS4) but nothing worked :(
I personally would be interested in a full renpy port to swf/html5 though so I can code anything with it :D
Making a VN system in flash is rather easy, I had one done by a friend coder but since flash sucks so badly (ton of bugs/problems) I didn't had the time/motivation to finish it.
Hi Jack_norton, I was playing Vera Blanc on the bus this morning. Great stuff!
Can you guys post what sort of errors are you getting compiling with flash?
I don't code in JS, not familiar with the DOM, but should be relatively easy to port to HTML5 for a JS coder, as AS3 syntax is very similar.

User avatar
jack_norton
Lemma-Class Veteran
Posts: 4087
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: I've made a very basic renpy player in flash as3

#8 Post by jack_norton »

Well I just get a plain screen if I try to compile. Otherwise I get a security exception when the .swf tries to open the story.rpy
follow me on Image Image Image
computer games

SelakSalamSalak
Newbie
Posts: 23
Joined: Sun Feb 13, 2011 7:29 pm
Contact:

Re: I've made a very basic renpy player in flash as3

#9 Post by SelakSalamSalak »

yeah, is the classic flash security restriction to load local files. I'll see if I can get hosting somewhere to upload the demo. In the meantime I've made another package with Windows and Mac projectors that should work in local context: http://code.google.com/p/renpy-player-a ... r&can=2&q=

ninjagrass
Regular
Posts: 104
Joined: Wed Mar 04, 2009 9:16 am
Projects: To Love Ru Trial Trouble, Bleach Battle Ignition, A new secret project...
Contact:

Re: I've made a very basic renpy player in flash as3

#10 Post by ninjagrass »

That is amazing! Looking forward to a version where I can port my games to flash!

SelakSalamSalak
Newbie
Posts: 23
Joined: Sun Feb 13, 2011 7:29 pm
Contact:

Re: I've made a very basic renpy player in flash as3

#11 Post by SelakSalamSalak »

the workaround for the security issue running as local was uploading to a server so I've put the demo here:
http://selaksalam.fortunecity.com/renpyAS3.html

User avatar
jack_norton
Lemma-Class Veteran
Posts: 4087
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: I've made a very basic renpy player in flash as3

#12 Post by jack_norton »

Neat, played it and worked very well :) I didn't hear any music/sound, I suppose that's not supported yet?
follow me on Image Image Image
computer games

SelakSalamSalak
Newbie
Posts: 23
Joined: Sun Feb 13, 2011 7:29 pm
Contact:

Re: I've made a very basic renpy player in flash as3

#13 Post by SelakSalamSalak »

the music in The Choice is .ogg and flash can't play ogg.
Works with mp3 only

SelakSalamSalak
Newbie
Posts: 23
Joined: Sun Feb 13, 2011 7:29 pm
Contact:

Re: I've made a very basic renpy player in flash as3

#14 Post by SelakSalamSalak »

ninjagrass wrote:That is amazing! Looking forward to a version where I can port my games to flash!
this is a separate tool/engine written in flash that will run the SAME game the Ren'Py engine runs. You DON'T NEED TO EXPORT anything, just upload the renpyAS3.swf and your game folder to a Server and renpyAS3 will load the script.rpy, load the images, try to understand the script and try to play it.

ninjagrass
Regular
Posts: 104
Joined: Wed Mar 04, 2009 9:16 am
Projects: To Love Ru Trial Trouble, Bleach Battle Ignition, A new secret project...
Contact:

Re: I've made a very basic renpy player in flash as3

#15 Post by ninjagrass »

SelakSalamSalak wrote:
ninjagrass wrote:That is amazing! Looking forward to a version where I can port my games to flash!
this is a separate tool/engine written in flash that will run the SAME game the Ren'Py engine runs. You DON'T NEED TO EXPORT anything, just upload the renpyAS3.swf and your game folder to a Server and renpyAS3 will load the script.rpy, load the images, try to understand the script and try to play it.
Wait... is that it? Let me try this with my game.

EDIT: Ok tried it with http://lemmasoft.renai.us/forums/viewto ... =29&t=4774, my old game demo. The images don't show up and the colors for the character names don't show up but the script seems to running just fine. Maybe it was too specific to the renpy demo? Also tried it with my larger games, and could not run them at all, just a black screen showed up. I think that maybe because the main menu is skipped, and when you have choices in the main menu to go to gallery etc, it crashes. And does this only run script.rpy? Since I have ALOT of jumps to different scripts in my games...

But keep going, one day it might actually work!

Post Reply

Who is online

Users browsing this forum: No registered users