How do I add my own API in my game?

Get help using Construct 2

Post » Fri Apr 22, 2016 1:22 pm

Hi, everyone!

I started using Construct 2 a few weeks ago, and I have to say it's a great tool and it seems really easy to create games with it.
I'm a newbie, so I have a question for you today. I know it's a big one, but I haven't found any documentation or articles about that.

I would like to add my API (leaderboard system, ...) in my games, but I don't really know how to do it.

Can you help me?
B
3
Posts: 2
Reputation: 179

Post » Fri Apr 22, 2016 2:44 pm

Relyss wrote:Hi, everyone!

I started using Construct 2 a few weeks ago, and I have to say it's a great tool and it seems really easy to create games with it.
I'm a newbie, so I have a question for you today. I know it's a big one, but I haven't found any documentation or articles about that.

I would like to add my API (leaderboard system, ...) in my games, but I don't really know how to do it.

Can you help me?


The normal method for integrating an API is via the SDK, but you will need to be proficient in Javascript.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,420
Reputation: 59,526

Post » Mon Apr 25, 2016 1:46 pm

Hi, zenox98. Thanks for your answer.

I have tried this and I have another question: Is it possible to call an external function (like a .js file, for example) with Construct 2?
B
3
Posts: 2
Reputation: 179

Post » Mon Apr 25, 2016 7:52 pm

Javascript is not my forte, unfortunately.

If you post any questions in the Javascript SDK section, then one of the gurus who frequent that section will be able to offer much better assistance.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,420
Reputation: 59,526

Post » Fri Apr 29, 2016 4:17 pm

Do you have the API created already on your server? An API requires server side programming, and then you just access the API via AJAX (or WebSockets or whatever).
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,418
Reputation: 4,830


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 33 guests