gameNetwork.*

Type Library
Revision Current Public Release (2014.2189)
Keywords gameNetwork, game center, game services
Sample code
See also
Availability Starter, Basic, Pro, Enterprise

Overview

Corona's game network API allows access to social gaming features such as public leaderboards and achievements.

NOTE: Using the gameNetwork API will enable Corona Launchpad regardless of the setting in config.lua.

Platforms

The following platforms are supported:

Google Play game services

This is currently a feature that is only supported on Android. It is not supported by the Corona Simulator.

Functions

build.settings

The following build.settings section is required to for Google Play game services

settings =
{
    android =
    {
        googlePlayGamesAppId = "123456789012", -- Your Google Play Games App Id
    },
    plugins =
    {
        -- key is the name passed to Lua's 'require()'
        ["CoronaProvider.gameNetwork.google"] =
        {
            -- required
            publisherId = "com.coronalabs",
            supportedPlatforms = { android = true }
        },
    },
}

Sample Code

You can access sample code for leaderboards and achievements here. You can access sample code for real time multiplayer here.