Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

GGTweak allows you to store data in JSON format on a remote web server to be used in your Corona SDK apps.

branch: master
README.md

GGTweak

GGTweak allows you to store data in JSON format on a remote web server to be used in your Corona SDK apps. This allows you to tweak the values whenever you want. Very useful during development. Could be used to store values for balancing in live games as well.

Basic Usage

Require the code
local GGTweak = require( "GGTweak" )
Create your tweak library, passing in a url, callback function and refresh time.
local tweak = GGTweak:new( "http://localhost/data.json", onRefresh, 1000 )
Get a value
print( tweak:get( "testValue" ) )
Print a value in the refresh function.
local onRefresh = function()
    print( tweak:get( "testValue" ) )
end
Force a refresh
tweak:refresh()
Stop the refresh timer
tweak:stopRefreshTimer()
Restart the refresh timer
tweak:startRefreshTimer()
Create a library and load data locally. Useful when you already have confirmed your values for live apps.
local tweak = GGTweak:new( nil, onRefresh )
tweak:loadLocalData( "localData.json" )
Destroy the library
tweak:destroy()
tweak = nil

Update History

0.1

Initial release

Something went wrong with that request. Please try again.