Implementing API advice

johnjanowskibsc

  • Posts: 158
Hi,

I was wondering whether anyone has had any dealings with AddictingGames and more specifically their API? They've made an offer for my game and want to add branding (which is straight forward) but then they want me to implement their API (not so easy!).

I've done a bit of hunting around the internet but can't find a tutorial or much help on how to implement this API? The API they use is called SWAG API.

If anyone has any help or advice on how to get started I would be ever so grateful,

mdotedot

  • Posts: 1654
It would help if you post a link to their API.
I've done a quick search and couldn't find it on their development center.
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

johnjanowskibsc

  • Posts: 158
Hi,

They PM'd me a SWAG API developer guide which was fairly confusing. I think I've cracked it though. I've edited the source code by downloading an app called BRACKETS on my Mac. I then copy and pasted the code into the index.html file which then has implemented an swag-api.js file. When I compared it to their test version here: https://swagapi.shockwave.com/demo.html they seemed to match up.

Luckily my brain still remembers some html and Java from my university days!

I'm delivering the update to them later today, if there any further probs I should post up an update.

Thanks for trying to look into this, if you need any further info let me know. John

mdotedot

  • Posts: 1654
Okay. Your way is indeed simpler than making an extension or embed it with code blocks.
But remember when you publish/generate new stencyl output in the form of HTML5 you need to include that copy/paste stuff again!
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

johnjanowskibsc

  • Posts: 158
So the thing that I thought that would be hard was easy and the easy thing that I saved for tonight has me scratching my head.
To add AddictingGame branding they have sent me a link to some HTML5 stingers to upload. https://www.addictinggames.com/game/upload.jsp

There are 2 .xml files linked to 2 png files. This would be the intro to my game.

Is it possible in Stencyl to be able to upload them as an intro? Otherwise I will have to take the images they have sent me apart and turn them into a GIF.

As always, thanks in advance! John

SadiQ

  • Posts: 1795
You will need to make your own custom preloader in order to display their images while the game is loading. For that you will probably need a studio licence and a bit of help from Justin. Other than that it should be pretty simple.
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.








OSZAR »
OSZAR »