[0.1 RELEASED] RenPSP (need *.rpy+media to test my engine)

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
iichan_lolbot
Veteran
Posts: 206
Joined: Tue Dec 30, 2008 9:18 am
Projects: iichan erogame
Contact:

[0.1 RELEASED] RenPSP (need *.rpy+media to test my engine)

#1 Post by iichan_lolbot »

Hello, everyone. PyTom told he do not want to port RenPy to PSP, so I'm developing a minimalistic RenPy clone for PSP and wonder if anyone is interested in it.

It is written in Lua and now it can do several key things:
* narration ("test")
* telling by a known character (lucy "test")
* 'scene', 'show' [at left/center/right], 'hide' commands without effects
* 'menu's (including menu at menu and so on in rpy code)
* 'jump's
* #comments, 'pass' command
* 'return' ends game
* $ command (using Lua, not Python - but the same in simple code like 'a = b+5')
* if/elseif/elif/else (using Lua, not Python; false = 0,false,nil; true = true, non-zero number)
* 'persistent' variable
* 'image' statements to load an image file without manipulations
* [UPDATED] 'define' statement for lines like 'define uvao = Character("ЮВАО-тян")'
* [UPDATED] $renpy.pause(), $renpy.block_rollback(), $renpy.quit(), $renpy.error()
* [UPDATED] [PSP ONLY] music/sound play/stop

It is also possible to make:
* screenshots
* autoplay
* load and save game
* rollback (rewind/fast-forward)

Unicode is NOT supported, sorry.

Future work is:
* minimal transition set (dissolve,fade,move)
* init section parsing
* diff-based rollback
* some other most used renpy.* functions

Supported platforms are:
- Lua Player 0.20 for MS Windows
- Lua Player 0.20 for PSP 1.50
- Lua Player Euphoria 8 for PSP 5.XX

What I need is:
* some 480x272 (or 480x270 to be exactly 16:9) games (*.rpy source + data) to test this engine and to be released with it
* a possible list of MUST-HAVE features

WARNING: there is no *.rpyc support, games are not encoded at all
Last edited by iichan_lolbot on Sun Jun 27, 2010 4:13 pm, edited 12 times in total.

chronoluminaire
Eileen-Class Veteran
Posts: 1153
Joined: Mon Jul 07, 2003 4:57 pm
Completed: Elven Relations, Cloud Fairy, When I Rule The World
Tumblr: alextfish
Skype: alextfish
Location: Cambridge, UK
Contact:

Re: RenPSP

#2 Post by chronoluminaire »

The one piece of advice I'd give is: plan how you're going to handle "load", "save", and rollback (or readback) forwards and backwards.
If you don't get your data structures defined sensibly from as early as possible, you're in for a world of pain trying to handle loading, saving and rollback. I don't expect you to come up with anything like the deep and dark magic at the heart of Ren'Py, but be sure to have considered these things early.

As for handling Python statements embedded in Ren'Py... if you're not actually using something built on Python, then you have two choices: (a) write an entire Python interpreter in Lua (hint: you don't want to do this), or (b) heavily restrict what kind of commands you allow in your if clauses.

Do note that recent versions of Ren'Py have introduced the "define" statement, which means the majority of "$" lines in Ren'Py scripts don't need to use "$" any more. If you support "define var = expression", and allow "expression" to consist of previously named variables and basic arithmetic or string manipulations, I'd imagine you'll be able to handle at least 50% of Ren'Py scripts using "define" rather than "$". Expressions such as
char_name + " the " + text_description
or
(strength * 3 + (lovepoints * 2))
aren't really Python, it's pretty generic. You'll have to be able to handle things at least as complex as that, but probably not much more complex.

I'm afraid I don't have a PSP, so I won't be able to test this.
I released 3 VNs, many moons ago: Elven Relations (IntRenAiMo 2007), When I Rule The World (NaNoRenO 2005), and Cloud Fairy (the Cute Light & Fluffy Project, 2009).
More recently I designed the board game Steam Works (published in 2015), available from a local gaming store near you!

number473
Regular
Posts: 195
Joined: Tue Dec 15, 2009 4:20 am
Projects: The Duke's Daughter
Location: Cape Town
Contact:

Re: RenPSP

#3 Post by number473 »

I would think that the $ would allow access to Lua in this case, rather than Python code, since that is the underlying language. As mentioned above, most arithmetic and assignment should be similar, I guess - I don't know Lua so I'm not sure. This would depend, though, on your focus: do you want to provide additional ease in porting from the one to the other, or would it be used primarily in stand-alone fashion? In the latter case, you would probably want to keep Ren'Py's core syntax but provide Lua's functionality through $, or I guess Lua blocks?, in the same way that Ren'Py provides Python's underlying functionality. In the former case, it would probably be aided by implementing ATL and the upcoming screen language. That would mean that code that would need to be changed would be limited to mostly game-specific stuff. Now, if there was a simple converter between the two syntaxes (there probably isn't) that would make one's life even easier.

Well, just my thoughts on the matter, not an expert opinion at all ^_^
Last edited by number473 on Thu Jun 03, 2010 7:52 am, edited 1 time in total.
Mental weather report: Cloudy with a possibility of brain storms.

iichan_lolbot
Veteran
Posts: 206
Joined: Tue Dec 30, 2008 9:18 am
Projects: iichan erogame
Contact:

Re: RenPSP

#4 Post by iichan_lolbot »

Thank's. I already realized rollback difficulties. Rollback is almost done - main thing really was to use proper data structures. Once rollback is done, it would be possible to make simple transition effects using previous and current data structs.
Do note that recent versions of Ren'Py have introduced the "define" statement, which...
Already seen it in new version of "The question", which should be supported =)

Code: Select all

char_name + " the " + text_description

Code: Select all

(strength * 3 + (lovepoints * 2))
Yeah, I think I would write interpreter for statements like this. Too bad I can't just use eval() even for them, because Lua and Python have some difference even in "not equal" operator (!= vs ~=).
I'm afraid I don't have a PSP, so I won't be able to test this.
Windows version is avaliable (but seems like Lua Player Win32 doesn't support MP3&OGG and alpha-channel, so ...)

iichan_lolbot
Veteran
Posts: 206
Joined: Tue Dec 30, 2008 9:18 am
Projects: iichan erogame
Contact:

Re: RenPSP

#5 Post by iichan_lolbot »

number473 wrote:I would think that the $ would allow access to Lua in this case, rather than Python code, since that is the underlying language. ...
That's quite an interesting idea. I should really think of it.

Existing simple games could be easily ported: simple expressions with arithmetic or string operations could be converted from Python to Lua this way:

Code: Select all

a!=b -> a~=b
"a"+"b" -> "a".."b"
"%d sec"%time -> string.format("%d sec",time)
Last edited by iichan_lolbot on Fri Jun 04, 2010 9:29 am, edited 1 time in total.

iichan_lolbot
Veteran
Posts: 206
Joined: Tue Dec 30, 2008 9:18 am
Projects: iichan erogame
Contact:

Re: RenPSP (need *.rpy+media to test my engine)

#6 Post by iichan_lolbot »

Rollback is done and tested. =^_^=
$ command and if-elseif(or elif, I support both)-else are done too.

Many thanks to number473 for brilliant idea of using Lua as underlying language.

Maybe I will implement some automatic code conversion to make stuff like 'a!=b' and 'x+=5' supported in Lua insertions.

iichan_lolbot
Veteran
Posts: 206
Joined: Tue Dec 30, 2008 9:18 am
Projects: iichan erogame
Contact:

Re: RenPSP (need *.rpy+media to test my engine)

#7 Post by iichan_lolbot »

Created a Lua class named renpy, started to port engine features there.

It works:

Code: Select all

 $ renpy.pause(1) 

vaanknight
Regular
Posts: 118
Joined: Sun Mar 28, 2010 6:01 pm
Completed: Happy Weird-Day! How a freckled fairy can save your world (Or get more freckles in the process...)"
Projects: Nameless 2D Fighting Game
Contact:

Re: RenPSP (need *.rpy+media to test my engine)

#8 Post by vaanknight »

I kinda like the idea, I might as well make a short VN in the format you're asking, but will it work 100% with the ren'py language? I take it I can't add effects too fancy? What settings exactly you need it to include?
Image

iichan_lolbot
Veteran
Posts: 206
Joined: Tue Dec 30, 2008 9:18 am
Projects: iichan erogame
Contact:

Re: RenPSP (need *.rpy+media to test my engine)

#9 Post by iichan_lolbot »

I'm developing it to fully support RenPy's standart 'the Question' game and Eroge Team's mini-VNs.
image, scene, show, hide, menu, jump, if/else - all this things are already implemented.
There is a support for $code, the language is Lua, not Python, but they are similar at simple expressions with things like love points math and calling built-in functions like $renpy.pause(2).

There are no transitions at the moment, but I plan to implement most used: move, dissolve, fade, ...
There are no custom positions at the moment, but center, left and right are supported.
There is no image modification and animation at the moment. Only code like ' image eileen happy = "images/sprite1.png" ' is allowed.
There is no support for 'call' function at the moment.
There is no support for $ui.* functions at the moment.
There is no *.rpyc support, all the scripts are NOT encoded at the moment.
There are no imagemaps (because of no mouse).

I think if you need a RenPy feature to be implemented in RenPSP, you can just ask for them here and it's priority will get higher. ^_^
If there would be a minor difference in syntax of function names between RenPy and RenPSP languages, I'll just convert your RenPy script to a proper format.

iichan_lolbot
Veteran
Posts: 206
Joined: Tue Dec 30, 2008 9:18 am
Projects: iichan erogame
Contact:

Re: RenPSP (need *.rpy+media to test my engine)

#10 Post by iichan_lolbot »

The last thing to implement for FULL support of "The Question" is command 'with'.

iichan_lolbot
Veteran
Posts: 206
Joined: Tue Dec 30, 2008 9:18 am
Projects: iichan erogame
Contact:

Re: RenPSP (need *.rpy+media to test my engine)

#11 Post by iichan_lolbot »

http://rghost.ru/2000476

RenPSP 0.1 - Lua-based RenPy clone for PSP

Very first and unstable alpha release of RenPSP Engine.

Font is monospace Lucida Console.
Encoding is 1251.
Released with several mini-VNs:
* "The Question"
* "9 мая" by IIchan Eroge Team ( http://iichan-eroge.blogspot.com )
* a test game to demonstrate some features

NO GUARANTEES, USE ON YOUR OWN RISK!

RenPSP is free, but there are some rules of it's rebistribution:
1. inform lolbot_iichan@mail.ru about your actions
2. provide link to http://iichan.ru or http://iichan-eroge.blogspot.com with your release
3. do not try to earn money using RenPSP or it's parts

MS Windows release is based on LuaPlayer 0.20
PSP release is based on LuaPlayer Euphoria v8
Attachments
RenPSP.zip
RenPSP 0.1 - Lua-based RenPy clone for PSP
(8.46 MiB) Downloaded 90 times


Post Reply

Who is online

Users browsing this forum: Google [Bot]