Godot build for Go Advance!

Third party OS images and hardware mods
Post Reply
User avatar
Pumpkinwaffle
Posts: 31
Joined: Sat Jul 25, 2020 3:10 am
languages_spoken: english, french
ODROIDs: OGS
Has thanked: 6 times
Been thanked: 6 times
Contact:

Godot build for Go Advance!

Post by Pumpkinwaffle »

Turns out it's very easy to make game for the OGA/OGS with the Godot game engine.

Written guide for OGA/OGS: (WIP)
https://docs.google.com/document/d/1Etr ... sp=sharing




-------------------
Original post:

Turning the Go Advance into a wireless devkit for Godot would be simply wonderful, and open the way for so many games being ported.

Now of course pressing play on the computer and the scene running on the handheld is wishful thinking in the current state of things. However while it doesn't directly support arm, I've seen Godot compiled on the raspberry pi.

If someone could take the time to see if Godot compiles on the go advance I would truly appreciate it. I wouldn't expect anything on the 3d side but the 2d platformer example project should perform quite well.
The simplest solution i suppose is to build on the go advance itself, but I'm no expert in the topic. And I don't have one yet :)
Last edited by Pumpkinwaffle on Fri Mar 12, 2021 4:45 am, edited 3 times in total.
These users thanked the author Pumpkinwaffle for the post:
Bakenshake (Tue Mar 09, 2021 5:58 am)

pmprog
Posts: 102
Joined: Thu Oct 18, 2018 4:01 am
languages_spoken: english
ODROIDs: ODROID-GO
Has thanked: 27 times
Been thanked: 1 time
Contact:

Re: Godot build for Go Advance?

Post by pmprog »

As there's emulators for PSone and N64, I don't see why 3D shouldn't be possible also ... as long as you go easy on the shaders and polycount?

I'll be honest, I've been trying to look at options for developing for native OGA builds. I've struggled to port Allegro5 natively, but I did write a library that compiled against Allegro5 on desktops and libgo2 on the OGA. That works pretty well, except it's framebuffer only (so 2D only, or at minimum software-based 3D), and I haven't implemented any audio support (because I don't really know what I'm doing when it comes to audio).

I have tried to use AreaScout's SDL build, but whilst I compiled against it last night, it didn't run... so I'm obviously missing something, and haven't yet looked into it.

My only other thought I might try is to create a libretro core, and maybe using physfs to make my "roms" just be a disk image of files where I'd usually have a resource folder.

I am keen to see some more tools for making native OGA games/apps, and I'm hoping to try and spin up merveric's Debian Buster image and see what I can get running through there

User avatar
Pumpkinwaffle
Posts: 31
Joined: Sat Jul 25, 2020 3:10 am
languages_spoken: english, french
ODROIDs: OGS
Has thanked: 6 times
Been thanked: 6 times
Contact:

Re: Godot build for Go Advance?

Post by Pumpkinwaffle »

I was mostly saying 3D wouldn't work out of box as it would likely be very poorly optimized for the hardware while 2D isn't very demanding, so it should be smooth right away. But low poly could work.

While libraries and such should enable someone competent to make a game on the device, I have very little programming skill and it would be very tedious for someone like me. I work as a game designer, 95% of what I do is only in the Unity editor , and I'm just now moving to Godot to learn to code, do Jams and improve my skills. Having a game engine running on the OGA would allow a lot of newcomers to dabble with game making.

Steps taken on Raspberry Pi could work on the OGA.
Build from the OGA itself:
https://www.indiegamepod.com/?p=3517
Target OGA from pc:
https://github.com/efornara/frt/blob/ma ... c/Usage.md
Or building for html5 and looking to get that running on OGA.

I don't know when the next batch of OGAs will be but hopefully I'll be able to get my hands on one and do some test myself. Let me know how things go on your end if you try anything.

I would love the for the OGA to turn into little indie beast. And see new games instead of just some new hardware to play sonic (as great as that is :D )

pmprog
Posts: 102
Joined: Thu Oct 18, 2018 4:01 am
languages_spoken: english
ODROIDs: ODROID-GO
Has thanked: 27 times
Been thanked: 1 time
Contact:

Re: Godot build for Go Advance?

Post by pmprog »

I might try and see if I can build Godot later then... bear in mind, I was fairly unsuccessful getting Allegro working, so I wouldn't hold my breath.

But yeah, I'm in agreement in having options for native game dev (though I suppose SDL is still an option, if I can figure out why my test didn't work)

User avatar
Pumpkinwaffle
Posts: 31
Joined: Sat Jul 25, 2020 3:10 am
languages_spoken: english, french
ODROIDs: OGS
Has thanked: 6 times
Been thanked: 6 times
Contact:

Re: Godot build for Go Advance?

Post by Pumpkinwaffle »

Did you manage to get Godot running on your end pmprog?

I finally got my hands on an OGA. And while I'm having a blast running games from my childhood, I'm having no success when I try anything beyond following instructions found on the forum. I'm very thankful to however posted instruction on getting pico-8 to run by the way, should he read those lines.

I am mostly unsure when it comes to settings to give scons to build godot. I have no idea what names I should input for the CPU, GPU and all. I feel like without a lot more prior knowledge on linux in general it will be very difficult to get any result. I understand some of the documentation but not everything, and mostly end up running in circles looking for answers.
As building on a raspberry pi is said to take at least an hour, trying settings without knowing what I'm doing could take quite a long time ^^

I also tried using the FRT export template. Exported the platformer demo with it and get this error which I don't fully understand when I try to run it on the OGA using ./platformer.x86

Code: Select all

ERROR: make_dir_recursive: Method failed, Returning: err
	At: core/os/dir_access.cpp:185.
Godot Engine v3.2.3.stable.custom_build.31d0f8ad8 - https://godotengine.org
Segmentation fault
Am I trying to bite off more than I can chew? Given how I am failing to grasp so many things, I'm starting to doubt the time spent on this is going to get me anywhere.

pmprog
Posts: 102
Joined: Thu Oct 18, 2018 4:01 am
languages_spoken: english
ODROIDs: ODROID-GO
Has thanked: 27 times
Been thanked: 1 time
Contact:

Re: Godot build for Go Advance?

Post by pmprog »

No, I'm afraid not. Nor have I really got any other library I was looking at working.

I did write my own header-based library, which wrapped Allegro on desktop and libgo2 on the OGA. It didn't utilise GLES though, because I can't seem to wrap my head around that. It works fairly well for 2D, with MP3, OGG, and SoundFont2 support. Though I haven't written enough to fully test out it's performance; and it lacks a tonne of features (some intentionally, others I've just not looked at yet)

There's still a couple of libs I want to try though...

User avatar
Pumpkinwaffle
Posts: 31
Joined: Sat Jul 25, 2020 3:10 am
languages_spoken: english, french
ODROIDs: OGS
Has thanked: 6 times
Been thanked: 6 times
Contact:

Re: Godot build for Go Advance?

Post by Pumpkinwaffle »

That's good to hear, allegro seems interesting but definitely too advanced for someone like me. Other than giving very basic instructions to a game engine I'm pretty much useless.

After a lot of struggling I managed to start compiling Godot on the OGA but it quickly threw and bunch of errors at me and stopped. I don't think this is something I'll be able to achieve at my current level.
I'll try to get in touch with the person who made that FRT template, I think the problem lies in me not using it properly. It'd be nice to get it to work so that Godot games could sit nicely organized with everything else in emuelec. It would enable a lot of inexperienced users to get into gamedev/programming.

Until then I got the android image going, exporting to android with Godot works on the OGA. That's more than enough to start developing some games for the OGA. I must say doing pixel art and writing a some "if else" is more relaxing for me than trying to compile a bunch of stuff Haha.
That being said I have been learning so much when it comes to linux, github compiling and everything. That little handheld is great for that. Hopefully at some point I'll be able to port things on my own for other people to use.

pmprog
Posts: 102
Joined: Thu Oct 18, 2018 4:01 am
languages_spoken: english
ODROIDs: ODROID-GO
Has thanked: 27 times
Been thanked: 1 time
Contact:

Re: Godot build for Go Advance?

Post by pmprog »

Glad to hear you've got something going.

Raylib literally today put out a KMS/DRM backend, which i have compiled, and tested several of the examples. It'll need some work to fix screen rotation, add controller support, but otherwise should be a pretty nice library to use.

kruffin
Posts: 14
Joined: Wed Jul 29, 2020 5:03 am
languages_spoken: english
ODROIDs: Go Advance
Has thanked: 1 time
Been thanked: 14 times
Contact:

Re: Godot build for Go Advance?

Post by kruffin »

I got Godot to build an executable that works on the OGA. I used frt from the above thread and had to alter the scene some to have it rotate since the OGA screen is 320x480 just physically rotated longways.

In main bar on the far right, toggle to GLES2 mode; it will work with GLES3 but none of your shaders will (if you have any).

In Export:
I took the normal linux/x11 export, left 64-bits checked and pointed the custom templates for debug and release to the arm frt file.

In Project settings:
General->Display->Window set the width to 320 and the height to 480

In the main scene add a ViewportContainer and a Viewport as its child. All of your other items should be a child of Viewport. Set the size of the ViewportContainer to x of 480 and a y of 320 (opposite of what we set in project settings). Set the rotation of ViewportContainer to be -90 and then change it's position to (0, 480).

With all of these steps once you export it will run on the OGA. You'll have to kill it in a ssh console if you didn't put a way to quit though. The other thing is the controller buttons don't map correctly, the joystick does, but the d-pad is mapped to start/select and some others while the f-keys are directional. I haven't quite dug into the keys yet, but wanted to share since I was pleasantly surprised that it worked.
These users thanked the author kruffin for the post (total 2):
Pumpkinwaffle (Tue Jan 05, 2021 5:15 am) • Bakenshake (Tue Mar 09, 2021 5:58 am)

kruffin
Posts: 14
Joined: Wed Jul 29, 2020 5:03 am
languages_spoken: english
ODROIDs: Go Advance
Has thanked: 1 time
Been thanked: 14 times
Contact:

Re: Godot build for Go Advance?

Post by kruffin »

I got the joypad indexes as well:

Code: Select all

b     = 0
a     = 1
x     = 2
y     = 3
L1    = 4
R1    = 5
L2    = 6
R2    = 7
Up    = 8
Down  = 9
Left  = 10
Right = 11
F1    = 12
F2    = 13
F3    = 14
F4    = 15
F5    = 16
F6    = 17

User avatar
Pumpkinwaffle
Posts: 31
Joined: Sat Jul 25, 2020 3:10 am
languages_spoken: english, french
ODROIDs: OGS
Has thanked: 6 times
Been thanked: 6 times
Contact:

Re: Godot build for Go Advance?

Post by Pumpkinwaffle »

kruffin wrote:
Wed Dec 02, 2020 10:12 am
I got Godot to build an executable that works on the OGA. I used frt from the above thread and had to alter the scene some to have it rotate since the OGA screen is 320x480 just physically rotated longways.
...
With all of these steps once you export it will run on the OGA. You'll have to kill it in a ssh console if you didn't put a way to quit though. The other thing is the controller buttons don't map correctly, the joystick does, but the d-pad is mapped to start/select and some others while the f-keys are directional. I haven't quite dug into the keys yet, but wanted to share since I was pleasantly surprised that it worked.
First, thanks for taking the time and actually figuring it out. I'm bit late to reply December had me quite busy.

I'd like to know what image / setup you're using, because I can't seem to get an export to run on my end.

I followed your instructions, window is rotated 90° as it should (thanks for the tip, it'll save me a lot of trouble once i get things runnning).
I exported as x11, with only 64bit box checked, using the lastest frt binaries (matching my 3.2.3 godot). Giving me a .x86_64 and a .pck
I put all that in a folder and try to run it by ssh with putty, and it just doesn't run. It seems to be a permission problem, but I'm still pretty new to linux.
I'm using Retro Roller.

Code: Select all

odroid@goadvance:godot$ ls
sokoban.pck  sokoban.x86_64
odroid@goadvance:godot$ ./sokoban.x86_64
ERROR: make_dir_recursive: Method failed. Returning: err
   At: core/os/dir_access.cpp:185.
Godot Engine v3.2.3.stable.custom_build - https://godotengine.org/
Segmentation fault (core dumped)
edit: I tried in emuelec, through ssh it returns a file not found somehow. Trying to execute it through emuelec's file browser (directly on the oga) doesn't work either.

Code: Select all

EmuELEC:~/godot # ls
sokoban.pck     sokoban.x86_64
EmuELEC:~/godot # ./sokoban.x86_64
-sh: ./sokoban.x86_64: No such file or directory
EmuELEC:~/godot #

kruffin
Posts: 14
Joined: Wed Jul 29, 2020 5:03 am
languages_spoken: english
ODROIDs: Go Advance
Has thanked: 1 time
Been thanked: 14 times
Contact:

Re: Godot build for Go Advance?

Post by kruffin »

Hey, just saw this question.

I'm using the Ubuntu 20.04 image v1.2 from here: https://wiki.odroid.com/odroid_go_advance/make_sd_card

I'll preface this by saying I haven't used Retro Roller nor EmuELEC builds.

To your issues on Retro Roller, I'm not an expert by any means here, but i can only assume that how these builds work is they attempt to unpack the assets into a temporary folder (I say this because I have seen other exe bundles from python do this) probably /tmp and doesn't have permissions to create them. Grain of salt and all, since I'm probably wrong here.

On EmuELEC, it may just be that the binary isn't marked as executable.

Code: Select all

ls -l
See if there is an 'x' for your user.
These users thanked the author kruffin for the post:
Pumpkinwaffle (Mon Jan 18, 2021 3:05 am)

User avatar
Pumpkinwaffle
Posts: 31
Joined: Sat Jul 25, 2020 3:10 am
languages_spoken: english, french
ODROIDs: OGS
Has thanked: 6 times
Been thanked: 6 times
Contact:

Re: Godot build for Go Advance?

Post by Pumpkinwaffle »

It works!! Thank you.

Feels so nice to run my own games on the device :D :D
Now I just have to get better at coding :shock:

Had to add godot as a system in emulationstation for it to run properly, otherwise the game and the ES menu compete to be displayed in a flickery mess. With your viewport settings everything works fine. I'll be sharing my game with everyone once its completed.

for anyone trying to replicate this, as you don't use an emulator to run a godot build made with FRT, you just put the path to file as a command:

es_systems.cfg

Code: Select all

	<system>
		<name>Godot</name>
		<fullname>Godot Engine</fullname>
		<path>/roms/godot/</path>
		<extension>.x86_64</extension>
		<command>%ROM%</command>
		<platform>godot</platform>
		<theme>godot</theme>
	</system>
As for emuelec, the permissions made no difference. I suppose adding godot as system would do the trick.

datatrash
Posts: 13
Joined: Thu May 23, 2019 7:49 am
languages_spoken: german, english
ODROIDs: In order of appearance:

2 x Odroid Go, Odroid-N2, Odroid-HC2, 2 x Odroid Go Advance Black Edition
Location: Münster, Germany
Has thanked: 17 times
Been thanked: 5 times
Contact:

Re: Godot build for Go Advance?

Post by datatrash »

@Pumpkinwaffle, I can't help but wonder if you by any chance might have developed a game called The Garden Path?
If so, I just recently saw a video about it and it looks absolutely amazing! Would be great to have games like that on the OGA.
Thought orange pastry might be a hint.. :D

User avatar
Pumpkinwaffle
Posts: 31
Joined: Sat Jul 25, 2020 3:10 am
languages_spoken: english, french
ODROIDs: OGS
Has thanked: 6 times
Been thanked: 6 times
Contact:

Re: Godot build for Go Advance?

Post by Pumpkinwaffle »

Nope but I sure I wish I had worked on it, it looks amazing!

Currently I'm working on Our Land as my day job. It's turn based strategy game where you try to heal the land and survive as nomad tribe. I did the game design, some of the 3D (when our graphic designer left), and the grunt work of creating/linking prefabs and whatnot. About a year's work as a team of 4, using Unity for the engine. We're looking for a publisher to finance the development of the full game.

There's playable prototype here: https://melolon.itch.io/our-land

I'm messing around with Godot to learn to code. While I understand the basics I'm trying to be better at it to be more relevant / independent in testing ideas as a game designer.
I also do a bit of pixel art on side. Always good for small solo projects, or Jams.

I'm actually in a 3 day jam right now. Should have a game up by the weekend, check back here if you'd like to see my sprite work :)

It is very much my intention to add original games to the OGA. I've made a little list of open source godot games, I'll try and port some when I have some free time.
I'm also making a tile / turn based puzzle game. I have about 50% of the sprite work done, but it'll take me a fair bit of time to code from scratch. I'm learning as I go. But it is specially made for the OGA.

I'll try and snag a odroid super if I can afford it. A bigger screen would be nice for my games.

kruffin
Posts: 14
Joined: Wed Jul 29, 2020 5:03 am
languages_spoken: english
ODROIDs: Go Advance
Has thanked: 1 time
Been thanked: 14 times
Contact:

Re: Godot build for Go Advance?

Post by kruffin »

Congratulations @pumpkinwaffle glad you got it working. I'd be interested to see what you come up with. Here is a non-godot game I'm working on for the odroid. It's on the back burner for now since I have to work out making it more fun since adding gates really hurt it. It's a maze game :) https://github.com/kruffin/go2mazing The pictures are from an old build and have since added sprites and basic animation and an intro (forewarning, I'm not an artist).
These users thanked the author kruffin for the post:
odroid (Tue Jan 26, 2021 9:47 am)

kruffin
Posts: 14
Joined: Wed Jul 29, 2020 5:03 am
languages_spoken: english
ODROIDs: Go Advance
Has thanked: 1 time
Been thanked: 14 times
Contact:

Re: Godot build for Go Advance?

Post by kruffin »

I can confirm that this process still works for the Go Super, however, I am getting audio artifacts (hissing) that don't go away when the game closes. I have to run something else to make it stop. Not really sure what the problem is since this didn't happen on the Advance.

Bakenshake
Posts: 1
Joined: Tue Mar 09, 2021 12:51 am
languages_spoken: english
ODROIDs: ODROID-GO-ADVANCE
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Godot build for Go Advance?

Post by Bakenshake »

Pumpkinwaffle wrote:
Sat Jul 25, 2020 4:03 am
Turning the Go Advance into a wireless devkit for Godot would be simply wonderful, and open the way for so many games being ported.

Now of course pressing play on the computer and the scene running on the handheld is wishful thinking in the current state of things. However while it doesn't directly support arm, I've seen Godot compiled on the raspberry pi.

If someone could take the time to see if Godot compiles on the go advance I would truly appreciate it. I wouldn't expect anything on the 3d side but the 2d platformer example project should perform quite well.
The simplest solution i suppose is to build on the go advance itself, but I'm no expert in the topic. And I don't have one yet :)
Thanks for suggesting this! I came to this forum looking for some lesson plans for high school youth and think this will be perfect (I also organize the Godot Wild Jam so super biased in using Godot)! Think this'll be perfect. Have kids build the handheld, create a small 2D game in Godot, and then share/play others games. I'll be sure to come back here with a write-up of my process to share with others!
These users thanked the author Bakenshake for the post:
odroid (Tue Mar 09, 2021 10:06 am)

User avatar
Pumpkinwaffle
Posts: 31
Joined: Sat Jul 25, 2020 3:10 am
languages_spoken: english, french
ODROIDs: OGS
Has thanked: 6 times
Been thanked: 6 times
Contact:

Re: Godot build for Go Advance?

Post by Pumpkinwaffle »

I'm very glad to hear it!
Getting kids to develop on a handheld is great way to get them interested I'm sure. I know it would have had me captivated back in high school.

I've had to part with my OGA to upgrade but back then only the ubuntu 20.04 image ran Godot games for me (can very easily add them to emulationstation to avoid having to SSH all the time).

I have tried few different images on my OGS but so far no luck, maybe due to switching back to ubuntu 18 on the latest official images releases (I'm yet to try if the old 20.04 image works on the super).
As for other images like Emuelec, RetroArena etc I couldn't get a build to run either. Most likely due to my very limited skills when it comes to linux and programming.

If we have enough games made for the OGA in Godot, it might entice the people maintaining the retro gaming images to include a Godot ports section.

Right now I'm focusing on getting better with Godot to have more of a game together before trying to port it to the OGS. I didn't know about the Godot Wild Jam, guess I'll be joining, if I can free up some time.

If enough people mess with Godot here we could even have an Godot/Odroid Jam here ^^
These users thanked the author Pumpkinwaffle for the post:
odroid (Thu Mar 11, 2021 9:34 am)

User avatar
Pumpkinwaffle
Posts: 31
Joined: Sat Jul 25, 2020 3:10 am
languages_spoken: english, french
ODROIDs: OGS
Has thanked: 6 times
Been thanked: 6 times
Contact:

Re: Godot build for Go Advance?

Post by Pumpkinwaffle »

Here's a WIP guide on making games for the OGA/OGS using the Godot engine. Thanks to Kruffin for figuring a lot of this out

https://docs.google.com/document/d/1Etr ... sp=sharing

I'll improve the guide as things progress.
Once everything is into shape and we have at least some games I'll create a proper thread with:
-List of download links for free Godot games on OGA/OGS (I'll try to have some basic open source examples: button tester, pong, snake...)
-Guide to add games for those who just wish to play (I hope to figure out how to get it to run on most images available eventually)
-Proper guide for those who want to make games (WIP guide linked above)

Of course this will take some time, until then, any suggestions are welcome.
These users thanked the author Pumpkinwaffle for the post:
odroid (Fri Mar 12, 2021 11:08 am)

User avatar
Pumpkinwaffle
Posts: 31
Joined: Sat Jul 25, 2020 3:10 am
languages_spoken: english, french
ODROIDs: OGS
Has thanked: 6 times
Been thanked: 6 times
Contact:

Re: Godot build for Go Advance?

Post by Pumpkinwaffle »

kruffin wrote:
Wed Feb 03, 2021 11:05 am
I can confirm that this process still works for the Go Super, however, I am getting audio artifacts (hissing) that don't go away when the game closes. I have to run something else to make it stop. Not really sure what the problem is since this didn't happen on the Advance.
Same here, finally got around to adding sound to a Godot project, sound hisses even when exiting. While it does play the sound, the quality is very poor.
I tried disabling all sounds in Godot before exiting it doesn't fix the problem. Seems like playing sound in Godot makes OGS audio driver freak out.

Did the audio driver change when the official image switched back to ubuntu 18?

I have no clue how to solve this problem, seems like Godot picks a driver matching the device on its own. Does anyone know what audio driver the OGS uses?
There's a field to specify audio driver in godot, can always try that but I don't know what to type... (it's a string)

In the meantime here's a two player pong I'm working on, each player holding on half of the device.
Can be played with arrow/buttons or LeftStick/RightStick.
Start to begin, select to quit. Triggers to change colors because 8-)

Image

You can execute PongTogether.x86_64 as is or add a Godot entry to emulationstation like I explained in my guide. (link in thread's 1st post)
https://drive.google.com/file/d/1YYcdtd ... sp=sharing

The build is OGS only for now, I'll make an OGA version and release the source code once I fix the sound issue. I will add 3.... 2.... 1.. animation before each round starts and some music/sfx.

Any suggestions on improving it are welcome but I won't push it very var, I want to move to the next mini game soon. I'm leaning towards a rocket lander (1979) inspired game. Likely with Vectrex/80's style graphics
These users thanked the author Pumpkinwaffle for the post:
odroid (Tue Mar 16, 2021 9:57 am)

User avatar
efornaralabs
Posts: 6
Joined: Thu Mar 18, 2021 5:21 am
languages_spoken: english
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Godot build for Go Advance!

Post by efornaralabs »

Hi, I don't have an ODROID device myself, but I'm the author of FRT. Very happy that you can make use of it.

Pumpkinwaffle I had a look at your guide. Very well done.

I couple of suggestions.

Here https://github.com/efornara/frt/issues/25, it looks like you could avoid making a custom mapping by adding a magic environment variable to a script starting godot. Something like:

Code: Select all

export SDL_GAMECONTROLLERCONFIG="19000000010000000100000001010000,odroidgo2_joypad,platform:Linux,a:b1,b:b0,back:b10,dpdown:b7,dpleft:b8,dpright:b9,dpup:b6,leftshoulder:b4,lefttrigger:b12,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b13,start:b15,x:b2,y:b3,"
before starting the game. It might be tricky to explain, but if it is feasible and it can be easily explained, it might be a more convenient alternative.

Also, it is probably worth experimenting with an AutoLoad script that sets up the rotated viewport at runtime. OS.get_name() returns FRT when running on the device.

As for the audio. The current official FRT binaries only have the ALSA audio driver compiled in. Since the Raspberry OS switched to PulseAudio, starting from the next preview (I guess 3.3.0rc6, in a few days), they should have both. It would be interesting to know if 1) the distro you are using comes with the PulseAudio library or if the new binaries refuse to even start. 2) Using PulseAudio instead of ALSA fixes the problem.
These users thanked the author efornaralabs for the post:
kruffin (Mon Mar 22, 2021 9:57 pm)

User avatar
Pumpkinwaffle
Posts: 31
Joined: Sat Jul 25, 2020 3:10 am
languages_spoken: english, french
ODROIDs: OGS
Has thanked: 6 times
Been thanked: 6 times
Contact:

Re: Godot build for Go Advance!

Post by Pumpkinwaffle »

Thank you for taking the time to come here efornaralabs,

I'm glad you liked the guide! the intent is to make it accessible for users with little skills (like myself) to make games for this device. There's still quite a bit to do for the guide to be more user friendly but it's getting there.

Now, I have very limited knowledge when it comes to linux and programming in general so bear with me.

A launcher for the games seems like the best way to solve that mapping problem and to provide a unified control scheme for everyone. I don't know how to do it but I suppose looking into how emulationstation does it for emulators is a good place to start.

The autoload script is a very good idea! I didn't know that was a thing. It would make it much simpler to provide users with a script that takes care of rotating the screen only when running on the handheld, OS.get_name() will be very handy indeed. I'll make sure to implement that as soon as I can.

Regarding Audio, it would seem that only ALSA is there, as "$ pactl list" doesn't exist. If this is how one actually checks.

Code: Select all

odroid@goadvance:~$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=rockchiprk817co
    rockchip,rk817-codec,
    Default Audio Device
sysdefault:CARD=rockchiprk817co
    rockchip,rk817-codec,
    Default Audio Device
dmix:CARD=rockchiprk817co,DEV=0
    rockchip,rk817-codec,
    Direct sample mixing device
dsnoop:CARD=rockchiprk817co,DEV=0
    rockchip,rk817-codec,
    Direct sample snooping device
hw:CARD=rockchiprk817co,DEV=0
    rockchip,rk817-codec,
    Direct hardware device without any conversions
plughw:CARD=rockchiprk817co,DEV=0
    rockchip,rk817-codec,
    Hardware device with all software conversions

odroid@goadvance:~$ pactl list
-bash: pactl: command not found
"sudo apt-get install pulseaudio" ran but after that the distro would no longer boot into emulationstation. There's far too much knowledge I'm missing to be able to properly try to switch audio drivers I'm afraid.

Hopefully someone more knowledgeable will provide you with useful information regarding audio drivers.

User avatar
efornaralabs
Posts: 6
Joined: Thu Mar 18, 2021 5:21 am
languages_spoken: english
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Godot build for Go Advance!

Post by efornaralabs »

I don't know emulationstation myself, but the idea is to run a godot.sh script that starts the game pack, something like this (untested, it's just the idea, the script could be broken):

Code: Select all

#! /bin/sh

export SDL_GAMECONTROLLERCONFIG="19000000010000000100000001010000,odroidgo2_joypad,platform:Linux,a:b1,b:b0,back:b10,dpdown:b7,dpleft:b8,dpright:b9,dpup:b6,leftshoulder:b4,lefttrigger:b12,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b13,start:b15,x:b2,y:b3,"
<path_to_godot>/frt_100_330_arm64.bin --main-pack "$1"
One thing to note: the generated game.x86_64 is an exact copy of frt_100_330_arm64.bin, unless you encrypt your game I think. It is usually a big file, and there is no need to re-upload it every time. All of your game is in game.pck. You probably can get away with just exporting the .pck from Godot. In a sense, frt_100_330_arm64.bin is the "emulator" and game.pck is the "rom". The ideal setup would be to reuse a single frt_100_330_arm64.bin for all your games, starting it with a script that takes the game.pck to run as an argument, like the sample script above.

About PulseAudio, sorry for the reboot problem. I hope you've managed to fix it.

When I release the next FRT (I guess in 2-3 weeks, when Godot 3.3 is released) I'll generate a "_nopulse" set of binaries too. They will just come a little later than the ones that link PulseAudio.
These users thanked the author efornaralabs for the post:
Pumpkinwaffle (Fri Mar 19, 2021 6:30 am)

User avatar
Pumpkinwaffle
Posts: 31
Joined: Sat Jul 25, 2020 3:10 am
languages_spoken: english, french
ODROIDs: OGS
Has thanked: 6 times
Been thanked: 6 times
Contact:

Re: Godot build for Go Advance!

Post by Pumpkinwaffle »

Not to worry I'm using a separate micro SD for testing thing, it gets flashed on a daily basis :mrgreen:

I guess I haven't been using FRT properly at all, I read the github but some of it remains a little confusing for me. I'll look into scripts to launch games, adding an FRT reference to it, mapping controls and writing that autoload script handling screen rotation.

This will greatly reduce of hassle of project setup and adding games to the OGS. As for that sound issue, I guess we'll see what 3.3 brings to the table. Do let me know if you need stuff tested on the hardware, or if I can help with anything.

I'll continue to learn Godot and make more games till then.

User avatar
efornaralabs
Posts: 6
Joined: Thu Mar 18, 2021 5:21 am
languages_spoken: english
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Godot build for Go Advance!

Post by efornaralabs »

While not at the level of Unity and Unreal (not that I know them), Godot is still fairly complex. I surely don't know it that much (especially from a user's point of view), but because of FRT I get to see some aspects that most user don't see. The thing about the "generated" .exe being the same, while I'm sure is mentioned somewhere in the Godot documentation, is ignored by most users, even advanced ones.

I don't really need any testing right now, thanks. Even about the PulseAudio issue. After seeing what kind of dependencies it brings, I have changed my mind and I will make the nopulse version the default one. So, it will be the PulseAudio version to have a suffix and to be released a little later.

You might want to check the 3.3-rc6 that I've just released, not so much for FRT (little has changed), but for the upstream Godot code itself. One thing that is changing for low-end devices is that Godot 3.3 will try harder to allocate a shadow buffer if it can. This might cause issues. I will write something in the FRT release notes. The gist of it is that you have to make sure that in the Project Settings (and in the Viewports too I think), Framebuffer Allocation (Rendering / Quality / Intended Usage) is set to 2D.

https://sourceforge.net/projects/frt/files/previews/

User avatar
Pumpkinwaffle
Posts: 31
Joined: Sat Jul 25, 2020 3:10 am
languages_spoken: english, french
ODROIDs: OGS
Has thanked: 6 times
Been thanked: 6 times
Contact:

Re: Godot build for Go Advance!

Post by Pumpkinwaffle »

Can't seem to get it to work on the 3.3 rc6, tried both 64 and 32 bits versions of Godot. Exported using both the regular and nopulse version of FRT.

frt_ffb25b0_330c6_arm64.nopulse.bin

Code: Select all

odroid@goadvance:/roms/godot$ ./Pong33.x86_64
Godot Engine v3.3.rc.custom_build.15ff75273 - https://godotengine.org
frt: failed to get resources.

odroid@goadvance:/roms/godot$ ./frt_ffb25b0_330c6_arm64.nopulse.bin --main-pack Pong33.pck
Godot Engine v3.3.rc.custom_build.15ff75273 - https://godotengine.org
frt: failed to get resources.
frt_ffb25b0_330c6_arm64.bin

Code: Select all

odroid@goadvance:/roms/godot$ ./Pong33.x86_64
Godot Engine v3.3.rc.custom_build.15ff75273 - https://godotengine.org
frt: failed to get resources.

odroid@goadvance:/roms/godot$ ./frt_ffb25b0_330c6_arm64.bin --main-pack Pong33.pck
Godot Engine v3.3.rc.custom_build.15ff75273 - https://godotengine.org
frt: failed to get resources.

User avatar
efornaralabs
Posts: 6
Joined: Thu Mar 18, 2021 5:21 am
languages_spoken: english
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Godot build for Go Advance!

Post by efornaralabs »

Thanks. It looks like a pair of braces were lost during a refactory. On a positive note, the pulse version seems to run too. I'll upload a fixed version later.

EDIT: Uploaded (arm64, nopulse only). If everything goes well with this one, I'll build and upload the full set later.

User avatar
efornaralabs
Posts: 6
Joined: Thu Mar 18, 2021 5:21 am
languages_spoken: english
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Godot build for Go Advance!

Post by efornaralabs »

In the end, I went ahead to generate the whole set overnight, because there was another change anyway.

It turns out that, starting from 3.3, upstream is actually able to load PulseAudio dynamically after all. In other words, the split pulse/nopulse should only be necessary for older versions of Godot.

Both ALSA and PulseAudio are compiled in (but loaded dynamically), and you should be able to select which audio driver to use from the command line.

User avatar
Pumpkinwaffle
Posts: 31
Joined: Sat Jul 25, 2020 3:10 am
languages_spoken: english, french
ODROIDs: OGS
Has thanked: 6 times
Been thanked: 6 times
Contact:

Re: Godot build for Go Advance!

Post by Pumpkinwaffle »

Ran some tests this morning, added a light and some occluders. Doesn't seem to be a difference in performance between 3.23 et 3.3 (at least on simple pong).
All the fps issues I had were due to shaders, they should not be used on an OGS. Guess I'll have to turn that tron grid background into an animated sprite, with the grid effect alone I'm dropping to 30 fps :cry:
Smooth 60fps without shaders however, even with some light. Thankfully. As much as I like my retro games, lighting and more modern effects really add to them.

Tried both the nopulse and the other version of FRT, both work fine, but that audio issue is still there. Sound plays but is kinda muffled/crackly and the speaker continues hissing when I quit the game. :/

User avatar
efornaralabs
Posts: 6
Joined: Thu Mar 18, 2021 5:21 am
languages_spoken: english
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Godot build for Go Advance!

Post by efornaralabs »

I can't say much about the audio. I assume you tried both ALSA and PulseAudio. It's pretty much out of my hands: FRT just instances and registers the relevant drivers, but the driver's code is all upstream. There is a closed issue here: https://github.com/efornara/frt/issues/14. It relates to the Pi4, but suggests that changing frequency and increasing latency is worth a try. Hissing when you quit points to a deeper problem, though. Sorry, no idea what it could be.

User avatar
Pumpkinwaffle
Posts: 31
Joined: Sat Jul 25, 2020 3:10 am
languages_spoken: english, french
ODROIDs: OGS
Has thanked: 6 times
Been thanked: 6 times
Contact:

Re: Godot build for Go Advance!

Post by Pumpkinwaffle »

Yeah I figured as much. Thanks for all the help you've provided already.

I'll try messing with some settings in Godot to see if there's a "sweet spot" but the fact that the it hisses even after I stop the audio makes me believe the problem is deeper (AudioServer.set_bus_mute(master_sound, true)).
There's also some images I haven't tried yet due to them being too big for a 16gb card, I'll give those a shot in case their audio drivers work different.

nilski
Posts: 1
Joined: Mon Jun 21, 2021 4:30 pm
languages_spoken: english
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Godot build for Go Advance!

Post by nilski »

Dropping in to say that I got Godot 3.3.2 + FRT running well on the RG351V, sound and everything. Changing some settings in Audio: Mixrate to 48000 and Latency to 20 ms, made the sound/music work well.
Wrote about it here: https://github.com/efornara/frt/issues/31
Video result: https://www.youtube.com/watch?v=NliQMAVCZWk
These users thanked the author nilski for the post (total 2):
Pumpkinwaffle (Tue Jul 20, 2021 9:51 pm) • odroid (Wed Jul 21, 2021 9:51 am)

User avatar
Pumpkinwaffle
Posts: 31
Joined: Sat Jul 25, 2020 3:10 am
languages_spoken: english, french
ODROIDs: OGS
Has thanked: 6 times
Been thanked: 6 times
Contact:

Re: Godot build for Go Advance!

Post by Pumpkinwaffle »

nilski wrote:
Mon Jun 21, 2021 4:35 pm
Dropping in to say that I got Godot 3.3.2 + FRT running well on the RG351V, sound and everything. Changing some settings in Audio: Mixrate to 48000 and Latency to 20 ms, made the sound/music work well.
Wrote about it here: https://github.com/efornara/frt/issues/31
Video result: https://www.youtube.com/watch?v=NliQMAVCZWk
Thank you for the update, completely forgot to test myself ^^

Can confirm sound works fine with your settings using Godot/FRT v3.3.2 tested in EmuElec.
I'll fix the bindings to match the button names in Godot editor and make a project template. And then update the guide.

I'd also like to avoid doing weird screen rotations in Godot, kinda breaks testing the game on desktop. I'll have to look into improving that.
These users thanked the author Pumpkinwaffle for the post:
odroid (Wed Jul 21, 2021 9:51 am)

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 1 guest