Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit/AppGameKit Studio Showcase / [AGK] Purple Token library Version 2

Author
Message
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 22nd Feb 2024 06:00 Edited at: 23rd Feb 2024 17:00
Since I know Virtual Nomad will just move my thread to showcase anyway I'll start here. I did a new thread because with all the extra code snippets posted I didn't want anything getting confused with the new version. Much of it has been restructured and simplified. It's recommended to use this version as it uses the newer API on my server which has more features. You can retrieve dates along with score submissions and set a limit. If you don't want the top 20 scores you can now limit it to retrieve only the top 10. Scores can now also be retrieved in 3 formats: CSV (same as old version), JSON, and XML. Previously, requests could only be made using POST but now you may use GET as well. If rolling your own library instead or building one for another language this can be helpful as you can test your commands with a simple web browser. You can now remotely delete scores as well. This feature is disabled by default and you would need to turn it on in the game settings from purpletoken.com. With the new formats, you no longer need to parse the response string yourself as this library will use json to load the response directly into an array.

The video below shows the attached demo code. The scores are loaded via the library. Press ENTER to retrieve the scores. Press space to send a score, the example will automatically request the scores again (this is through the demo not the library). Use the left mouse button to delete a score. Obviously you want to use your own game key, but I'm providing a dummy one folks can play with.

Of course you can always create your own way of doing it, the API documentation is here:
https://purpletoken.com/api.php





PT Library



Example demo:
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda
Pixel-Perfect Collision

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

PSY
Developer
8
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 22nd Feb 2024 16:16
Awesome, thank you Phaelax!


PSY LABS Games
Coders don't die, they just gosub without return

Login to post a reply

Server time is: 2024-11-21 09:39:19
Your offset time is: 2024-11-21 09:39:19