Latest Uploads
Platdude Spotting

Jayenkai

Nom nom nom

Jayenkai

Rainbow Trout

Pakz

King Salmon

Pakz

Snooker

Jayenkai

You've ... o have you

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 548|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Latest Posts
Laptop Aaargh...
Jayenkai Wed 17:48
Happy Birthday Evil Roy Ferguson
rockford Wed 16:21
London Car/Stab Incident
therevillsgames Wed 14:50
Watch Switch - Fitbit Blaze
Jayenkai Wed 06:23
Spinal's Return to Android
Jayenkai Tue 13:41
AGameAWeek : 2017 - Part One
Jayenkai Tue 08:10
Poll : Cooking
Jayenkai Mon 05:11
Happy Birthday, TheRevillsGames
Dabz Sun 23:32
Ravetastically Awesome!
rockford Sun 07:41
B3ta - Old Gamers
Jayenkai Fri 16:51
More

Latest Items
Showcase : Infinitron
rychan Tue 03:02
Blog : My Arduino experience.
steve_ancell Mon 20:27
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
Showcase : Blockman Returns
Jayenkai Fri 03:04
Snippet : Wall Tracing on Random Maps (rpg)
rskgames Wed 22:48
Snippet : Path Following
Pakz Mon 16:25
Snippet : Flowers (Jan 2017)
Kuron Thu 01:13
Showcase : Clusters of Hex
therevillsgames Mon 15:01
Article : Maths 101 - Episode 1: Basic Trigonometry
shroom_monk Sun 14:07
Article : Maths 101 - Episode 5: Line Intersection
shroom_monk Sun 14:02
Dev-Diary : Normals and Dot products
Pakz Sat 20:37
Pets : Molly On The Couch
Jayenkai Thu 04:32
Snippet : Additive Particle Flames
Pakz Fri 18:12
More

Who's Online
Jayenkai
Wed, at 19:53
rskgames
Wed, at 19:14
9572AD
Wed, at 19:09
therevillsgames
Wed, at 18:03
rychan
Wed, at 17:57
steve_ancell
Wed, at 17:37
rockford
Wed, at 16:21
shroom_monk
Wed, at 15:46
spinal
Wed, at 15:32
Afr0
Wed, at 14:27
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.