Between Linux and Anime

Kind of like Schrodinger's Cat

Ren’Py on the Nokia N900!

Package(s) for an early N900 port of Ren’Py has recently appeared in extras-devel! For the uninitiated, Ren’Py is a free Python-based Visual Novel engine with a sizable repertoire of mostly free, mostly amateur-created games available. This had been one of the first things I tried (and failed) to get working on my N900 back in the day, so needless to say I jumped at the news, swiftly went and grabbed it, and checked it out. The result:

Not bad at all! It’s somewhat slow and rough around a good number of edges, but it works – and is playable. As a test I plugged in Hinano’s old Renai Blogger game, and was able to successfully complete an entire arc (CJ’s) without much issues. Just about everything I tried worked, including:

  • Full colored scenes, text and transitions
  • Making decisions
  • Background music and sound effects
  • Saving and loading games
  • Skipping, the preference menu – just about everything you need to play the game

EDIT: Hinano’s game had UI buttons for skipping/saving so I didn’t notice at first – but since there is no way to hit “Esc” or to “right click” on the N900, it may become impossible to bring up the in-game menu (eg. to save your game). Worse – some games flat out refuse to accept keyboard input. See bottom of post for workaround.

Some issues during play:

  • Performance is a little slow, and things like button sound effects can cause minor lags and spikes. The opening movie lagged badly so I skipped it.
  • Running the game in windowed mode (which is usually the default) causes the bottom part of the screen to be cropped off. The game needs to be set to full screen mode (either via the Preferences menu or by editting game/options.rpy) for everything to fit nicely.
  • This may be game-specific, but for some reason attempting to load game from the main menu crashes the game. However, starting a new game then loading a game from the in-game menu works. I had no such problems on my laptop.
  • May also be game-specific, the game window doesn’t close after I hit quit on the menu. I had to ctrl-backspace to the task manager view and then close the window from there. Sometimes the background music stays on even after the window is closed, only stopping after the song finishes.

Of course, this is playing a game that works well. Apparently creating a game doesn’t yet work – but I’m not sure anyone would want to bother with creating a game from inside a phone anyway. If nothing else typing on an N900 (though much faster than my old non-qwerty mobiles) is a crawl compared to any regular-sized keyboard.

Oh, the method described in the forum thread to launch an existing Ren’Py game didn’t work for me. Here’s how I got my games to launch, tested to work with several games now.

  1. Install the Ren’Py package from extras-devel.
  2. Download the Linux version of the game and extract it’s contents (I suspect downloading non-linux versions would work too, but I haven’t tried).
  3. Copy the extracted folder to /opt/renpy on your phone.
  4. Launch Ren’Py from the N900 application menu (This takes a while and the window may disappear for awhile. Be patient, the application will eventually appear)
  5. In the Ren’Py menu, tap “Select Project”, then ignore the error message by tapping “Return”. You should now see a list of Projects – one of which should be the game you just copied in. Tap it to select it.
  6. You should be back at the initial menu but with your game name at the top. Now simply tap “Launch”.
  7. Your game should launch after a pause. Remember to select full-screen mode in the preferences for optimum experience!

An alternative to copying the whole folder into /opt/renpy is to copy it into any location in MyDocs then symlinking it at /opt/renpy.

Great stuff, and kudos to the porter! :) The significance of this porting could hardly be understated. Gaming is easily one of weakest links in the N900/Maemo chain – there are so little decent games available! Now that Ren’Py is in the house, hundreds (or more?) Visual Novels just became N900-compatible – with more being created as I type.

Interestingly, with the possibility of an Android port still crippled due to Android’s yet weak scripting support, and with the recent iPhone developer agreement completely destroying any hope of an already problem-fraught iPhone port, Maemo may just be the first phone platform by a good margin that is able to run Ren’Py. And all it took, from the looks of it, was the dedicated efforts of a single developer/porter. Huzzah for open platforms :)

Update

It turns out that there are actually two pretty serious issues with playing Ren’Py games on the N900.

  • Some critical standard shortcuts – like “Esc” or “Right click” to activate in-game menu, and “Page Up” to roll back – are impossible on the N900.
  • A libsdl bug (see here) prevents some games from accepting any kind of keyboard input.

I have devised workarounds for these two issues. Follow these instructions if you’d like to try it.

  1. Download my patched version of config.py and my patched version of main.py.
  2. Get rid of the “.txt” extensions on both files and copy them into your phone.
  3. Replace /opt/renpy/renpy/config.py on your phone with the patched config.py (first download), and /opt/renpy/renpy/main.py with the patched main.py (second download).

The patches should harmlessly workaround the libsdl bug, and should allow you to access the in game menu by hitting “g” on you keyboard and rollback to the previous line by hitting “p”.

788
Rate this post
Thanks!
An error occurred!


  • Facebook
  • Twitter
  • Identi.ca
  • Delicious
  • Digg
  • StumbleUpon
  • Add to favorites
  • RSS
  • Reddit

Previous

Katanagatari 06

Next

Angel Beats 11

7 Comments

  1. do you have a copy of the linux version of Renai Blogger game I can have?

  2. Jason "moofang"

    Sure thing: http://www.mediafire.com/?vxlytiy2zw0 :) Enjoy!

  3. thanks bunches!

  4. damn that’s pretty hot!
    I hope they make an android version!

  5. Jason "moofang"

    From the looks of things down at the RenPy forum, the folks there appear interested, so there is a good possibility of an eventual Android port. Though it’ll likely be more complicated than for Maemo so no idea when might that happen :)

  6. Hey uhm I’ve been looking for instructions for two days now. I really want to try this but it’s so unclear on how I copy stuff on my n900. I feel like I’m doing things in the dark and obviously nothing works. I can’t access this /opt/renpy directory to move the files.

    I’m posting here ‘coz I feel like no one’s gonna answer on maemo.org.

    • Jason "moofang"

      Turns out I saw the maemo.org thread before seeing your comment here :) Hope you managed to get it running!

Leave a Reply

Powered by WordPress & Theme by Anders Norén