Godot 3 (any Godot developers here?)

#1

Hey everyone. Just curious if anyone has tried building a game with Godot 3. There is a project which adds the rpi as an export target. https://github.com/efornara/frt

I’ve been tinkering with Godot for years now and it’d be fun to see my projects running on this handheld.

#2

Would love to see Godot able to export to the GameShell, in fact, it’s the only thing missing for now that keeps me from buying it.

#3

Hobby game dev here. I just ordered a GameShell and have been working on porting a game project of mine from iOS/Swift/SpriteKit to Godot 3.0 and really want to make a build to the GameShell.

Since I don’t yet have the hardware (and to help with the dev environment) I’m spinning up a VM in qemu for a Raspbian/Raspberry Pi 3 to test some things out. ARM based systems’ VM’s don’t work as well on Virtual Box, Hyper-V or other Hypervisors.

Thanks ugly_cat, I’m going to try that and if it works well I may post some tutorials and resources online.

#4

Be sure to post any updates!

I primarily use Love2d but looking to get into Godot for some 3d stuff, so looking forward to seeing how you get on!

#5

With the upcoming version 3.1 you should have more chances to make it work on the GameShell as it supports OpenGL ES 2.0. There are 3.1 alpha builds available on the Godot website if you want to try.

#6

I was experimenting with my Pocket CHIP which is also an AllWinner single board computer, different CPU though (Quad Cortex A8).

I was able to get one of my games running with frt. It’s not an export template like I thought, but a binary used to run Godot projects. I did have a 3D model inside of my 2d project which didn’t render correctly. I think that can be fixed though.

#7

Quick update:
I read elsewhere on these forums that while the clockworkos image is easily downloadable, the linux kernel is not necessarily readily available. That’s holding up my qemu vm creation of a virtualized clockworkpi game shell. I may end up waiting until my hardware is delivered to continue working on that angle. I was able to run various VM’s in qemu of RPi 3 - just not the specific one for the Game Shell. They may be close enough to get something working, but I’m not really interested in spending time on that now.

For now it looks like the most straight-forward method for doing this is installing godot engine and gcc or scons and compiling on the device itself.

I’m a bit hesitant to take time away from developing my game at this point because I’d like to have hardware in hand and Godot 3.1 might be a nice solution to many problems that I have. On that note - no official word on Godot Engine 3.1 release date yet but they’re wrapping up the alpha and appear to be heading into beta testing. That seems to mean that 3.1 is feature-complete but in need of bug testing and fixes and they show on github an 87% completion: Godot Engine milestone 7 (v 3.1) features/preliminary-changelist here: Godot Engine 3.1 changelog

1 Like
#8

Just got my gameshell today. I was able to get games working through FRT, but none of them registered any input. Anyone have any ideas as to why?
Note: Of course none of the 3D stuff using GLES3 worked.

Looking pretty hopeful for Godot.

1 Like
#9

I got mine yesterday and have been enjoying building and tinkering with it.

@ugly_cat What version of the OS and what graphics drivers are you running? I’m on clockworkos 0.3 (I think) with the lima driver, though I’ve also tried fbturbo. I keep getting this error:

cpi@clockworkpi:$ frt_093_215_arm7hf.bin -v
ERROR: ContextGL: Condition ’ singleton ’ is true.
At: drivers/gl_context/context_gl.cpp:43.
ERROR: ContextGL: Condition ’ singleton ’ is true.
At: drivers/gl_context/context_gl.cpp:43.
libEGL warning: DRI3: xcb_connect failed
libEGL warning: DRI2: xcb_connect failed
libEGL warning: DRI2: xcb_connect failed
frt: eglInitialize failed.

I think I’m missing a package or driver, got any ideas on how to solve that? If I can figure that out I’ll see about the input issue.

#10

So I went back over what you said @ugly_cat and was able to figure things out and get one of the demos to run on my GameShell tonight, woohoo!

Process this time around:
(On ClockworkOS version 0.24)

On the ClockworkPi GameShell via ssh:
I’ve made a download folder to work with these files and cd into it, you can put them anywhere you want.

Please note the version number used in the frt, as that’s important to get this to work. The first part 093 is the frt version, which is the latest as of writing this post, 215 is Godot Engine 2.1.5, which is the latest stable OpenGL ES2.0 compatible release, finally arm7hf signifies the GameShell’s CPU instruction set.

$ wget https://sourceforge.net/projects/frt/files/0.9.3/frt_093_215_arm7hf.bin.zip/download
$ mv download frt_093_215_arm7hf.bin.zip
$ unzip frt_093_215_arm7hf.bin.zip
$ sudo install frt_093_215_arm7hf.bin /usr/local/bin

Since the unmodified sample project doesn’t at all account for running on Clockworkpi, it’s best to download it first to your desktop PC (this can be a laptop or Mac, I just mean a desktop OS). You’ll also need to pick up the Godot Engine 2.15 from here: Godot Engine 2.1.5

Download the demo projects here: Godot Demos 2.1.5 and unzip those on your PC.

Next Open Godot Engine (Make sure it’s 2.1.5 if you have multiple versions installed on your machine) then import the Demos/2D/Platformer project. Go to Scene and Project Settings under Sections, select Display and be sure to set the Width = 320 and Height = 240. For good measure I’ve toggled off the Resizeable and toggled on Fullscreen.

Results: Success (Or something closer)
godotSh

As with @ugly_cat, I was unable to get input to work yet through the GameShell itself. I was however able to send input without too much delay from my VNC connection and everything seems to work right. I highly suggest using VNC until we get the button input working because there’s no way to exit other than VNC using the FRT command Win+Q or finding the process on ssh with ps aux | grep frt and killing it.

Okay, so this is crazy, after all that I’m actually able to use the buttons that are mapped out correctly on my GameShell. All I have to do is make sure the shoot button is mapped out correctly now and I’ll have the demo fully functional. FTW!

2 Likes
#11

A bit more testing and I know what causes the input to suddenly start working though I don’t know why. The way to activate input is to left click within the game window (I’ve only been able to do this on my PC through a VNC connection).

I’ve also added a control to my Godot Project to exit the game to the main launcher menu when you press the Menu button on the GameShell (while input is working) or Escape key over VNC.

I’ve figured out a work-around for the time being that runs the game project as an app and input actually works fine: load it in the current version of Clockwork OS v0.3! I had the original SD Card that shipped with my GameShell and had flashed an old 8GB card to play around with the previous Clockwork OS because it supposedly worked better with emulator cores.

Next on the agenda: Test one of the FRT versions with Godot 3.1 Beta support and keep fingers crossed that Godot 3.1 GM will release soon.

2 Likes
#12

Godot 3.1 is now released with support for OpenGL ES 2.0

2 Likes
#13

Yeah, would be great if someone could build export templates for the GameShell!

#14

@okamitsu I’ve successfully compiled an export template with Godot 3.1 stable on my GameShell.

Trouble is it doesn’t appear to be that easy. I made the tweaks for input and resolution, exit function mapped to escape key (Menu button on GameShell) then did an export project with the 2D Platformer Demo.

It technically runs on device, but it has a bunch of errors and no visuals after the Godot Engine splash screen. Sound was a bit distorted but generally worked. I could tell the input worked as intended since I could hear the jump and shoot sounds play with the buttons I mapped to those actions.

Previously I had trouble with the gcc compiler from the godot guide so they recommended trying Clang instead with the use_llvm=yes parameter. I doubt that would change anything with the errors though.

It seems there’s a lack of implementation for the Lima drivers.

I’ve updated my github and consequently forgot to update this post. I tried the original exported project from the export templates built on the CPI fw v3.0 running on the CPI fw 0.21 and it does work better, though I wanted to get everything working as it should so I’ve recompiled the target=release export templates on fw 0.21. I’m in the process of compiling the export template on CPI fw 0.21 for the debug target because there’s still sound distortion issues and the ALSA driver sends errors about underrun.

Since this is a bit complicated with several components that all have different version requirements I’m going to summarize that here:

  • Clockworkpi GameShell: Firmware 0.21 required
  • Godot Engine: Version 3.1 stable required
  • Godot project: Binaries can be built from any OS in Godot 3.1 stable using the following settings:

    Under Custom Template use the binaries I’ve built and posted to the github url below. Be sure 64 bits is NOT selected under Binary Format

You can find all the details and grab the compiled binary at godot_3.1_gameshell on GitHub

1 Like