maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Games (https://talk.maemo.org/forumdisplay.php?f=12)
-   -   Ren'Py ported to n900 (https://talk.maemo.org/showthread.php?t=55868)

antiacui 2010-06-11 07:30

Ren'Py ported to n900
 
Ren'Py is a free and cross-platform visual novel engine.

you could get it from from extras-devel.

the entry in the app-manager is just a launcher, you could run the tutorial and example game or edit the scripts. but due to a bug, no new project could be created :( you can still copy an existed project (the best way is copy to the MyDocs directory and create a symbolic link at /opt/renpy/) to the phone and edit it. I don't know if the "Build Distribution" function works or not because i have not tried it on the phone. :p

porting an existed Ren'Py game to n900 is very easy. just get the linux package of the game. then extract the "game" dirctory and a file named "[gamename].py" (replace [gamename] with the name of the game) from the root of the package to a new location of your game. in the new directory, just run
Code:

python2.5 /opt/renpy/renpy.py ./
know issues:

1. the original hot-keys are not worked.
2. no keyboard input in game.
3. the window mode will crop the bottom area.

moofang 2010-06-13 18:27

Re: Ren'Py ported to n900
 
Awesome stuff! I was not able to launch an existing game with the command you provided though :( On the other hand copying the game to /opt/renpy then selecting it as a project and launching it from the renpy launcher works, though performance is somewhat subpar.

Still, I'm extremely delighted this got ported :) I've been thinking about this ever since I started pythoning on my phone. I think the N900 is now the first phone that runs renpy? :D

moofang 2010-06-14 11:42

Re: Ren'Py ported to n900
 
Wrote a brief review on my experiences with Ren'Py on N900 :)

http://yuenhoe.co.cc/blog/2010/06/re...he-nokia-n900/

renpytom 2010-06-15 01:44

Re: Ren'Py ported to n900
 
Hello, Ren'Py creator Tom here.

This looks really good! Thanks for porting Ren'Py. I'm wondering what was involved in doing the port, and if there's anything I can do to make Ren'Py work better on Mameo, make games easier to distribute, and so on.

moofang 2010-06-15 09:01

Re: Ren'Py ported to n900
 
1 Attachment(s)
Just reporting some more issues I discovered after more tinkering:

1. As noted in OP, keyboard input is impossible - but only in SOME games. I have tried 7 games so far including the default 3, and so far only 2 games refused to accept keyboard input: the default "tutorial" game, and "Ripples" (http://www.sakevisual.com/ripples.html). I haven't been able to quite tell what it is about these two games that make them different. Could it be a version thing? I know Ripples is probably the newest game I tried..

2. Even for the games that accept keyboard input, some critical shortcuts are not possible on the N900. For example - bringing up the game menu. There is no "esc" key on the N900 and neither is right click possible to the best of my knowledge - making saving game impossible on games that don't expose UI buttons to activate the game menu. Stuff like page-up to go back to the previous line is also impossible due to lack of a page-up key.

Point 1 might be a porting bug, but upstream might want to take note of point two since "missing key" issues like these are bound to pop up in any possible future ports to other mobile platforms too.

A hackaround I did for point 2 was to change the default key bindings by directly editting /opt/renpy/renpy/config.py. This works as long as the game actually accepts keyboard input in the first place. I have the editted version attached in case anyone might want it - it allows you to hit 'g' to launch the game menu and hit 'p' to roll back to the previous line.

moofang 2010-06-16 15:14

Re: Ren'Py ported to n900
 
1 Attachment(s)
Okay! I've discovered what's up with the no-keyboard-input problem.

The problem:
Basically Maemo's Matchbox WM is extra-strict with certain keyboard input related window parameters - it requires a bit to be set or it won't give the window keyboard focus. On the other hand libsdl (a dependency) apparently contains a bug which clears this bit if a window icon is set. See http://talk.maemo.org/showpost.php?p...4&postcount=20

This was why only some games refused keyboard input - these were the games that specified a window icon and thus triggered the libsdl bug.

The hackaround:
I added a couple of lines in /opt/renpy/renpy/game.py to basically unset any config values requesting window icons. To the best of my knowledge Maemo 5 doesn't display window icons anyway so this is a nice and harmless workaround as far as I can tell, but it fixes the problem beautifully - now all my games obediently accept keyboard input, and combined with the keyboard-binding-switch hackround in my previous post, all my games are now fully playable :)

I have attached the modified game.py file in case anyone might want it.

antiacui 2010-06-27 12:34

Re: Ren'Py ported to n900
 
sorry for having disappeared for so long. my pc's motherboard was gone. so i thought it's time for upgrading. but the new cpu, mb and mem made me have to upgrade the chassis... and the new chassis made me have to upgrade the power supply... and ... blah blah...

I have changed the command for starting a game. but it's not working for some old games due to the changes of api.

to moofu: thank you for testing and reviewing and patching, i'll include it in the next release.

to renpytom: thank you for making this great engine. there'll be a lot of questions from me :D

chorvaqueen 2013-08-04 12:50

Re: Ren'Py ported to n900
 
bumping this thread:

how do you do a symlink a game? It's entirely confusing.

I want to run Katawa Shoujo on my n900. I looked up elsewhere but no one is giving clear instructions on how to do it.

moofang 2013-08-04 14:38

Re: Ren'Py ported to n900
 
Hello, I no longer have my n900, but iirc you just need to copy Katawa Shoujo (or whatever game) into /opt/renpy, and then open the renpy program, select your game as a project, and launch the game from there.

I'm not sure if you still need to apply my two patches for keyboard input and modified shortcuts - those may have been merged into the release.

chorvaqueen 2013-08-05 02:48

Re: Ren'Py ported to n900
 
Quote:

Originally Posted by moofang (Post 1364875)
Hello, I no longer have my n900, but iirc you just need to copy Katawa Shoujo (or whatever game) into /opt/renpy, and then open the renpy program, select your game as a project, and launch the game from there.
.

Yes, but how do I do that exactly? I can't seem to access /opt/renpy normally.

I just got this phone 2 days ago so I'm currently scrambling things to get started.


All times are GMT. The time now is 20:19.

vBulletin® Version 3.8.8