Implement Spilgames API

Get help using Construct 2

Post » Fri Jan 31, 2014 4:39 pm

My game just passed QA! I had no problem using the library embedded on the plugin :)
B
35
S
4
G
5
Posts: 84
Reputation: 4,860

Post » Fri Jan 31, 2014 9:10 pm

ok you passed the QA great... now can you explain all the steps? i managed to get the "advertise" but still nothing of the rest works please help.

(i know really little of html or java so can you explain where to seat each part? and what is required?)
B
5
S
1
Posts: 23
Reputation: 421

Post » Fri Jan 31, 2014 9:56 pm

I would be interested to know what kind of revenue you generate once you game starts getting some plays.
B
100
S
32
G
11
Posts: 1,552
Reputation: 21,612

Post » Sat Feb 01, 2014 5:24 am

Hello again.. i noticed that only the first inclusion works
i mean what i have to put into the html
but i have seen that certain functions need to be set in other .js files...
now the real problem is...in which one.
should be a totally new one. or have to be edited each time after i export the project?

I mean i tried to say all it says but is so bad explained i really have no idea.
B
5
S
1
Posts: 23
Reputation: 421

Post » Sat Feb 01, 2014 5:49 am

@skyhunter93: Can you please share a test capx of how you implemented the Spilgames api. It would be really helpful for us to know the proper steps, than experimenting out by ourselves. Thanx.
B
6
S
2
G
1
Posts: 77
Reputation: 708

Post » Sat Feb 01, 2014 7:34 am

[QUOTE=skyhunter93] My game just passed QA! I had no problem using the library embedded on the plugin :)[/QUOTE]

Great! Good to know, so the implementation is fine!

[QUOTE=Raganork]@skyhunter93: Can you please share a test capx of how you implemented the Spilgames api. It would be really helpful for us to know the proper steps, than experimenting out by ourselves. Thanx.[/QUOTE]

All the proper steps are actually evident from reading the posts in this thread carefully. Skyhunter even posted the plugin he used, which includes the API js file for you.

You need to define the fnPause and fnResume functions changing some variables. And use the execute javascript action and expression within C2.

It's all described in this very thread.

EDIT: You can also use the preview version of my plugin which I'm currently using to submit my game. DownloadPixelRebirth2014-02-01 20:13:46
B
22
S
6
G
10
Posts: 1,034
Reputation: 7,514

Post » Sat Feb 01, 2014 3:21 pm

skyhunter93... does your code use all or just advertising?
because that part works for me but nothing else.. and I at least tried to do exactly what you say you did...

the problem is, should all the code be in the index.html?
and a lot of times you say "capx" what does that mean i never find a file with that name.
B
5
S
1
Posts: 23
Reputation: 421

Post » Sat Feb 01, 2014 8:22 pm

[QUOTE=stelarfox]and a lot of times you say "capx" what does that mean i never find a file with that name.[/QUOTE]

Capx is the file extension of a Construct 2 project file.

[QUOTE=stelarfox]the problem is, should all the code be in the index.html?[/QUOTE]
Custom javascript should be added within a script tag in the index.html file itself or in an included js file.

[QUOTE=stelarfox]skyhunter93... does your code use all or just advertising?
because that part works for me but nothing else.. and I at least tried to do exactly what you say you did...[/QUOTE]

What do you mean exactly by nothing else? There isn't much the API does besides showing an ad. Do you mean loading the branding image information?

You could also try using my plugin I linked above, which should work without having to add any javascript at all.
B
22
S
6
G
10
Posts: 1,034
Reputation: 7,514

Post » Sun Feb 02, 2014 1:43 am

ok thanks about the capx file

so just adding the line to the index.html only "calls" the other .js file now I get it

well the api its said to have 3 things...
the advertising...(which is the stop and resume)..

to really Load the api...
and finally the Branding Logo.

that last part not sure was mentioned on here..
B
5
S
1
Posts: 23
Reputation: 421

Post » Sun Feb 02, 2014 11:40 am

[QUOTE=stelarfox]
to really Load the api...
and finally the Branding Logo.

that last part not sure was mentioned on here..[/QUOTE]

You're right, the branding logo wasn't covered in this discussion yet. Depending on the terms of your contract you might not even have to use this part of the API.

However this functionality is part of my plugin. You use the "Get logo" action and then can return the image address and link from expressions.

I didn't test this yet, but I imagine it should work. When I can confirm it all working myself I will make a thread with a little documentation for the plugin.
B
22
S
6
G
10
Posts: 1,034
Reputation: 7,514

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: Darth Crusher and 6 guests