Godot Engine is a feature-packed, cross-platform game engine to create 2D and
3D games from a unified interface. It provides a comprehensive set of common
tools, so that users can focus on making games without having to reinvent the
wheel. Games can be exported in one click to a number of platforms, including
the major desktop platforms (Linux, Mac OSX, Windows) as well as mobile
(Android, iOS and SailfishOS ) and web-based (HTML5) platforms.
Known bugs
not work with jolla 1 (but it not supported any more)
screen blanks when you not touch them (i know how fix it using MCE dbus messages, but dont have time for this)
no GLESv3 support (GLESv2 only)
What is done
export templates for armv7hl, aarch64 and i486
builtin support export to SailfishOS from Godot Editor
with SDL version < 2.0.18 not work changing screen orientation ( while 4.4 it comming, i’ll try rebuild godot tempaltes with included SDL2 as static component )
P.S. this just mine old release, with some fixes for latest SaiflishOS (4.3.0.12 at this moment), if SailfishOS support GLESv3, maybe i’ll try update port to latest Godot 3.x with GLESv3 or to Godot 4
if you want, you can donate ( liberapay, paypal ) to me
Just mentioning that OpenGL ES 3 support has been available in Sailfish OS since release 3.4.0. Also Vulkan API support is coming once I finish the libhybris test program for it.
really good news!!! i’ll try GLES3 soon as possible )
and when vulkan avaliable, i’ll try port Godot 4 (its use vulkan as main render, and GLES3 for supporting old devices)
strange thing with built in SDL2 … now, it wont send SDL_DISPLAYEVENT to application ( to Godot port ) , i cant now rotate device screen…
butold build of SDL2, which is linked statically yo Quake 2 works fine with this event, but now not work Application orientation hint ( its works on 3.x versions fine, not 4.x )
what happens with SialishOS SDL2 version& and where old SDL2 repo?
I have to pipe up and ask to. I haven’t had time to work on it, and so far my SDL2 prototypes still work (started with 3.4, not at 4.3.0.15) BUT I’m only using audio to this point … where can we track changes? I looked on github …
old sailfishos sdl2 repo was disappear some time ago, dont know what SDL version is used now (i think it main stream SDL2, without ay special SailfishOS patches), because mine old SDL2 with all sailfish patcher work better in quake2 port )
Source code for the SDL used in Sailfish OS is at https://github.com/sailfishos/libsdl the latest public release 4.3.0 has version 2.0.16 and next release will still have that version also. I will then update it latest version in the Sailfish OS release after that. There is one patch in the repo (in rpm folder) for Sailfish OS to bring back wl_shell support we still need.
strange situation. i was built SDL2 using script from spec, link it as static, and it send SDL_DISPLAYEVENT_ORIENTATION as should, but if i link SDL2 as dynamic lib from repo, its not send orientation events ( and orientation of screen in Godot not change! )
i share my simple SDL2 application for testing this
to build test application binary:
# for static link (SDL2 folder are in same directory as main.cpp
sfdk sfdk engine exec sb2 -t SailfishOS-4.3.0.12-armv7hl g++ -I`pwd`/SDL2/include -lpthread -lwayland-client -ldl -lpulse -lGLESv2 -o sdl2bug main.cpp `pwd`/SDL2/build/libSDL2d.a
# for dynamic link
sfdk sfdk engine exec sb2 -t SailfishOS-4.3.0.12-armv7hl g++ -I/usr/include -lpthread -lwayland-client -ldl -lpulse -lGLESv2 -llibSDL2-2.0 -o sdl2bug main.cpp
UPD: sample updatedm now screen clear color changed when we rotate phone
In most cases, like in Sailfish OS, OpenGL ES 3 support is included together with OpenGL ES 2 support because version 3 is backwards compatible with version 2 so there is no need to have two separate libraries and mesa only has one pkgconfig file for both versions 2 and 3 so development package is also the same for both.
About the display orientation events, support for SDL_DISPLAYEVENT_ORIENTATION events was added to wayland backend in SDL 2.0.18 (https://github.com/libsdl-org/SDL/commit/5cc23868ed335b581c5716e8fb8313495a678ba4) and Sailfish OS 4.3.0 still has 2.0.16 as I mentioned earlier (and unfortunately also 4.4.0 will probably have that version) so if you need support for those events you will need to build your own SDL.
that is sad …
ok. now i’ll just build SDL2 from sailfishos repo, and link is statically to godot…
and, another question, i think you should know answer =)
in Quake2 port, i was use SDL_SetHint(SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION,"landscape"); to set orientation of sailfish system (for right gestures) - and it not work any more (with own build SDL2, where it work on previous versions of Sailfish 3.x )
UPD: sorry, wrote strange thig here berfore, removed! MCE dbus names work as should =)
It was decided that SDL 2.0.18 will be in next release (4.4.0) so you’ll only need to build it yourself for 4.3.0.
About that orientation hint, unfortunately that way is now broken (I have been thinking if there is some way to fix that) but there is another way to set content orientation which I have used in one SDL based game
In Sailfish OS systemd-devel package provides libudev-devel package and in it the needed development headers and systemd-libs provides libudev. Maybe zypper doesn’t support searching for the provided names of packages or something but it should work if you add to the spec file “BuildRequires: pkgconfig(libudev)”
@sashikknox I edited the orientation hint code example in the earlier comment, it was missing one important line. Please update any code you might have made already.
It is broken because one old custom commit was removed from Sailfish OS qtwayland during an update. That commit used to add back support for the already removed set_content_orientation request (replacing the normal behavior, set_orientation_update_mask which was added at some point to qtwayland and then the old set_content_orientation was removed) of qt_extended_surface interface of qtwayland wayland surface_extension. The old request only allowed one value as parameter so the commit you linked fixes SDL to match normal qtwayland behavior, unfortunately the set_content_orientation_mask request of that interface is not working in Sailfish OS.
So if I’m not mistaken, SDL2 should now use set_orientation_update_mask on newer Sailfish OS versions to work properly? If not, what should I change in SDL to get it working again?