Latest Uploads
Shields 64x64

Pakz

Ffs_Spam

Jayenkai

Hives Screen shot

rychan

Rpg Potion Sprites

Pakz

Super Shap ... ration Kit

Andy_A

Platdude Spotting

Jayenkai

Articles + Tutorials > Website Information ( Created 22 August 2008 | Last Edited 02 October 2008)

Online Highscores by Jayenkai | Rating 100%
How they work, and how to work them.
For general use
To create an online scoreboard for your own games.

Step 1.
Create a scoreboard.
Click here, stick in the details, submit.

Step 2.
Download this example.
Use the Highscores.bb file from it, and include it into your code.
You can also read through and try out the example... That's why it's there, after all!

Step 3
Define the following five globals at the top of your code.
-->
These should point to the table's number, password, and encryption passes that you defined within it's settings. (The number's in the board's url!)
They'll also hold the table and MOTD if you have one.

Step 4
Give each player a (roughly!) unique number, and then try to keep hold of it for future reference!
-->
You'll want to save this number somewhere safe, along with the player's highscore, and things like that.
You can use the Encrypt(Txt$,Hashkey$) and Decrypt(txt$,Hashkey$) functions to keep things relatively secure in your save files.
The point of this number is to (hopefully!) stop a single player from flooding the scoreboards.
It should do the trick, but if not, you can easily edit the current board using it's edit page.

Step 5
When ready, retrieve the scoreboard.
-->
The Returned string will be a "|" seperated list of names and scores.
You can use the SplitText() function to split this up. (See the included example for more details)

Notes

Try not to overdo the connecting stuff. If you make it a "Click here to check online" thing, then it'll help to stop Socoder from getting overwhelmed!

Also, if your scoreboard goes overboard (I'll be checking!) I might have to stop you from using it!

There's some kind of super-weird issue with spaces inside the encrypt/decrypt function, when you save/load data. Probably best not to let the player use any!

Latest Comments

Posted : Saturday, 23 August 2008, 07:36
flying_cucco


Vote : 5
A cobra version, with some changes. The network code and parser rewritten, SplitText dropped in favour of a linked list table, and player ID generation has been simplified.

|edit| Encrypt/Decrypt port provided by Hoboben and now working (thanks!) |edit|

Highscores.cps
-->

Test.cps
-->

Posted : Saturday, 23 August 2008, 07:49
Tikihead


Well this should make Wednesday Workshops and such a bit more fun. Nice, Jay.

Posted : Saturday, 23 August 2008, 12:16
HoboBen


Nice one, cucco!

Hey Jay - is there a way to delete scoreboards? Mine is messed up!

Posted : Saturday, 23 August 2008, 14:51
Jayenkai


Yeah, I can delete them for you, don't worry.

Well done Cucco, assuming that works, can't tell.
I was very very very very tempted to buy a copy of Cobra, yesterday, but you did it for me, so no need now


(PHP Version, Updated to Method 1 Encryption)

-->

That should* be a nice working PHP version of the basic encrypt/decrypt stuff.
If you'd like to use that to create your own scoreboard script, or whatever, then feel free. (Not that you have to, of course!)

* It's mostly a copy+paste, but I had the two functions using global variables, writing to them, and returning int variables instead of the strings.. So, I might've messed up in the tweaking! It's untested!

|edit| Although, Hobo, you can EDIT the scoreboard, and empty the text box that contains the scores..!.. or.. you should be able to, anyway! |edit|

Homepage : http://AGameAWeek.com
Posted : Sunday, 24 August 2008, 09:03
JL235


I'll take a look at making a Java port.

Homepage : http://www.StudioFortress.com
Posted : Friday, 05 September 2008, 04:40
Jayenkai


To get the scoreboards working in BlitzMax, throw in these functions.
(Updated to work with Encryption Method 1)

Works in exactly the same way as the BB example, so you still use the same globals and SubmitHighscores(Name+"|"+Number+"|"+Score) setup to send and receive things..

-->

I've included the bit of code from the BB.com code snippets, purely because it actually works!

Homepage : http://AGameAWeek.com
Posted : Thursday, 02 October 2008, 07:15
Jayenkai


OK, Whole thing rejiggered for extra encryption.
The topmost download now contains an updated edition of the highscores.bb file, and it's functions with smush data much more cryptically!

I've also updated the PHP and BlitzMax code posts to work with the new versions.

Cucco and Hobo can fight over who does the Cobra one, 'cos I haven't a clue what I'm doing in that!

Homepage : http://AGameAWeek.com
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 738|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Latest Posts
Pokitto
Jayenkai Sun 02:00
Arduboy Owners Club
spinal Sun 01:35
Slow News
Jayenkai Sat 23:36
AGameAWeek : 2017 - Part One
Jayenkai Sat 08:31
Facebook Group
rskgames Fri 10:47
Possible LCD experimentation imminent.
steve_ancell Fri 10:30
1-2-...Never Mind
rockford Fri 07:12
Buy Zelda
rockford Wed 16:00
What Have You Done? - April 2017
rychan Wed 06:43
I Hear Voices
Jayenkai Tue 04:30
More

Latest Items
Showcase : Read Error A
Jayenkai Sat 08:28
Showcase : Hives
rockford Wed 12:53
Showcase : Quadoban
rskgames Fri 10:11
Blog : My Arduino experience.
steve_ancell Wed 17:02
Showcase : Roguelike Explorer
Pakz Fri 06:59
Showcase : Infinitron
Jayenkai Mon 07:50
News : Newsletter #311
Jayenkai Thu 17:27
Link : Super Shapes Exploration Kit
Andy_A Thu 11:09
Dev-Diary : Sensitive - Arduboy!
rychan Thu 17:27
Snippet : Skylines
steve_ancell Tue 14:25
Dev-Diary : PS2 to N64 Adapter
spinal Sun 10:49
Link : Vector Tutorials/Help page.
Pakz Thu 23:00
Blog : mini project
spinal Sun 10:13
Snippet : Wall Tracing on Random Maps (rpg)
rskgames Wed 22:48
More

Who's Online
rychan
Sun, at 16:55
Jayenkai
Sun, at 16:44
Pakz
Sun, at 15:52
HoboBen
Sun, at 13:30
rockford
Sun, at 13:27
spinal
Sun, at 13:02
9572AD
Sun, at 11:47
rskgames
Sun, at 10:04
zzoom
Sun, at 09:45
steve_ancell
Sun, at 05:52
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.