Godot Engine port for SailfishOS

If we want to have the old style behavior then wl_surface_set_buffer_transform is needed at the moment because Sailfish OS compositor is not handling that set_orientation_update_mask, if that would be fixed then allowing only one orientation would achieve the old style behavior. I have been planning on asking SDL developers what they think of that wl_surface_set_buffer_transform and if they would accept adding some new method or hint to their API.

Also the naming in SDL is now a bit inaccurate as the hint is still named QTWAYLAND_CONTENT_ORIENTATION when itā€™s actually the orientation update mask.

1 Like

wl_surface_set_buffer_transform seems to work indeed, although the application itself still seems to be responsible for rendering its graphics in the correct orientation. Nevertheless, that makes it possible to

Now the only roadblock in the way that Iā€™ve seen for porting a SDL application is that the SDL_StartTextInput(void) and other functions related to the keyboard do not seem to be working with SailfishOS.

Was it backport of SDL code? hints are still there and should work, or at least work on android so maybe should work on hybris (the variable is called something_IOS but works on android, so should work on sfos)

in Quake 2 port, i was use an old SDL2 (builtin statically), which is work on previous SaiflishOS version, but on 4.x its broken, but it has all needed patchesā€¦

1 Like

@sashikknox i plan to use the godot, would you mind updating it? thanks

Sorry for.long time to response, i plan it (want successfully implement GLESv3), but dont have much time for thks, really lot of work! sorry

1 Like

Bloody brilliant! I finally got around to testing the whole workflow. What fun! A proper game dev. env.! Yes! Thank you so much!

Now for all the pixel work!

Just a bit curious because the tests I tried so far rendering is BETTER and works with GLESv3 used.

Now onto multi-touch event handlingā€¦

I realized that in both v2 and v3 a bunch of shader effects where not working. Interesting was that although they were not working in v3 (even after moving to CPU shaders) the animations were faster.

Otherwise, It looks like native InputEventScreenTouch: is confused, at best. I believe you can get around that with, just having tested with:

Is force to Landscape something that project settings can deal with?

Dont have mich time for this now ) just try build last 3.5 godot (it has GLES3, but without landscape support, GLES2 support landscape. And it has fixes for touches ( because of SDL2 changes with wayland, not it has non absolute coordinates from 0 to 1.0, before it has coordinates in pixels )

Heh, no stress! Iā€™m just having fun as it is: Flappy Bird | OpenRepos.net ā€” Community Repository System (again!)

It took me a day or two, but itā€™s a familiar env and I havenā€™t done games in 20 years.

I think, watching the kids, that landscape support is not so important. Itā€™s kind of perverse, but if you look at all the ā€˜hotā€™ games, they just play to portrait. Itā€™s just ā€˜easierā€™ that way.

Iā€™ll try to find some time to actually build the whole tool chain. I had to get a feel for it to know if I want to, but I want to :slight_smile:
Thanks, man! Reminds me of making games when I was 22 (a very very long time ago).

I managed to get good multi-touch responses even with your 3.2 build. Thereā€™s a lot of gotchaā€™s if you donā€™t pay attention to how godot passes or stops event handling.

Export to harbour compatible RPM in rpogress, Godot 3.5


added:

  • launcher icons 86, 108, 128, 172 sizes
  • added Sailfjail permissions control
  • added validator option ( now it can run validator, and show output )

Problems:

  • application not run from AppGrid, from terminal run successfully ( if anybody know how to run application with sailjal from terminal, please tell me )
  • have dependency from libudev , for joypad support, and it not allowed in harbour (what?)
6 Likes

ā€˜sailjail ā€“ /usr/bin/harbour-xyzā€™ will start with permissions from harbour-xyz.desktop file

1 Like

One thing that may be needed to get these running in sailjail is to make sure the godot app has the path set correctly. So in Project Settings, ā€˜Custom User Dir nameā€™ has to be the same as the generated OrgName/AppName.

I havenā€™t tested this completely yet.

Stage 2 and 3 of the flappy demo should be out this week :slight_smile: Then a need to do some 3d testsā€¦

2 Likes
Exec=/usr/bin/sailjail ā€“ /usr/bin/harbour-flappybird --main-pack /usr/share/harbour-flappybird/harbour-flappybird.pck

[X-Sailjail]
OrganizationName=de.poetaster
ApplicationName=harbour-flappybird
Permissions=UserDirs

This does not work. The setting in the godot editor was de.poetaster/harbour-flappybird and that path is indeed being used by godot.

You could try to specify the .desktop file directly with -p
-p --profile=
Define application file instead of using heuristics based
on path to launched application

Note: previously arbitrary paths could be used with this
option, but now it needs to be name of a desktop file that
exists in /usr/share/applications or /etc/sailjail/applications
directory. If a path is given, all directory components are
ignored. And ā€œ.desktopā€ extension can be omitted.

But it shouldnā€™t be needed at all in Exec, binary name will do and launcher automatically should sailjail it when running from launcher

I tried both variations, having looked at some native (sailfish-browser) examples. Neither works. Perhaps, as @sashikknox notes above, because of a dependancy ā€¦?

EDIT, I should mention that Iā€™m still using the 3.2 NOT the 3.5 version, so that may also be an issue?

A NOTE: do not use a Sailjail style path (OrgName/AppName) with the current 3.2 setup. Just use the harbour-appname for the path in the Project Settings.

in my current tests, godot app run only if enabled Audio and Internet permissions in Sailjail, with Audio all ok, but Internet little bit annoyng, and its sad, that the application just freeze in memory, if it cant connect to internet, its annoyng too )
P.S. later iā€™ll try debug godot on device with sailjail, and look - where its stop working properly