godot-game-services
sjc, 09 February 2023
When we wrote about the latest update to our venerable word game Lexical we made passing reference to some Godot mobile plug-in development we were doing. After monitoring the released apps for a little while in case of issues, we’re happy that that code is working and ready to be shared with the world. We’ve tidied it up, added documentation, and made it available on GitHub as godot-game-services
.
godot-game-services
is an interface to Google Play Game Services on Android and Game Center on iOS. There are already a few plugins available for each of these services, so why spend time writing another one? Well, there are a couple of reasons, beyond the fun and experience it brought. The first is relatively trivial. Lexical has always had it’s own code for displaying leaderboards, downloading the individual scores from Game Center and building the high score table UI from there. But downloading the individual scores isn’t supported by any existing library, despite issues being raised by other potential users requesting the feature.
So why didn’t we step in and contribute these feature to existing projects, rather than starting our own? That would have been the good open source citizen thing to do, certainly. But inspired by the Poing Studios AdMob plugin which we were already using in Lexical, we wanted to create something with similar ease-of-use. Our design goals were thus:
- A single API for Android and iOS (and any other platforms we choose to support in the future)
- Async function returns via signals (the offical Godot Game Center plugin lost us at “setup a timer to poll for events”…)
We’ll be adding new features to the plugin as we need them for future projects, or as the demand from users arises. Hopefully others in the Godot community will find this plugin as helpful as we have.