Raspberry Pi Portable VN console build

Forum organization and occasional community-building.
Forum rules
Questions about Ren'Py should go in the Ren'Py Questions and Announcements forum.
Message
Author
User avatar
PyTom
Ren'Py Creator
Posts: 14697
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: Raspberry Pi handheld VN console build.

#31 Post by PyTom » Wed May 31, 2017 7:00 pm

Did you restart the terminal after you installed virtualenvwrapper? That should give you the mkvirtualenv command.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Code > Drama
https://www.patreon.com/renpytom

Imperf3kt
Miko-Class Veteran
Posts: 713
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Delete this thread

#32 Post by Imperf3kt » Wed May 31, 2017 7:20 pm

After several dozen attempts, I managed to figure it out.

Will update everything later.
Image

Warning: May contain trace amounts of gratuitous plot.

Imperf3kt
Miko-Class Veteran
Posts: 713
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Raspberry Pi Portable VN console build

#33 Post by Imperf3kt » Sat Jun 17, 2017 9:03 pm

Not much time, this will be short.

Various problems, technical difficulties.

Latest issue I found is that Ren'Py (just Ren'Py) doesn't recognise taps/clicks with the touchscreen.
I have very little time lately. Will continue to work on this but updates/posts about it will probably be minimal for several weeks/months.

Current situation (since I think I spread this among a few threads accidentally):
Raspberry Pi + touchscreen are working.
Ren'Py on Pi is working.
Fan to cool (with Ren'Py running, temps sometimes exceed 70℃) working. Currently waiting on parts to install temperature modulated fan control.
Image

Warning: May contain trace amounts of gratuitous plot.

User avatar
Morhighan
Miko-Class Veteran
Posts: 848
Joined: Sun Jun 27, 2010 12:54 pm
Projects: AIdol
Organization: Afterthought Studios, Pixel Pineberry
Tumblr: MysteryCorgi
itch: pixelpineberry
Location: Wisconsin
Contact:

Re: Raspberry Pi Portable VN console build

#34 Post by Morhighan » Sun Jun 18, 2017 6:30 pm

I wanted to do something similar! I look forward to any updates you might have for us.
ImageImage

User avatar
PyTom
Ren'Py Creator
Posts: 14697
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: Raspberry Pi Portable VN console build

#35 Post by PyTom » Thu Jun 22, 2017 10:28 am

Okay, I have Ren'Py building on the Raspberry PI 3. I haven't tried it with a totally clean Raspian Jessie yet, but the short instructions are:

Run raspi-config, and use the advanced options to:

* Set Memory Spit to 256
* Set GL Driver to "GL (Fake KMS)"

Then reboot the unit. When it's back up, open a terminal (shift-alt-T), and install git using the command:

Code: Select all

sudo apt-get install git
Then download renpy-deps, and use the build_pi.sh script in it to build Ren'Py.

Code: Select all

mkdir -p ~/newbuild
cd ~/newbuild
git clone https://github.com/renpy/renpy-deps
./renpy_deps/build_pi.sh
Wait for the sun to grow cold as the build finishes.

Once it's done, you can run Ren'Py games with the pi_renpy.sh script.

Code: Select all

~/newbuild/pi_renpy.sh ~/newbuild/renpy/the_question 
I've only tested this on the Raspberry Pi 3, and I don't see trying to support the Pi 2 as a worthwhile thing to do. (The hardware is much older and less capable.)

This build does take advantage of hardware accelerated OpenGL ES support, but realize the Raspberry Pi is a slow system, and that shows up from time to time during gameplay. (I think it has to do with texture loading, which is really interesting.)

Right now, this can only launch games. While the launcher will run, it won't work, for a whole bunch of reasons. I want to get this out here for people to try before spending a lot of time on the launcher.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Code > Drama
https://www.patreon.com/renpytom

Imperf3kt
Miko-Class Veteran
Posts: 713
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Raspberry Pi Portable VN console build

#36 Post by Imperf3kt » Thu Jun 22, 2017 4:57 pm

Ooh thanks for that, its a very different approach to what I took.
If I can find a few spare hours I'll do this to my other SD card so I can compare any differences.

On my Pi 3, the launcher works just fine.


As to hardware, yeah thats always going to be a minor issue, however the Pi 3 is supposedly more powerful than an OG Xbox, so it shouldn't struggle too much. Its probably related to resolution. I bet if you dropped the frame buffer and display resolution a bit it would be perfect.
I'm looking into overclocking or maybe overvolting.
~200 - 300 Mhz should be sufficient.
Image

Warning: May contain trace amounts of gratuitous plot.

Imperf3kt
Miko-Class Veteran
Posts: 713
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Raspberry Pi Portable VN console build

#37 Post by Imperf3kt » Fri Jun 30, 2017 4:45 am

A small update so people don't think I just abandoned the whole thing.

I've successfully attached a 5" monitor, setup Ren'Py, installed a fan which for now is manually controlled via a button on the menu, installed an amplified speaker and a few various other tinkerings, but I've come to the conclusion that there's still a few errors that I cannot fix (namely, for some reason my audio stops ~10-20 seconds after boot, but only on the analogue channel.)

I'm trying to convert an ALPS touchpad I took out of a Dell laptop, into PS/2 serial which I can then attach to the Pi. At least, thats the plan. I doubt I will pull it off. This won't be necessary should I manage to figure out why Ren'Py doesn't recognise "taps" from the touchscreen.

So I'm going to do a wipe and Flash of another SD card (or rather, already have) and will be beginning again, this time following PyTom's advice.
As soon as everything is working smoothly, I'll be making a BACKUP of this card, since I am very tired of waiting literally hours for things to reflash, recompile, update, etc.

If all goes to plan, I should have a working, fully functioning system within the next few days, given that my motivation stays above 0
Pictures and blueprints/schematics around the same time, again, dependant on motivation levels.

Remember, the video driver required for this to work at all is beta, meaning it is still in it's experimental stage and WILL have problems. For now, the best we can hope for is the drivers to function as smoothly as they have for me so far.

Finally, assuming everything works flawlessly, or close enough to, I'll probably upload a copy of the image somewhere so anyone else with a Pi3B (should work on a Pi2B but I would avoid it) can simply write the image to a blank mSD card and try it out for themselves.

Should I actually get to this stage, I'd like to hear some opinions on experience with running Ren'Py as a whole.
The more feedback I can get, the better I can address any potential issues.


Current plans and considerations:
I'm seriously contemplating removing 2 of the USB jacks and converting them into internal USB headers. A few reasons for this, mostly so I can use the USB headers as a power source but also because 4 USB ports are unnecessary. One of these internal headers could be used to connect the previously mentioned ALPS touchpad, if I can manage to convert a serial signal, to USB. I am NOT going to write a USB stack for this device, I have no idea how to, so a converter is my only option.

On this same note, I am also considering removing the Ethernet port and routing it to the rear of the setup.
This is merely for a tidy design. I don't know if I can pull this off as reports indicate desoldering the RPi3B is extremely difficult, even for experienced solderers.

Using a multi-meter, I've determined there are a few round copper pads on the rear of the Pi that I can use to install a secondary audio jack with.
Exact design isn't yet thought out, but I'd like to be able to have a sliding switch that will send the audio signal to either the 3.5mm jack on the Pi or splice it and output the signal to the amplifier / internal speakers.
I think I may have to use the jack on the Pi regardless and install my own additional jack with the slider switch choosing between the two. Not sure, as I said - I haven't really thought about this one much.

I am running low on GPIO.
I have not yet accounted for buttons. Though I only need a couple, I still need to allow for them on the GPIO header. From researching, my chosen monitor doesn't seem to actually use every single GPIO pin it is attached to, so one by one I will remove them according to what I found out the other day, and see which it needs, and which it doesn't via process of elimination.
Hopefully Pin 18 is free (PWM0) as I would like this pin freed up.

Anyway, rant over, lots of stuff to do, it's still going well. Some hiccups here and there, but mostly coming along.

Additionally, I bought a Pi0w yesterday, which I picked up in the mail today.
This board sucks and definitely won't run Ren'Py (It struggles to load the YouTube home page)
This was not my intention with the board though and I'm not even sure why I'm mentioning this :P

Edit: Tried out the above instructions, they work great.
One minor typo:

Code: Select all

mkdir -p ~/newbuild
cd ~/newbuild
git clone https://github.com/renpy/renpy-deps
./renpy_deps/build_pi.sh
Should be

Code: Select all

mkdir -p ~/newbuild
cd ~/newbuild
git clone https://github.com/renpy/renpy-deps
./renpy-deps/build_pi.sh
Only two issues I've noticed so far:
Some games tell me I am using software rendering, and then proceed to lag like shit to the point the buttons don't work.
One game won't launch at all despite working flawlessly elsewhere because apparently it cannot find the "game_menu"
Image

Warning: May contain trace amounts of gratuitous plot.

Imperf3kt
Miko-Class Veteran
Posts: 713
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Raspberry Pi Portable VN console build

#38 Post by Imperf3kt » Sat Jul 08, 2017 4:15 am

Okay, another update.

The 'prototype', as I call it, is ready (enough) for public exposure. I've met my base goals which are:

It turns on with no problems.
Games can be added to the menu with minimal issues (the only remaining issues are Raspbian Jessie issues that I cannot fix)
(Most) Games launch and close as expected.
Touchscreen works flawlessly.
Touch keyboard works flawlessly.
Speaker is somewhat loud with minimal distortion above 95% volume (of which hopefully, when they arrive, my higher quality 3w speakers should fix)
Fan turns on and off as the temperature scales, the speed of the fan increases if the temperature doesn't drop after 15 seconds.
Fan automatically turns off once the temperature has dropped to an acceptable 50 degrees centigrade.
The battery lasts an unknown amount of time - I am yet to stress test it. Best guess puts it at 18 hours minimum under maximum load and with the screen turned on the entire time.
An external keyboard and mouse can be attached if desired.
A maximum resolution of 1920x1080 is obtainable if you connect to a monitor or TV. Resolution changes automatically. I think this only works during boot though. I am yet to try connecting an external monitor after I have started the system connected to the 800*480 touchscreen.

There is some tidying up to do and minor other fixes but overall, a success and considering it is a prototype.
There do seem to be some minor bugs in running Ren'Py which are being worked on.
I believe the main issue I found (trying to open a url from a renpy game sometimes causing a crash) is a Chromium browser issue (as it is, Chromium really pushes the Pi to it's limits)

I'll probably add a video of it in operation sometime within the next day or so. Depends if I can find a decent enough way to video it without having to hold the camera.

E:
I ordered an incompatible set of speakers. Need to order something else.

In the meantime, I have found a potential new screen:
https://www.raspberrypi.org/forums/view ... 5&t=187968
I am very keen on the 4.8" 720 screen and mildly interested in the 5.9" 1080 screen.
Image

Warning: May contain trace amounts of gratuitous plot.

Karl_C
Regular
Posts: 129
Joined: Sun Mar 31, 2013 6:18 am
Contact:

Re: Raspberry Pi Portable VN console build

#39 Post by Karl_C » Sun Jul 16, 2017 6:48 am

Possibly interesting for you (for inspiration): I just read that another handheld Raspberry Pi (but without Ren'Py) is in development: Noodle Pi - The Integrated Raspberry Pi Pocket Computer.
Noodle Pi uses the recently released Pimoroni HyperPixel 3.5" display. This is a high speed, high resolution (800x480 pixels at ~270 PPI) display with 18-bit color (262,144 colors) and a 60 FPS frame rate. And capacitive multi-touch.
Noodle Pi also integrates the Raspberry Pi Camera Module v2, for up to 8MP still photos, and 1080p30 / 720p60 / VGA90 video.
Noodle Pi is powered by an internal 500mAh battery. It can be charged via a regular micro-USB charging socket, and there's a red LED to provide a low battery warning.a full mobile Raspberry Pi computer, with high-res screen, camera, battery. 19mm thin!
Noodle Pi's unibody shell is strong and light, with an innovative design that leverages the unique capabilities of 3D printing.
This enables Noodle Pi to pack six separate components, plus connecting wires, into a tiny 93mm x 60mm x 10mm/19mm package. Yes, part of it is only 10mm thick! (The iPhone SE, in comparison, is 7.6mm; the official Pi Zero case is 13mm).
I have nothing to do with this project btw... ;)

Imperf3kt
Miko-Class Veteran
Posts: 713
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Raspberry Pi Portable VN console build

#40 Post by Imperf3kt » Sun Jul 16, 2017 8:20 am

I can see the merits of such a system, but with only 500mAh, that battery will be flat within less than 2 hours.

I'm currently looking into two brand new screens (not yet on the market).
The specs are as follows:

Big (5.9"):
-----------
Resolution: 1080x1920
FPS: 60
Color mode: 24bit
PPI: 376.2
Brightness: 400 cd/m2
Contrast ratio: 1000:1
Viewing angle: 80 deg.
Power draw: 600 mA (max)
Active area: 72.9(W)×129.6(H)
Weight(approx): 95 g
Outline Size: 82(W)×150(H)
Touch points: 10


Small(4.8"):
------------
Resolution: 720x1280
FPS: 57 (max)
Color mode: 24bit
PPI: 307.9
Brightness: 500 cd/m2
Contrast ratio: 800:1
Viewing angle: 80 deg.
Power draw: 520 mA (max)
Active area: 59.4(W)×105.6(H)
Outline Size: Not yet specified
Touch points: 10
Image

Warning: May contain trace amounts of gratuitous plot.

kylemercury
Newbie
Posts: 6
Joined: Tue Jul 11, 2017 11:19 pm
Contact:

Re: Raspberry Pi Portable VN console build

#41 Post by kylemercury » Sat Jul 22, 2017 10:42 pm

These ideas all seem pretty cool. Raspberry pie seems to be having a large effect on technology and media.

Post Reply

Who is online

Users browsing this forum: Caveat Lector