This is a simple Godot Android plugin that allows you to integrate your game with Catappult.io eskills platform.
- Enable Android Custom Build for your project
- Grab and extract the latest binary and plugin config from the releases tab into
res://android/plugins/ - In your Android export settings, make sure the GodotEskills plugin is enabled
Now you can find and manage eskills rooms using the GodotEskills singleton when your game starts:
var eskills
func _ready():
if Engine.has_singleton("GodotEskills"):
eskills = Engine.get_singleton("GodotEskills")
# These are all signals supported by the API
# You can drop some of these based on your needs
eskills.connect("payment_started", self, "_on_payment_started") # No params
eskills.connect("payment_error", self, "_on_payment_error") # Response resultCode (int), message (string)
eskills.connect("room_found", self, "_on_room_found") # No params
eskills.findRoom({
value="1",
currency="USD",
product="1v1",
timeout="200",
domain="com.your.app",
environment="SANDBOX",
number_of_users="2",
user_name=$"Username".text,
user_id=$"Username".text,
})
# After a match is started you can get the other player's and room details with this
# You should also use this method to periodicaly check if the game has already finished
eskills.getRoom()
# Update the scores
eskills.updateScore(12, "PLAYING")
# If you need to make any additional request that is not covered by this lib you can
# get the session token with this
eskills.getSessionToken()
else:
print("Android Eskills support is not enabled. Make sure you have enabled 'Custom Build' and the GodotEskills plugin in your Android export settings! Eskills will not work.")- Open this project in Android Studio
- Grab the matching
godot-lib.<version>.<target>.aarfrom the Godot Engine downloads page - Add the downloaded
godot-lib.<version>.<target>.aaras an Android Library, see here - In Android Studio, click Build > Make Project
- Once finished, you'll find the generated
aarfile in./app/build/outputs/aar