Closed buefox closed 1 week ago
cc @m4gr3d
- Adding Swappy source code to
godot/thirdparty
One of my concerns with the Android Frame Pacing library is that last time I checked, it was under a proprietary license. Did this change, or are there plans to address this? If not, the dependency needs to be made optional so that Godot games can still be uploaded to F-Droid. The source code will also need to be stored externally as the Godot repository should only contain open source code.
Also, what's the relation between Swappy and the Android Frame Pacing library?
Thanks for the feedback!
One of my concerns with the Android Frame Pacing library is that last time I checked, it was under a proprietary license. Did this change, or are there plans to address this?
As this is a part of Android GameSDK I think it should be open-sourced. I would need to check that with GameSDK team maintaining this.
If not, the dependency needs to be made optional so that Godot games can still be uploaded to F-Droid. The source code will also need to be stored externally as the Godot repository should only contain open source code.
Also, what's the relation between Swappy and the Android Frame Pacing library?
Sorry for not making this clear. Swappy is the name of the Android Frame Pacing Library.
Honestly, we should almost have a proposal to abstract away the presentation engine details in core... It's going to get very messy very quickly with 3 different backends, and each API (GLES2, GLES3, Vulkan, + future) having different apis & mechanisms for acquire/submit/present. And, also pacing information really comes from the presentation engine. Whether under the hood it's Choreographer, DisplayLink, or whatever.
@Calinou Just checked with the team on the licensing on Android Frame Pacing Library, a.k.a. Swappy, that Swappy is in the Game SDK on AOSP which is under the Apache 2.0 license. You can also find Apache 2.0 license header in each Swappy file. So I think it's good to use.
Let me know if you have any concerns :) Thanks!
Any updates on this?
Any updates on this?
https://github.com/godotengine/godot/pull/96439 implements this proposal :slightly_smiling_face:
Any updates on this?
godotengine/godot#96439 implements this proposal 🙂
Nice!
Describe the project you are working on
Godot Vulkan renderer
Describe the problem or limitation you are having in your project
Currently there is no frame pacing mechanism that is built-in for Android in Godot.
Without proper frame pacing applications will have janky display and jumpy screen refresh rate.
This project will focus on Vulkan renderer (Godot 4.x) as for GLES renderer it would require the rewrite of GLSurfaceView
Describe the feature / enhancement and how it helps to overcome the problem or limitation
With Swappy, which is a frame pacing library built by Android, applications will have smooth screen refresh rate, enhancing the gaming experiences. The developers have choices to pick the desired refresh rate or let Swappy to choose the optimal one. Swappy also supports higher refresh rate displays of 90Hz and 120Hz
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The implementation is based on what is described in Android Developer's Guide which can be summarized as follows:
godot/thirdparty
vkQueuePresentKHR()
ingodot/drivers/vulkan/vulkan_context.cpp
If this enhancement will not be used often, can it be worked around with a few lines of script?
No.
Is there a reason why this should be core and not an add-on in the asset library?
This project requires renderer changes that happens within Vulkan driver.