Page 1 of 5

Raspberry Pi Portable VN console build

Posted: Thu May 04, 2017 12:03 am
by Imperf3kt
Deciding where to post this was tricky, in the end I decided to make it a conversation.

By now, you've probably at least heard of a Raspberry Pi. It's a small, modular, python operated , single PCB micro computer that supports Linux and Windows.

Looking at some Raspberry Pi LED matrixes today, I discovered the Raspberry Pi Zero W, a unit with a sale price of $10. One thing led to another and I eventually came to the conclusion that an RPi device could be used to sell a 'complete VN experience'

For example, imagine a portable gaming device, preloaded with everything needed to download Ren'Py games from or similar. Best yet, the entire system would cost less than $200.
Theoretically it's possible, but what do you guys think?
Would it be powerful enough?

Here's the specs and features for the Raspberry Pi Zero W
1GHz, single-core CPU
Mini-HDMI port
Micro-USB On-The-Go port
Micro-USB power
HAT-compatible 40-pin header
Composite video and reset headers
CSI camera connector
802.11n wireless LAN
Bluetooth 4.0

For a visual example, check out the Super Pi Boy and imagine connecting it to your HD TV as well.

Re: Raspberry Pi - powerful enough for Ren'Py?

Posted: Thu May 04, 2017 12:43 am
by indoneko
Does it support Hardware Open GL already?
I've read some older posts here mentioning about it being slow at loading (and other problems)

Re: Raspberry Pi - powerful enough for Ren'Py?

Posted: Thu May 04, 2017 1:03 am
by Imperf3kt
I don't know, which is why I was curiously asking if this is feasible.

The Ren'Py handheld gaming system!

I had this strange thought that you could use one button for advancing text, one for rollback and one for pause.
A D-pad or touchscreen would probably be a good idea though.

Maybe a Pi 3 model B would be needed instead.

Re: Raspberry Pi - powerful enough for Ren'Py?

Posted: Thu May 04, 2017 2:35 am
by indoneko
Renpy handheld gaming system, eh? While it is surely doable, I'm not really sure if the total building cost will be cheaper than buying an entry-level intel tablet. For example, one of local stores in my country has this local brand tablet in their list :

Advan Vanbook W80 (Intel Atom BayTrail Quad-core 1.33 GHz, 8.0 inches IPS HD, 16GB, 1GB RAM, Wi-Fi, 3.5G (Data Only), Bluetooth V4.0, GPS, USB OTG, Windows 8.1 Bing & Microsoft Office 365) 950.000

Fyi, Rp. 950.000 is roughly equal to US $ 70 (and this is already including Tax)

What about your planned Raspberry system? Can you list the cost?

Re: Raspberry Pi - powerful enough for Ren'Py?

Posted: Thu May 04, 2017 3:20 am
by Imperf3kt
I haven't itemised it yet, but I had a rough guesstimate of $150

The appeal is that it'll be specifically tailored for Ren'Py stuff and we aren't limited to a 7 inch tablet.

I was thinking of something more akin to a PSV sized system with Eileen stickers :P

Keep in mind this was a random idea I had whilst daydreaming at work - I do not plan (yet) to actually go through with this project. Plus I've got too many other projects at the moment.

Re: Raspberry Pi - powerful enough for Ren'Py?

Posted: Thu May 04, 2017 11:08 pm
by Sonomi
Hey, I like your idea! I have a RPi 3 model B and a Pi Zero, and I was literally just starting a similar handheld console build. All I need at this point is a power module, as I recently acquired 3.5" lcd touch screen with the notion of making something small and portable. My love for flat thumbsticks lead me to purchase 3 of those to serve as the joysticks as well...ah sorry, I'm excited that you brought this up.

If you're asking about power, the RPi 3 can run Minecraft and I've seen people run emulation for 3D games with the Pi Zero. It should be MORE than enough to handle Ren'Py! You have to remember that it's basically a mini computer, after all. :) From my experience so far with Raspbian, the RPi is very Python and Pygame friendly, which if I'm not mistaken is also the backbone of the Ren'Py engine.

Edit: Typo. I'm such a geek...

Re: Raspberry Pi - powerful enough for Ren'Py?

Posted: Fri May 05, 2017 1:01 am
by Imperf3kt
I'll be taking a better look at parts / software / cost etc later today, but if you've got a similar project underway, by all means, do post about it.

Re: Raspberry Pi - powerful enough for Ren'Py?

Posted: Fri May 05, 2017 8:25 am
by Divona
- Ren'Py on Raspberry PI
Strontium wrote: A bit of searching revealed that Yes, the Raspberry PI even though it has a reasonably capable GPU has been using software Mesa for OpenGL on the desktop. February last year they released an "experimental" hardware OpenGL driver which ONLY works on the Raspberry PI 2 and 3, the issue being on the other PI's there isn't enough memory for the GPU.

Enabling that using their tool "raspi-config" enabled a fully accelerated Desktop OpenGL.

On that, Ren'Py runs silky smooth on the Raspberry PI, using only about 5% CPU total for the Launcher, and about the same for "The Question". The underrun errors in audio stopped being reported also.

So, in Summary, to build and run Ren'Py on the Raspberry Pi requires the following:
0. Using Raspbian
1. A Raspberry PI 2 or 3. (I only tested a PI 3, but i dont see why a PI 2 wouldnt work)
2. Update from LibAV to FFMPEG using the Debian multimedia repository
3. Install the "experimental" 3d desktop drivers on the PI, using rasp-config.
4. Build Ren'Py as you would on x86 linux.

Re: Raspberry Pi - powerful enough for Ren'Py?

Posted: Mon May 08, 2017 9:46 pm
by Imperf3kt
I just ordered a Raspberry Pi 3 model B+
It cost me a grand total (including postage) of $78AUD and should arrive tomorrow.
I opted for this model instead of a Zero W due to it having four cores, opposed to one and 1 Gb of RAM, opposed to 512Mb.

For now I only plan to get it running Ren'Py, so standard peripherals will be used, but at a later date I will be looking into a ~5 inch LED LCD screen (or OLED if I can get one cheap enough.)
I know there is a 7 inch, 10-point Touchscreen available, but I honestly think thats way too large for my use-case.

I will need a power supply but that should be no issue, I've got dozens of unused USB B (micro USB) cables and several ~2.1 Amp AC240V to DC5v USB power adaptors.

So now we wait for delivery and hopwfully tomorrow afternoon I am tearing my hair out, trying to understand how the thing works.
Yes, I'm impulsive. Impulsiveness leads to innovation. I hope...
Worst case scenario, I wasted seventy-eight bucks.

Once I've got time -might be months, I'll design a prototype handheld unit and look into integrating a Li-ion battery (not a SAMSUNG one though, don't want it catching fire.)

I'll detail everything, from parts required, to how to put them together.

The only thing I cannot do is make a casing for it. I may be able to smelt an Aluminium case, but I don't have a crucible, they're also quite dangerous.
I'll consider that when I get to that stage.

Re: Raspberry Pi - powerful enough for Ren'Py?

Posted: Mon May 08, 2017 10:21 pm
by Zetsubou
I'll be interested to see how you go with this. There aren't as many VNs for Android, so a handheld running Linux would be great. I'm keeping my eye on a few such projects (mostly higher-spec crowdfunded devices), but this might do for VNs.

I don't know how enjoyable the experience will be though. I could see the text in particular winding up being way too small to be read comfortably, given the much larger target screen size of PC games, which would be a deal-breaker for a visual novel.
It'll depend on the game though. I've played a few VNs that are barely readable on a 24" screen, let alone a 7" one. (It's bad design from the developer, and obviously not your fault, but it'll still wind up being seen as a problem with your implementation)

Re: Raspberry Pi - powerful enough for Ren'Py?

Posted: Mon May 08, 2017 10:46 pm
by Imperf3kt
Yeah, thats definitely a bad developer choice.
You can increase the text size by lowering your resolution, but who wants to do that...

I personally have one project intended for Android.
The screen is 4.7" and so far my main concern is text readability. It looks great on my test device, but I'm unsure how higher resolutions look.
Anyway, touchscreen will probably be a requirement or at leat a touchpad because my currently planned buttons don't account for a mouse.

As to encasing the device, I guess its either DIY injection molding with HDPE plastic, baked Acrylic (perspex sheeting) molding, or Polyresin Silicon mold casting..
Since my aim is duplicatability and low-cost, I'll probably go with the silicon casting option. Acrylics may have an undesireable static effect.

Here's a 5 second mock example of my ultimate goal:
Better image coming later

If anybody would like my (shitty) font, which I used where it says "Ren'Py Boy, you can grab it here:

Re: Raspberry Pi handheld VN console build.

Posted: Tue May 09, 2017 10:44 pm
by scriptbeast
You could always 3d model a case to fit the specs then print it, either yourself or via shapeways. Just include some screw holes and it'll be secure and easy to build.
I see some issues with buttons unless you want to solder everything together, you could use a breadboard but that's less stable.
Though I'm not sure if you're going for open source or if you want to go commercial with this.
As to the power issue, my Pi (along with a brickPi board and motors) runs fine with 6 AA batteries, that or you can use a regular battery pack with a usb to microusb cable.
As for the touchscreen, you can actually get a case for 20$ with an attached touchscreen on amazon. Not the best graphics quality, but its pretty good.
So if you didn't use buttons and just the on screen controls/keyboard you could easily pull off the hardware for this device for 50-60$ USD max, not including battery packs + usb-microusb cables since most people already have those.
If you really want joysticks though, you could probs just mess with the screen case and print the rest of it, and superglue it on.
Superglue is strong stuff.

Re: Raspberry Pi handheld VN console build.

Posted: Wed May 10, 2017 1:25 am
by Imperf3kt
Yeah, ignore all the buttons on the PSV, I don't plan to have that many.

I'm just looking at 2-4 plus maybe a D-pad and touchscreen.
Not going commercial, I'm just a hobbyist interested in creating stuff that others can make too.
Thanks for the tip about 3D printing. I thought of it yesterday, but never really thought to look into it.
My Pi 3 model B arrived a few hours ago, gonna tinker when I get home after work.

E: After a thorough search, I found that all my USB power supplies were between 900mA and 1200mA. Somewhat short of the 2A minimum. I found one 5v USB 2A power supply in a box in the shed, but unfortunately it doesn't appear to work, and I'm pretty sure it was destroyed a few years ago by a lightning strike.

So I rummaged around, I found an LR6/AA / AAA battery to USB adaptor but it only supplies 4.5v at 300mA.
After nearly an hour, I found an old, partially broken PSP-2000 5volt 2000mAh (2A) power supply. I promptly cut it up and an old USB to Micro USB B cable. After a little jury rigging, I managed to power the Pi, but I found one problem. In my mad search to find a power supply, I forgot to download a Raspbian Image. So here I sit, with "24 minutes remaining" on "RASPBIAN JESSIE LITE"

I'll clone this over to a 16GB mSD after it downloads and since it's rather late at night, I may have to call it a night at that and continue this tomorrow.

Photos once I've made the power supply less dangerous / illegal.

Re: Raspberry Pi handheld VN console build.

Posted: Thu May 11, 2017 6:45 pm
by Imperf3kt
Is this sort of double-posting allowed?

Raspbian Jessie Lite ended up being a waste of time. I installed the dependancies required for PIXEL GUI and LightDM as well as Pygame dependancies and various other packages, rebooted and set to launch the desktop environment but no matter what I do I still end up at the CLI terminal.
I configured the Pi for my locale and time settings, told it to boot into desktop mode. Nada. Still CLI mode.

So I'm currently downloading the huge, pre-built Raspbian Jessie Full with PIXEL image. It should be done by the time I get home after work, provided my shitbook netbook doesn't crap out halfway through the download like its done every other large download this week.

Anyway, the current setup works, except the software side.
As to making it portable, my luck so far has been good. As it so happens, I have a Netgear Aircard which will become obsolete to me in 6 days. It is powered by a 3.7v Li-ion battery that outputs a minimum of 2500mAh for 9.25watt hours - meaning I can power an idle Pi 3 for an estimated 15-18 hours per full charge.
Estimation based on 750mA draw and 70% efficiency plus a further 30% loss for a step up converter. (50% efficiency total)
But who knows, my math is probably wrong and in a real-world use situation, nobody will use it at idle, so my realistic battery life expectancy is ~6-8 hours. This does not factor in allowance for an LCD module.

Here's a size comparison of the Pi and battery I plan to use:

Re: Raspberry Pi handheld VN console build.

Posted: Fri May 12, 2017 1:19 pm
by Twoflower
I'll be following this project with interest. I'm hoping to demo my VN on a bartop arcade unit, which runs Raspberry Pi, and hoping this crazy idea will work. Thanks for doing the legwork and researching the possibility of portable VNs on unusual hardware!