On-line ScoreBoard [Not maintained .. new extension available ]

cabinfever

  • Posts: 159
Hi,

(three occurences replaced in the ScoreBoard.hx)

Howabout in the 'function initScore', where there is only:
    "var call:String=""+url+"?a=1";"
Should that also be replaced?
---
Update: Most likely not, since this is now WORKING OK!!!  Jihaa!!!

« Last Edit: January 20, 2015, 09:07:03 am by cabinfever »

mdotedot

  • Posts: 1640
Wow, great news!

I will make a note for this when I address the number of scoreboard entries + position in scoreboard as well!

Have fun with your scoreboards...

Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

cabinfever

  • Posts: 159
Hi,

Now that I'm testing new game, I get most of the time reply like this from ScoreBoard-server:

 After decode :[<h2>The server is too busy at the moment=</h2><p>Please reload this page few seconds later=</p>

Is there something to be worried about this?

And sometimes this:
 Received text from server: After decode :[ERROR!]

Joraanpe

  • Posts: 288
Hey @mdotedot , I have rented a hosting service for my website and was thinking about using the files of your .tar to host the highscore stuff there, as it might be faster and so (hostinger has been lagging as hell last days)

By other side, I've some doubts, if you have some time to clarify me... (Im totally new with servers)
In your Readme.tx says i should get over the var folder and so on, but i don't have that kind of folder in my host root folder...

also you have this:
5. Run the table creation scripts: php -f create_db.php
6. Put the xml file in the DocumentRoot (see Apache: httpd.conf) to allow cross-domain/protocol connections

By this part i have no idea, sorry!
If you have dealt with hosting services you might have an idea of how it looks like, ill add a pict anyways to see if you could give me some tips.

Thanks in advance!

mdotedot

  • Posts: 1640
@CabinFever,
Sorry I have no time to investigate, but according to JoraanPe it seems to lag for him as well.
It is a free service with no guarantee of  speed.

@JoraanPe,

The instructions were initially made for a hosting service where you have a terminal to put things on.
The current free service has no terminal so I followed a different route.

From top of my head since I don't have much time to investigate and/or repeat all the steps:
* The xml file was put in the root folder of the filesystem that was presented by the free service.
* Since I didn't have access to the var stuff I followed a different approach.

Assuming that your hosting service has some kind of cpanel with ability to run mysql/php admin; these are the steps you should do.

1. In CPanel locate a way to send files.
In my case it is called File Manager
This will present me with a the following layout:
- public_html [Directory]
- File with name: DO_NOT_UPLOAD_HERE

The files you need to put go to public_html

I have put in:
crossdomain.xml (leave the .htaccess )
I created a file index.php with some text in php-code

2. Create two directories. One for creation of tables (create_db.php + connect.php should go there)
The other directory is where you will put the other php files . In our example:
YOUR_CREATE_DIRECTORY, THE_SCORE_DIRECTORY

3. Make sure that the connect.php you put in this directory has the login credentials for MySQL.
It depends on your service provider how you obtain this information. Usually credentials are needed/supplied when going to PHPMyAdmin page

4. Browse to the .php file to create the tables (this will replace the step php -f create_db.php)
For example: yoursite/YOUR_CREATE_DIRECTORY/create_db.php
By visiting this page it will create the tables for you. (you could verify with the  phpmyadmin tool)

5. Make sure that the connect.php with your MySQL credentials are also in the other directory: THE_SCORE_DIRECTORY

If all goes well you should now be able to visit the generation page where you will be able to generate your own codes and get a mail with these codes.

http://yoursite/THE_SCORE_DIRECTORY/index.php

Please let me know if this works so that I can put these extra steps in the README.TXT for future use by others.

Best regards from
M.E.




Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

Joraanpe

  • Posts: 288
Heya M.E, I've followed your explanation and adapting it to my conditions it worked! My server's control panel is very similar to hostinger's one.
In my case i created the directories and stored the file as this:

#Highscore Tables: create_db.php, connect.php
#Highscore:  connect.php, crossdomain.xml, gencodes.php, index.php, main.php, stencyl.php

Its working like a charm (at least by the very few tests I've done).... the only weird thing is that the highscore displaying is not working when testing the game on Flash, the log viewer says something like a security problem.... the log displays the error in spanish for my case, but ill paste the message here just in case it gives you some idea of what could be happening:

Level:     INFO
When:      2015-02-01 22:18:53:192
From:      stencyl.sw.app.filewatcher.ExternalAppLauncher

[Flash] com.stencyl.Engine#uncaughtErrorHandler(609): Error #2048: Violación de la seguridad Sandbox: file:///Users/joseanzola/stencylworks/games-generated/TEST/Export/flash/bin/TEST.swf no puede cargar datos desde http://ipage.com/Highscore/stencyl.php?a=1.

mdotedot

  • Posts: 1640
That is why there is a crossdomain.xml file. Try putting this file in different folders.
For apache this location needs to be in DocumentRoot folder. It can be that you do not have the rights to put that xml file on the correct position.
If this is the case, please contact your provider and ask them where you need to put the crossdomain.xml file or if they would be so kind to put it on the DocumentRoot-location for your site.

Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

Joraanpe

  • Posts: 288
That is why there is a crossdomain.xml file. Try putting this file in different folders.
For apache this location needs to be in DocumentRoot folder. It can be that you do not have the rights to put that xml file on the correct position.
If this is the case, please contact your provider and ask them where you need to put the crossdomain.xml file or if they would be so kind to put it on the DocumentRoot-location for your site.

Best regards from
M.E.

Yeah it was that, just moved the cross domain file with the file manager to the root folder and did the job as you said, thanks M.E :)

jazzuo

  • Posts: 23
hi

it looks wonderful, i am checking it out. I want to ask, is there any other way to reach the informatin other then through stencyl game aplication, for me to view statistics?

thx

mdotedot

  • Posts: 1640
Hi Jazzuo,

Best way is to create a seperate 'game' for this and get lists from the server.

But if you really want you can deploy your own server and get information from the database, but you have to Base64 decode the information stored in the database.  This is advanced stuff, but can be accomplished!

Hope this helps.

Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

Jon

  • *
  • Posts: 17529
If you haven't already done so, please build the 64-bit libraries, so iOS developers can continue to use your service in their games.

Likewise, if this contains some references to nme, those will need to be updated to openfl for this extension to function in 3.3 and above. Thanks!

mdotedot

  • Posts: 1640
Hi Jon,

Isn't the 64-bit stuff only necessary when we use non-pure-HaXe ?

Kind regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

Jon

  • *
  • Posts: 17529
My bad, I took the post's description to imply it had native code. All you need to watch for then is any imports or uses of nme vs. openfl. They map 1:1, but the Haxe/OpenFL update we did forces you to use the latter now.

mdotedot

  • Posts: 1640
Thanks for the heads-up anyway.

So these:
import nme.net.URLLoader;
import nme.net.URLLoaderDataFormat;
import nme.net.URLRequest;
import nme.events.Event;
import nme.events.IOErrorEvent;


Should be substituted for
import openfl.net and openfl.events.
?
Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.