Could LÖVE run on a Raspberry Pi 2B WITH x11?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
molul
Party member
Posts: 255
Joined: Sun Feb 05, 2012 6:51 pm
Location: Valencia, Spain
Contact:

Could LÖVE run on a Raspberry Pi 2B WITH x11?

Post by molul » Mon Jun 11, 2018 6:46 am

I'm currently trying to build LÖVE on a Raspberry Pi 2B with x11 to use the binaries on another ARMv7 device (a Rockchip RK3066).

I've seen many posts saying it's recommended to build LÖVE disabling x11 to use GLES instead, because of performance, so my question is: would LÖVE always run poorly if I build it WITH x11?

My project is a simple UI at 1280x720 that displays not more than five 215x300px images at once, a 1x720px background image (stretched to 1280x720), and a couple of small logos. I also use a shader to make some nice background effect, which I guess I'd have to drop. I wonder if, in terms of performance, that kind of project would still work fine if I built LÖVE without using GLES.

User avatar
pgimeno
Party member
Posts: 1272
Joined: Sun Oct 18, 2015 2:58 pm

Re: Could LÖVE run on a Raspberry Pi 2B WITH x11?

Post by pgimeno » Mon Jun 11, 2018 8:05 am

"with X11" is not the same as "without OpenGL" (ES or otherwise). I don't know if the RPi is incapable of handling GL under X11. It sounds a bit strange, but it may be the case. My desktop Debian certainly has no problem handling both, and I don't think it supports GL without X11.

Does your actual target system have a GPU in the first place?

You could perhaps give Luigi a try. It separates the graphics rendering backend from the UI, and it supports two backends, LÖVE and SDL.
Thrust II Reloaded - GifLoad for Löve - GSpöt GUI - My NotABug.org repositories
The Microsoft Github repositories I had have been closed after the acquisition announcement and will be removed in the near future.

User avatar
molul
Party member
Posts: 255
Joined: Sun Feb 05, 2012 6:51 pm
Location: Valencia, Spain
Contact:

Re: Could LÖVE run on a Raspberry Pi 2B WITH x11?

Post by molul » Mon Jun 11, 2018 2:30 pm

pgimeno wrote:
Mon Jun 11, 2018 8:05 am
Does your actual target system have a GPU in the first place?
I found this regarding RK30XX models on wikipedia:

"Quad core Mali-400 GPU, clocked at 250 MHz supporting OpenGL ES 2.0, OpenVG 1.1 support, 9 GFLOPS"

But my teammates has told me "it has some OpenGL problems" so I'm not sure what to do. If I had a Raspberry I'd just try to build it, but I have to buy one and I'm not sure about spending money if there's no evidence that the binaries would work on the RK3066.


[EDIT]
Someone on the Raspberry Pi forums just told me this:
"Unless you're compiling and linking to build a monolithic executable, it's shouldn't be much trouble. Most applications use dynamic linking of libraries at runtime, ie; .so files in linux. So, if you're making function calls to GLES routines, usually via the Mesa lib, you just need to be sure there is a GLES compliant lib on both devices.

I checked the RK3066 and it uses a ARM Mali-400 GPU which supports the OpenGL ES 2.0 specification. So, if there is a Mesa library for it, which is likely as Mesa has been around linux for many years now, your code should work."

Does anyone know what "So, if you're making function calls to GLES routines, usually via the Mesa lib" mean? Does LÖVE use that?

User avatar
bartbes
Sex machine
Posts: 4943
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Could LÖVE run on a Raspberry Pi 2B WITH x11?

Post by bartbes » Mon Jun 11, 2018 6:53 pm

No, love doesn't "use mesa" as such, but it uses any GLES implementation it can find. So like I said, you'll probably be fine.

User avatar
molul
Party member
Posts: 255
Joined: Sun Feb 05, 2012 6:51 pm
Location: Valencia, Spain
Contact:

Re: Could LÖVE run on a Raspberry Pi 2B WITH x11?

Post by molul » Mon Jun 11, 2018 7:00 pm

I hope you're right :) Can't wait for the Pi to arrive and test everything!

Redbeer
Prole
Posts: 8
Joined: Wed Apr 25, 2018 1:33 pm

Re: Could LÖVE run on a Raspberry Pi 2B WITH x11?

Post by Redbeer » Mon Jun 11, 2018 9:19 pm

I have a thread around here where I did just what you're saying. As far as performance goes, if you only plan to use a raspberry pi 3 (or maybe a 2) running inside a window in X11, or over top of x11 in full screen, you can have decent performance for sure on a 2D application. However, if you plan to run on the original Pi OR on the Zero W (or WH) then you may have a slow system because even the Pi desktop itself runs slow on these devices, never mind having a full OpenGL game running over top of it. In the end, for all hardware, it depends on what you end up doing, specifically, as to how it will perform. From your description of your program, it doesn't sound like using x11 and the full/experimental opengl implementation with the desktop in the background should not be an issue as you aren't doing very much.

User avatar
molul
Party member
Posts: 255
Joined: Sun Feb 05, 2012 6:51 pm
Location: Valencia, Spain
Contact:

Re: Could LÖVE run on a Raspberry Pi 2B WITH x11?

Post by molul » Tue Jun 12, 2018 4:19 am

Hi Redbeer! The topic you mention was what encouraged me to try to build on the Raspberry (I actually sent you a PM asking if you could zip the binaries and send them to me, to make a quick test without building LÖVE xD now I see the PM is still in my outbox, not sure why it wasn't sent).

The thing is, I want to use LÖVE binaries built on Raspberry pi to use them on a Rockchip board that has similar specs, as cross building from Ubuntu wasn't possible because of dependencies.

If by chance you still had the Raspberry binaries over there, would you kindly share them? :)

User avatar
pgimeno
Party member
Posts: 1272
Joined: Sun Oct 18, 2015 2:58 pm

Re: Could LÖVE run on a Raspberry Pi 2B WITH x11?

Post by pgimeno » Tue Jun 12, 2018 11:14 am

There are Raspbian binary packages for 0.9.1: http://archive.raspbian.org/raspbian/pool/main/l/love/

To extract, you need either dpkg-deb (easiest) or ar + tar. In case you don't have dpkg-deb, note that a .deb package is an ar archive which contains three files, two of which are typically tar.gz or tar.xz. You can extract it with ar x <package> then tar -xf data.tar.xz.

Not sure how helpful 0.9.1 will be, though, but Debian is stuck with that version.
Thrust II Reloaded - GifLoad for Löve - GSpöt GUI - My NotABug.org repositories
The Microsoft Github repositories I had have been closed after the acquisition announcement and will be removed in the near future.

User avatar
molul
Party member
Posts: 255
Joined: Sun Feb 05, 2012 6:51 pm
Location: Valencia, Spain
Contact:

Re: Could LÖVE run on a Raspberry Pi 2B WITH x11?

Post by molul » Tue Jun 12, 2018 11:56 am

Thank you! Too bad I'm on 11.1, but I can use it to test if it works on the board.

EDIT: I can run the binary, but of course I can do nothing without the dependencies ^_^U Still have to wait for my Raspberry to arrive and try to get it all built.

MachineCode
Citizen
Posts: 61
Joined: Fri Jun 20, 2014 1:33 pm

Re: Could LÖVE run on a Raspberry Pi 2B WITH x11?

Post by MachineCode » Tue Jun 12, 2018 2:32 pm

If you use Raspian on a RPi, then enable OpenGL and Love 0.10.2 will run really well. The easy way to do this is to install love from the RPi repository (still 0.10.2 with the latest Raspian). This installs all the dependencies and should get you a Supertoast if you open a term and type love.

The openGL on Rpi is the work of Eric Anholt over at Broadcom https://anholt.github.io/twivc4/ and you should get 60fps in X on a Rpi 3. The performance is pretty much desktop. Installing the openGL ES version will be more difficult as it needs a different SDL2.

I don't think this will help you very much with any other ARM SoC board. As far as I know, the Anholt openGL driver is the only X ARM driver that works. On other ARM boards you will either be back to software emulation or you will need to get an ES version compiled. Strange as it may seem, Mali and other GPU designs do not seem to have any intention of supporting OpenGL in X.

If you want to use 11.1, then currently even the RPi will need a to be compiled. With 0.10.2 the download page had armhf.deb files which could be installed directly under Raspbian to get a working love environment. 11.1 doesn't have the armhf.deb files yet (I don't think).

love running on a RPi is pretty much identical to running on my desktop linux. It is a good sanity check on your programs - if it runs at 60fps on a RPi then it is good.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests