Community

CommunityProgramming Forum

Highscore board?

Posted Jun 8, '08 at 11:55pm

Klaushouse

Klaushouse

2,849 posts

How would I go about doing one of those properly on flash. I presume I will need a server and such but not sure where to start. I have a website so I can use it's server, but not sure how to do it!
Thanks

Klaushouse

 

Posted Jun 9, '08 at 1:34am

Arax_Nisanu

Arax_Nisanu

1,343 posts

Well, i think armor games actually has one. ArmorBot i believe it is called.

http://www.armorbot.com/

i got some info from a reliable source and found this:

Let's see its actionscript:
PLAIN TEXT
ACTIONSCRIPT:

   1.
      var send_score:LocalConnection = new LocalConnection();
   2.
      onMouseDown = function () {
   3.
          points = Math.floor(Math.random()*1000);
   4.
          _root.score.text = "Your last score: "+points;
   5.
          send_score.send("hall_of_fame", "compare_scores", points);
   6.
      };

Line 1: Creation of the LocalConnection variable called send_score

Lines 2-4: Your game script here... score is saved in a variable called points

Line 5: Sending the score. How?

send calls the compare_scores method (the second parameter) on a connection opened with the LocalConnection.connect command we will insert into our leaderboard file. The name of the connection is the first parameter (hall_of_fame) while the score is passed as 3rd parameter, where I pass the points variable

That's all. This means I only have to add 2 lines to my game: line 1 with for the connection, and line 5 to send the score

The leaderboard

This is a very very complex leaderboard that will save only the highest score. Come on, what's the meaning of being 42,455th...
PLAIN TEXT
ACTIONSCRIPT:

   1.
      var get_score:LocalConnection = new LocalConnection();
   2.
      best_score = 0;
   3.
      get_score.connect("hall_of_fame");
   4.
      get_score.compare_scores = function(points):Void  {
   5.
          if (points>best_score) {
   6.
              _root.score.text = "Highest score: "+points;
   7.
              best_score = points;
   8.
          }
   9.
      };

Line 1: Same thing the first line of the game, but the variable here is named get_score

Line 2: Initializing the score to zero.

Line 3: Connecting to the hall_of_fame connection created at line 5 of the game

Line 4: Creation of the compare_scores method passed as the 2nd parameter at line 5 of the game. Look how I pass the score as points variable

Lines 5-8: Creation of the leaderboard

---------------------------------------------------------------------
Hope i could help!

 

Posted Jun 9, '08 at 1:43am

Klaushouse

Klaushouse

2,849 posts

Thanks once again for the help!

ArmorBot is made by ArmorGames or is that just a coicidence?

Klaushouse

 

Posted Jun 9, '08 at 1:47am

Arax_Nisanu

Arax_Nisanu

1,343 posts

Made by armor games. They have a few sites.

1) this one

2) Armoroffice.com

3) ArmorBot.com

 

Posted Jun 9, '08 at 10:19am

dank

dank

1,043 posts

ArmorBot was created by ArmorStudios. They are not the same people, but develop games exclusively to AG and help out.

 

Posted Jun 11, '08 at 4:50pm

PBMCube

PBMCube

31 posts

Why not be clever and earn some money off your scoreboard.  Read Mochilands and learn how it integrate a high score board AND EARN money at the same time.

Think folks .... stop giving away your assets.

 
Reply to Highscore board?

You must be logged in to post a reply!