Riot Games API

Hello I am new to Corona Coding, and I was wondering how i can incorporate Riot Games API - http://developer.riotgames.com/ - Into coronaSDK and Lua? Again sorry, but I am brand new to this. 

It looks like a REST based API which Corona works great with.  You would use the network.requesti() API to communicate with it.

Rob

Thank you very much! Do you mind if I ask questions here once I get them? I’m still very new to coding in general.

That’s what we are here for!

So as I have been working on this app I have come across some hurdles I don’t really know how to jump

  1. How to I get a keyboard to work in the simulator?

  2. How do I make saved accounts for people (like gamecenter) but for Android, and how do I get people to be able to message off that system?

Again thanks for any help, trying to figure these out myself too

I will answer these here, but for future posts, it’s best to ask questions in different threads.  These are not about using Riot games in Corona which means people searching for answers will have a harder time matching up their question to the right answers.

  1. There are two answers to this.  First, if you’re on Windows and you’re trying to use the native.newTextField() or native.newTextBox() API calls, then the answer is you can’t.  This is a situation created by Microsoft as they don’t allow native objects to intermix with OpenGL objects.   If you just want to capture the keyboard, then you can do that using the key event’s API.  See this post:

http://coronalabs.com/blog/2013/08/27/tutorial-introduction-to-game-controllers/

While that’s focused on game controllers, it shows how to set up an event listener for capturing key events.  Then you can look at the returns from the event table and see what happens when you press the keys on the keyboard.  This will not be good for simulating text field entry, but can be used to simulate button events and such.

2.  For Google, we have a plugin for Google  Play Game Services.  We have a tutorial for that as well:

https://coronalabs.com/blog/2013/06/25/tutorial-introducing-google-play-game-services/

though it does not cover multi-player aspects, but it should get  you started with setting up the account and getting the basic login process down.  You can search the forums for GPGS and multi-player.  There are several threads where people have talked about getting this going.  The tutorial will lead you to the documentation which can help.  

As far as messaging goes, I’m not sure how well GPGS or GameCenter is for messaging between players.  We have other plugins that  you might want to investigate like the PlayTogether plugin.  This might be a better choice that GC or GPGS as it lets your players play together.

Rob

It looks like a REST based API which Corona works great with.  You would use the network.requesti() API to communicate with it.

Rob

Thank you very much! Do you mind if I ask questions here once I get them? I’m still very new to coding in general.

That’s what we are here for!

So as I have been working on this app I have come across some hurdles I don’t really know how to jump

  1. How to I get a keyboard to work in the simulator?

  2. How do I make saved accounts for people (like gamecenter) but for Android, and how do I get people to be able to message off that system?

Again thanks for any help, trying to figure these out myself too

I will answer these here, but for future posts, it’s best to ask questions in different threads.  These are not about using Riot games in Corona which means people searching for answers will have a harder time matching up their question to the right answers.

  1. There are two answers to this.  First, if you’re on Windows and you’re trying to use the native.newTextField() or native.newTextBox() API calls, then the answer is you can’t.  This is a situation created by Microsoft as they don’t allow native objects to intermix with OpenGL objects.   If you just want to capture the keyboard, then you can do that using the key event’s API.  See this post:

http://coronalabs.com/blog/2013/08/27/tutorial-introduction-to-game-controllers/

While that’s focused on game controllers, it shows how to set up an event listener for capturing key events.  Then you can look at the returns from the event table and see what happens when you press the keys on the keyboard.  This will not be good for simulating text field entry, but can be used to simulate button events and such.

2.  For Google, we have a plugin for Google  Play Game Services.  We have a tutorial for that as well:

https://coronalabs.com/blog/2013/06/25/tutorial-introducing-google-play-game-services/

though it does not cover multi-player aspects, but it should get  you started with setting up the account and getting the basic login process down.  You can search the forums for GPGS and multi-player.  There are several threads where people have talked about getting this going.  The tutorial will lead you to the documentation which can help.  

As far as messaging goes, I’m not sure how well GPGS or GameCenter is for messaging between players.  We have other plugins that  you might want to investigate like the PlayTogether plugin.  This might be a better choice that GC or GPGS as it lets your players play together.

Rob