A new version that works internally like other multiplayer extensions:
http://community.stencyl.com/index.php/topic,42216.0.htmlThere is a free website that currently hosts a system where you can obtain
Application ID and ScoreBoard ID to use as your online high/low-score board.
Tested: iOS, Android, native Windows, native OSX and Flash (Browser)
I’m not guaranteeing that this website will be up or that the stored data is save!
Using this extension is at your own risk!
Why I made this extension?Parse.com has limitations on protocols.
Nuggeta says it is moving away from cloud service.
To have greater control I wanted my own server.
Future extensions should include on-line database creation, Lobby-server, Turnbased system and inventory system.
Planned is also an UDP Socket server but this will not run on this free website.
You can download the complete PHP/MySQL sources from the website to run your own server. Instructions: README.TXT inside the tar-ball.
Download the ScoreBoard Extension:
http://mdotedot.net78.net/stencyl/ScoreBoard.zipGet your own Application ID and StoreID :
Server:
http://mdotedot.net78.net/stencyl/index.php
Please check your Junk mail if you don’t receive it in your regular Inbox.
Install the ExtensionGo to Settings -> Extensions
[Install Extension]
Open the downloaded ScoreBoard.zip
Close and reopen your game
Now you should have the blocks:
Connect to the server with URL:
http://mdotedot.net78.net/stencyl/stencyl.phpYou have to give your AppID and StoreID that have been sent to your email address once you applied for them.
AppID is the key that you use to reference the ScoreBoard.
You supply a level, even if you don’t use levels in your game (use 1)
Type: Number, Time or Text. You can store these types as value-type.
Score: the value that you want to store.
The wrapper block is used because it takes time to store the data on the server and you have to know if it is stored or not.
The blocks you put inside the wrapper will be called if the storage is done.
With this block you can get the data from the server.
We already discussed AppID, Level, Type.
Rows and the order should be fairly obvious.
The ID is something special.
We need to track the request because the data is taking a long time and you don’t know how long it takes.
That is why there is a wrapper block. The data is available INSIDE the wrapper and then you need to use the ID
supplied to get a pointer to the data.
The previous block is used to get a high/low score list depending on the order. What if you want to
know the score of a player? Then you have this block.
There is only one (type-)value possible for one player. So if you want to know what the stored score is you can retrieve it using this block.
This is the block with which you can get all the data that you requested with one of the request blocks.
Each row contains a list with two values: the players name and the score.
If you need different lists containing only the names and only the scores you can use the following blocks:
The ID used in these blocks refer back to the IDs from the Request blocks!!
Example:
Best regards from
M.E.
P.S. Thanks to SadiQ for Beta-testing!
Updated:
2015-02-18
* Modified ScoreBoard.hx to make sure that the URL is not cached
* Block : [Get position on scoreboard for id [ 0 ] Order: [asc/desc] ] to get the position on the list INSIDE request score from playername
* Block: [Get number of rows on scoreboard for ID: [ 0 ] ] to get the number of rows that make up the scoreboard (inside request)