Hello guest! Login or Register

Easily Add Leaderboards to Your Game

10 votes

The Game


The 'Beginner's guide to Construct 2' shows you how to make a little game in Construct 2. This tutorial adds a leaderboard to the game over screen, using the Playtomic plugin I wrote.

If you're new to Construct 2, trying working through the beginner's guide first or you will have a lot of trouble keeping up with this tutorial!

Check out our website to see a demo of the final result in action!

You can also download the Construct 2 project here (requires Playtomic plugin - see below for installation instructions).

So let's get started!

Open 'Ghost Shooter (tutorial version)' in <your installation directory>\Construct 2\examples

Play it a couple times to get familiar with it, then head on over to the next page and we'll start adding the leaderboard.

This tutorial is on multiple pages

Total of 2 edits. Last edit by wgfunstorm on 13 February 2012 9:00 PM

2
Weishaupt (6.8K) Wednesday, February 08, 2012 at 4:08:57 PM
Thank you. Great Tutorial....with a very good chosen topic!
2
danny (1,480) Thursday, February 09, 2012 at 2:58:43 AM
Very handy tutorial and plugin. Thanks wgfunstorm.
2
gametrick (260) Thursday, February 09, 2012 at 8:52:09 AM
Hi,

When I use playtomic to send variables, I get this error message:

---------------------------
Construct 2 Check failure
---------------------------
Check failure! This is probably a bug:

Server received a HTTP request which was not a GET - this is not supported

Condition: pRequest->Verb == HttpVerbGET
File: HttpFileServer.cpp
Line: 195
Function: void __thiscall HttpFileServer::ServerThread(void)
Build: release 76 (32-bit) checked
Component: HTML5 exporter
(Last Win32 error: 0)

You are using a 'checked' release of Construct 2, intended for testing, which causes certain errors to be reported this way. Hit Ctrl C to copy this messagebox - it's useful information for the developers, so please include it with any bug reports! Click 'Abort' to quit (unsaved data will be lost!),'Retry' to turn off messages for this session and continue, or 'Ignore' to continue normally.
---------------------------
Abort Retry Ignore
---------------------------

Also the pageviews do not refresh, can you help me what is wrong?
2
smitchell (6K) Thursday, February 09, 2012 at 11:04:07 AM
Yeah I get this error aswell! It's a shame really [:(]
1
wgfunstorm (2,365) Thursday, February 09, 2012 at 2:31:45 PM
Yikes! That's definitely not supposed to happen :P

Does the demo work fine for you? Can either of you upload a CAPX project that causes the error somewhere?

Then I'll take a look and fix it. Cheers.
1
Bigheti (7.8K) Thursday, February 09, 2012 at 8:05:12 PM
Also occurred to me the same error.... :-(
2
gametrick (260) Friday, February 10, 2012 at 5:33:05 AM
I have sent the file with pm, could you please check it?
1
wgfunstorm (2,365) Friday, February 10, 2012 at 3:54:17 PM
Thanks gametrick. I received your project and am doing everything I can to fix it.

It's difficult to fix because I cannot get the error to show up, even with your project, so I'm trying to find out more about what conditions can cause it to appear.

If anybody sees the error, it would be really helpful if you could tell me:

- Your operating system (eg Windows 7, Mac OS X, etc)
- Your browser & version (eg Firefox 10, Chrome 17, etc)
- Your Construct 2 version (eg r75, r78, etc)

Cheers.
1
terminator (288) Friday, February 10, 2012 at 5:20:36 PM
I had the error earlier and my info is:
Windows Vista Basic
Firefox 10
Construct 2 R78
If you can help it would be very helpful

Thanks in advance
1
gametrick (260) Friday, February 10, 2012 at 7:21:16 PM
Hi,

I have the same error with my file (send to you) and also your demo capx file. I have both tried it on localhost and on a server without changing anything. I have faced with the same error message. I have also seen that your statistics on playtomic with my file.

I have tried on 32 bit Windows 7, 64 bit windows 7, Firefox, Chrome and IE9. All platforms gives the same error.

Error starts on calling Playtomic plugin, not in loading screen, when I enter the Leaderboards screen, there seems this error message on Windows and then Construct 2 closes automatically without permission.

I can try to help you if you need more questions.

Thanks
1
wgfunstorm (2,365) Saturday, February 11, 2012 at 2:40:25 PM
Thanks guys, I have all the info I need now and understand why this is happening. Working on figuring out what can be done.
1
gametrick (260) Monday, February 13, 2012 at 6:37:28 AM
This is really very useful plugin and I hope it works fine. Will you release an update for this plugin? If you need any help testing, it would be great please for me to help you :)
2
ssusnic (957) Monday, February 13, 2012 at 7:22:37 PM
I solved this bug (I'm sorry if there is a solution already)! You have a syntax error in runtime.js inside instanceProto.onCreate function():

Instead of this line
$.getScript('playtomic.v1.9.js', function (data, textStatus)

there must be the next line
$.getScript('playtomic.v1.9.min.js', function (data, textStatus)

But anyway, I still can't send any score to my leaderboard using Playtomic Save Leaderboard Data action? I'm getting response error code 1 (in Playtomic Help it is "General error, this typically means the player is unable to connect to the Playtomic servers"). I tested it locally and on my website but it's not working!
1
wgfunstorm (2,365) Monday, February 13, 2012 at 8:48:56 PM
Thanks ssusnic, that's a bug indeed. Can't believe I missed it, seems so obvious now. However I'm not sure it will resolve everybody's issues. I uploaded an updated version:

http://www.funstormgames.com/dev_tools/Construct2PlaytomicPlugin/v0.4/C2PlaytomicPlugin-v0.4.zip

Can everybody who was having issues please install the updated version and tell me what happens?

I'll try and figure out what could be causing error 1 in the meantime, but it could be anything, maybe the Playtomic servers were just down for a minute. Is it still happening?
0
Bigheti (7.8K) Tuesday, February 14, 2012 at 7:38:20 AM
The error reported previously disappeared, however:
1) In the web-site is NOT displayed http://www.playtomic.com the value of the score.
2) As ssusnic, I still can not see any score to my leaderboard in the game.
How can I help you? Do you need the capx file?


You need to Login to post a comment!
Login to your account, or register a new account