All Projects → PlayFab → LuaSdk

PlayFab / LuaSdk

Licence: Apache-2.0 license
PlayFab Lua SDK for LuaDist command-line, Defold, and more

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to LuaSdk

defold-eva
Basic defold module for mobile games
Stars: ✭ 21 (-44.74%)
Mutual labels:  defold-game-engine
corona cases
🦠 Coronavirus Information on Telegram Chatbot
Stars: ✭ 19 (-50%)
Mutual labels:  corona
CSharpSDK
SDK for C#/.net environments other than Unity
Stars: ✭ 58 (+52.63%)
Mutual labels:  playfab
defold-hyper-trails
Easy to use and customizable trail effect for the Defold game engine.
Stars: ✭ 33 (-13.16%)
Mutual labels:  defold-game-engine
DAABBCC
Dynamic AABB Tree native extension with Branch and Bound Algorithm for Defold Engine
Stars: ✭ 42 (+10.53%)
Mutual labels:  defold-game-engine
covid-19
A web application to display Coronavirus Diseases (COVID19) statistics from different countries.
Stars: ✭ 28 (-26.32%)
Mutual labels:  corona
deffx
A collection of useful shader effects made ready to be used with the Defold game engine
Stars: ✭ 33 (-13.16%)
Mutual labels:  defold-game-engine
go-coronanet
Go implementation of the Corona Network
Stars: ✭ 35 (-7.89%)
Mutual labels:  corona
cwa-qr
Python Implementation of the CoronaWarnApp (CWA) Event Registration
Stars: ✭ 17 (-55.26%)
Mutual labels:  corona
extension-fbinstant
Facebook Instant Games extension for the Defold game engine
Stars: ✭ 39 (+2.63%)
Mutual labels:  defold-game-engine
defold-playable-ads
Make playable ads with Defold! It's a project with Gulp tasks to bundle the Defold game into a single HTML file.
Stars: ✭ 15 (-60.53%)
Mutual labels:  defold-game-engine
covid-br
COVID dashboard status from Brazil.
Stars: ✭ 28 (-26.32%)
Mutual labels:  corona
rcvr-app
recover provides localities a privacy-compliant, safe, and easy way for their guests to check in. See https://www.recoverapp.de/ for more details.
Stars: ✭ 43 (+13.16%)
Mutual labels:  corona
DefVideoAds
UnityAds native extension for Defold engine.
Stars: ✭ 37 (-2.63%)
Mutual labels:  defold-game-engine
coronainfobd
Real-time corona-virus tracker of Bangladesh 🇧🇩 which includes latest updates, data visualization, public awareness from WHO and some advice to aware people. 🥰❤
Stars: ✭ 46 (+21.05%)
Mutual labels:  corona
debeat
Sound Library for the Defold Engine
Stars: ✭ 20 (-47.37%)
Mutual labels:  defold-game-engine
COVID19
A web app to display the live graphical state-wise reported corona cases in India so far. It also shows the latest news for COVID-19. Stay Home, Stay Safe!
Stars: ✭ 122 (+221.05%)
Mutual labels:  corona
Covid-19 Ampel
Covid-19_Ampel | Zeigt neben der 7-Tage-Inzidenz weitere Infos zu einer Region.
Stars: ✭ 33 (-13.16%)
Mutual labels:  corona
impfbot
Benachrichtigungs-Bot für das niedersächische Impfportal / Notification bot for the lower saxony vaccination portal https://impfportal-niedersachsen.de
Stars: ✭ 37 (-2.63%)
Mutual labels:  corona
covid19-timeseries
Covid19 timeseries data store
Stars: ✭ 38 (+0%)
Mutual labels:  corona

LuaSdk README

1. Community Support

This is a community supported SDK.

For new and existing users, you can use the current version as it is. The team at Microsoft would no longer be providing official support for those using this SDK. You can continue to get community support and updates at PlayFab forums.

We are currently looking for reliable community partners to provide long-term support for this SDK. If you are interested to take ownership and provide future maintenance, let us know.

What you have to do:

  • Fork this repo
  • Push your updates
  • Make sure you follow the Apache License, Version 2.0 guidelines for reproduction and modification, and document that Microsoft PlayFab is the original creator
  • Go to PlayFab forums
  • Write a post with a link to your forked repo so everyone knows about them

We're excited to hear from you. Thank you for your support and happy coding.

2. Overview:

The PlayFab LuaSdk includes the files needed to make PlayFab HTTPS API calls within a Lua Project.

Current supported platforms:

  • LuaDist console for Windows - Useful for evaluating/debugging
  • Defold - See our Defold Readme
  • Corona - See our Corona Readme
  • If your favorite Lua-engine/environment is not listed, let us know on the Forums.

3. Prerequisites:

To connect to the PlayFab service, your machine must be running TLS v1.2 or better.

4. Contents:

  • PlayFabClientSDK - All files neccessary to make API calls to the PlayFab Client API
  • This is the SDK you should include in your game, and distribute to your players
  • PlayFabServerSdk - All files neccessary to make API calls to the PlayFab Server and Matchmaker API
  • This is the sdk you should optionally include in your live-server (if you have one)
  • For the security of your title, do not distribute any build which contains your devSecretKey
  • PlayFabSdk - Contains all API methods
  • Generally for evaluation or debugging, and some special case live-servers
  • For the security of your title, do not distribute any build which contains your devSecretKey

5. LuaDist Example Instructions:

  • Download PlayFab LuaSdk, copy PlayFabClientSDK/PlayFab into your project folder
  • Specifically, your PlayFabClientApi.lua file should be located: {YourLuaProjectFolder}/PlayFab/PlayFabClientApi.lua
  • Add the following code in your main project (such as: {YourLuaProjectFolder}/main.lua)
local json = require("PlayFab.json")
local PlayFabClientApi = require("PlayFab.PlayFabClientApi")
-- Always set your titleId first, before making any API calls
PlayFabClientApi.settings.titleId = nil -- TODO: Set this to your string titleId you created on PlayFab Game Manager website

-- After the above setup is complete, you can make a Login API call
local loginRequest = {
    -- https://api.playfab.com/Documentation/Client/method/LoginWithCustomID
    CustomId = "TestCustomId",
    CreateAccount = true
}
PlayFabClientApi.LoginWithCustomID(loginRequest, function(result) print("Login Successful: " .. result.PlayFabId) end, function(error) print("Login Failed: " .. error.errorMessage) end)

-- After login, the full client API will fuction properly
-- PlayFabClientApi.GetTitleData( etc etc etc )

Alternately, from the console, you can run the playfab API tests by runing the following console command from windows (Lua.exe must be in your path environment variable):

lua PlayFabTesting/TestPlayFabConsole.lua

6. Defold Example Instructions:

local PlayFabClientApi = require("PlayFab.PlayFabClientApi")
local IPlayFabHttps = require("PlayFab.IPlayFabHttps")
local PlayFabHttps_Defold = require("PlayFab.PlayFabHttps_Defold")

IPlayFabHttps.SetHttp(PlayFabHttps_Defold) -- The auto import magic doens't work if you set the name, so you have to set the reference
PlayFabClientApi.settings.titleId = "6195"

function init(self)
    local loginRequest = {
        -- https://api.playfab.com/Documentation/Client/method/LoginWithCustomID
        CustomId = "TestCustomId",
        CreateAccount = true
    }
    PlayFabClientApi.LoginWithCustomID(loginRequest, function(result) print("Login Successful: " .. result.PlayFabId) end, function(error) print("Login Failed: " .. error.errorMessage) end)
end

-- After login, the full client API will fuction properly
-- PlayFabClientApi.GetTitleData( etc etc etc )
-- Try linking more api calls to buttons!
  • Link the file to a gui script and run!

7. Troubleshooting:

For a complete list of available APIs, check out the online documentation.

Contact Us

We love to hear from our developer community! Do you have ideas on how we can make our products and services better?

Our Developer Success Team can assist with answering any questions as well as process any feedback you have about PlayFab services.

Forums, Support and Knowledge Base

8. Copyright and Licensing Information:

Apache License -- Version 2.0, August 2016 http://www.apache.org/licenses/ Full details available within the LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].