Google Play Games Services

A project to port LÖVE to Android handhelds
Posts: 7
Joined: Fri Jan 08, 2016 3:51 am

Google Play Games Services

Post by GiveMeAnthony » Mon Jan 11, 2016 8:33 pm

I'm wondering about how one might integrate Google Play Games Services into a Love2D project running with love-android-sdl2. I know Love2D comes with LuaJIT and FFI, so you can call native C functions like so

Code: Select all

local ffi = require("ffi")

int printf(const char *fmt, ...);
ffi.C.printf("%s running on %s %s\n", jit.version, jit.os, jit.arch)

function love.load()
	love.window.setMode( 120, 100 ), 80, 80)

function love.draw()"Check terminal...", 0, - 12,, "center")
Not that this example is particularly useful, but you can see that we can execute C functions nicely. This all nice and dandy, but it doesn't seem to help for accessing Play Games APIs. They offer an API for Android, C++, and for Web via REST. So I'm thinking "How should I implement this?". Do I need a special Java/Android interface for Lua/Love2D? Perhaps a C++ interface would be better? Should I use LuaJIT FFI to call a C function which then uses JNI? Should I somehow use their REST API (I'm unsure of the limitations)?

Party member
Posts: 728
Joined: Sat Apr 26, 2014 7:46 pm

Re: Google Play Games Services

Post by bobbyjones » Tue Jan 12, 2016 7:30 am

Their rest api most likely require HTTPS which love doesn't include sadly. But there are other threads that show how to integrate Google play services. I'm sure you can adapt them for your needs. I would also like to say that if you do code your own solution please share it with us \o/ lol.
Do you frequently have great ideas but immediately lose them? Check out the MVP for my website called IdeaVault. It is designed to solve that problem. Desktop browsers only currently.


Who is online

Users browsing this forum: No registered users and 6 guests