-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add official Raspberry Pi support #2671
Comments
Theme already has a cursor override doesn't it? |
What do you mean? Raspberry Pi is just a computer without OS. You can install Linux or Android on the device and play your Godot project (Linux binary or APK respectively). |
If there's a basic api to access the hardware (screen, input, sound, On 28 November 2015 at 18:06, Alexander Cheery [email protected]
|
One of the issues is that the Raspberry Pi handles 3D stuff by drawing directly on the hardware (screen), not through X, while the mouse IS drawn thourgh X, making the mouse cursor not to be visible, for the interface (drawn with hardware acceleration?) is on top of it. This specific issue is described on the working port fork: x1212#1 |
Did you try the "custom_mouse_cursor" option on project settings? On 29 December 2015 at 20:58, heniotierra [email protected] wrote:
|
I did not, nor am I able to atm, but will do tomorrow. :) |
Since I merged the latest changes into my fork yesterday it now supports the "custom_mouse_cursor" option, but that seems to only work in a running game, not in editor or when selecting a project from the list. Btw. if there are any plans for providing official support for the Raspberry Pi, the next few days would be a good time to have a look at the necessary changes (currently they can be found on the raspberry branch https://github.com/x1212/godot/tree/raspberry) since I should have enough spare time to help until the middle of next week. |
you should be able to run a script with the keyword to change default cursor inside editor... |
you should add the cursor to the editor icons
|
Thanks, I got the cursor to work in the project manager that way, for some reason it didn't work for the editor, but in the editor scripts can be used, so that shouldn't be such a big problem anymore (but I'll try to fix it anyway). |
@x1212 "I did find a place in main.cpp, where I could try to add that option on startup" |
AFAIK Godot builds out of the box on the Raspberry Pi, and from what I've seen seems to work just fine. What's missing to consider this issue solved? (cc @efornara) |
To be honest, I rarely use godot platform=x11 tools=yes on the Raspberry Pi. My builds (FRT) use another code path (OpenGL ES 2.0) and the problems I get are more like the problems you would get on low-end android phones. After enabling vc4 to get hardware accelerated desktop OpenGL, godot 2.1 compiled and worked out of the box last time I checked. I tried my branch (gles2, but master should be the same) something like 2/3 weeks ago, and I had two problems:
|
I have compiled godot 3.1-beta1 on a stock raspbian stretch (gcc 6.3) using:
I get this error:
Commenting out the line is enough to generate a working executable using gcc (of course, I haven't tested gdnative), so this seems to be the only problem. I had no issues compiling with Here are my first impressions on a Raspberry Pi 3B+ using the experimental OpenGL driver. Not what we might want to hear, but here they are. The 3.1-beta1 editor runs but it is not really useable. I have loaded the 2D platformer and interaction is very slow. Even the code editor lags a couple of seconds when typing a character. Anyone wants to try with lto (and maybe overclocking)? The 2.1.5-stable editor is actually quite useable. Panning, selecting and code editing the 2D platformer all work reasonably well. Not a speed demon, but no major lags either: I could see someone writing a game on it. Note that I am talking about the editor here. The export templates are another matter. I expect to be able to test them soon, but my experience with the 2D platformer on 3.0-gles2 suggests that 3.1-beta1 should be slower than 2.1.5-stable, but still useable. For the record, here are the compilation times using clang 4.0 on a non-overclocked Raspberry Pi 3B+ running without GUI, with the operating system on a MicroSD card and the godot directory (and swap partition) on an external hard disk: 2.1.5-stable: 47m |
That's an upstream bug in GCC 6 & 7, that was later fixed in GCC 8.1: see #16100 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79085. |
I do see a significant performance regression. On the plus side, the poor performance I was seeing on the editor might be related. On the 2D platformer on the Raspberry Pi 3B+, I get 60fps on 3.0.6-gles2 (basically 3.0.6-stable with the 2D-only GLES2 code that was initially merged on master), and I get 1fps (legacy driver) and 5fps (new driver) on 3.1-beta1. I might be doing something stupid, so please let me know if anyone else can reproduce the problem. I am using my own platform (FRT), so there is a chance it might be a problem on my end. I'll try the standard X11 export templates later, but, since I am not doing anything crazy in my platform, I wouldn't bet on this being the problem. I attach the projects I use. Basically, I downloaded the demo from the asset store and exported it as a Linux ZIP on godot-3.0.6-stable. I then imported the demo on godot 3.1-beta1, changed the renderer to GLES2, and exported it as another Linux ZIP. 30_2d_platformer.zip If this helps, I get these errors on godot 3.0.6-gles2:
and these errors on godot 3.1-beta1:
|
Same result on 3.1-beta1 / x11: 5fps. I couldn't test 3.0.6-gles2 / x11 because it crashes. I suspect old code not handling the glGenerateMipmap extension properly. In any case, I am now more confident in saying that x11 vs frt doesn't matter. Still, I might be doing something wrong, so it would be nice if anyone else could confirm. Just compile with something like this:
And then run it with something like this:
The difference (using frt) between new and legacy drivers (5fps and 1fps) suggests that this is more likely GPU related rather than CPU related. |
Keep in mind that you're comparing two quite different GLES2 backends. The one you merged in 3.0 in your fork was the very early backend with the most simple rendering features supported. The one in 3.1 supported 3D PBR, and many advanced 2D rendering features. Disabling some features in your project settings might help reduce this gap. Some of it will stay as overhead in any case. |
One other potential cause might be #24466. You could try to revert the commit mentioned there to see if it does a big difference on such hardware/drivers. |
Is the server build able to run in a raspberry, since it doesn't render anything and stuff ??? Has anyone tried it ? |
It seems it works with pi 4 which has gles 3, but what about the pi 3B+ ? |
@daveyman123 @NilsIrl @asheraryam Take a look at https://github.com/efornara/frt. |
Found this thread while searching for whether Godot supports the Arm64 Pinebook Pro laptop. Apologies that it is not directly Pi related. GPU stats: |
I tried compiling 3.2.1 on a Pinebook Pro, based on the Pi instructions here
However, when I run, I get the following error:
|
@sdwfrost can you try compiling with "debug" instead of "release_debug" that way the backtrace will include better info. |
@sdwfrost , looks like you are using mrfixit's Debian image (it's the only one that comes with gl4es enabled globally by default). This Debian image and ayufan's Ubuntu images are using armhf userland - 32bit one. I haven't tried to get the Godot editor working there for a very long time If you are on Manjaro or one of the other distros targeting aarch64, then you can use: llvm can't optimize for both the big and small cores (you will have to choose either the a72 or a53) |
We're in the process of moving feature proposals to godot-proposals. Would anyone interested in Raspberry Pi support in Godot be willing to open a new issue there following the proposals issue template, and summarize the key takeaways from the discussion here? (Current forks that implement support, what's needed to have things working out of the box in the core engine, etc.) |
Someone created a new proposal, so this can be closed. |
HI @psstoyanov, may be you can help me with this one. I tried to compile it on Manjaro ARM and the process failed, see error below: ` [Initial build] Compiling ==> modules/enet/register_types.cpp [Initial build] Compiling ==> thirdparty/oidn/core/api.cpp [Initial build] In file included from thirdparty/oidn/core/common.h:19, scons: *** [thirdparty/oidn/core/device.linuxbsd.opt.tools.64.o] Error 1 scons: building terminated because of errors. |
@ikostan , which branch are you using? I will try to replicate this tonight |
I used |
I haven't tried For now, I have found the following setup to provide the best results:
With 3.2, you will see the editor becoming smoother in ES3 mode, however for that you need to be able to get GL3 context (hence the experimental Panfrost devs are moving fast - when they get to Vulkan, I bet Godot will run even better. |
@ikostan , I receive the same error as the one you got. Opening a ticket for it, could be good. Apart from the error, I have missed the following commit: 525c40a The OpenGL ES2 backend is being refactored and disabled for now on For now, stick with |
Tanks @psstoyanov. Not sure about opening a ticket since Raspberry Pi is not officially supported. Trying to compile 3.2... |
@ikostan , further investigation and what I've missed from the changes with 4.x+ This is very interesting: Line 111 in ba7738a
Targeting It goes around the x86 specific error with Of course, the resulting build can't run on PBP running Panfrost (still no Vulkan for Panfrost or refactored es2 for Godot). BUT it is generated and can be launched on the Pinebook Pro running Manjaro. Now with this newfound knowledge, I'm really interested to check if I can finally produce an executable that will run on mrfixit's Debian build that is running 32bit userland 😃 Already started the compile 🤞 [Update]: No, targeting If someone has an idea how to get arm or armv7 build of the editor, please share :) |
This is what I did:
and as a result I got this output: scons: Reading SConscript files ...
as a result I got following output: Godot Engine v3.2.3.rc.custom_build.c5abc57f8 - https://godotengine.org Godot GUI client is opened as well
Now I will try to compile the latest Godot engine... Thanks @psstoyanov for helping me. |
This is the procedure I followed:
[Initial build] progress_finish(["progress_finish"], [])
Godot Engine v4.0.dev.custom_build.443686d72 - https://godotengine.org screenshot with Godot error message also attached: So unfortunately the procedure does not work for the master branch |
@ikostan: It can't work for master because master is Vulkan-only |
I've read the error message, thanks. |
@ikostan , I can see that on your system it is using I know for sure there are experimental Vulkan drivers for the RPi3 and RPi4. Try to find more about them (I think I don't have a Pi at home nor do I follow it's GPU driver progress as closely as I do for the PinebookPro with Panfrost. However the same principles apply:
|
Actually I still have a problem. When I tried to develop 2D game of my own I got an error on my first attempt to play it: So I get right back to where I started. i mean, I wanted to compile the Godot engine in order to solve that error in the first place... |
@ikostan , most likely you haven't adjusted the project settings to enforce Go to Project -> Project Settings -> Rendering -> Quality and either set it to GLES2 or use the fallback to es2 option. Now for actual release of the game on the RPi you will also have to create the export templates - https://docs.godotengine.org/en/stable/development/compiling/compiling_for_x11.html#building-export-templates . As you are already familiar with compiling the godot engine from source, the steps to compile the export temple (to get the final executable) are similar. I haven't bothered with the export template just yet but I don't believe it will cause any issues. |
Thanks, it seems to be working now. |
I know the Raspberry Pi and Raspberry Pi 2 are not officially supported, and that there is a working fork out there, but it has got some issues which make it close to worthless. However, I think that some of those problems might be easy to address.
For example, one of the big issues is that the mouse cursor is always under the interface objects, but I think that if one can make the mouse cursor be drawn by Godot's GUI in a similar way as the other interface objects, that would be enough for solving the problem. I guess that would be pretty easy to implement.
I don't know anything C++, only C (and also some OO languages), otherwise I could do that myself. But then, if someone can at least give me directions like where to begin to look at the source files to use the stuff to do this, I'd be glad, and very willing to try.
The text was updated successfully, but these errors were encountered: