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.

Geek Culture / PurpleToken highscore update

Author
Message
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th Aug 2021 07:02
Unbeknownst to me, my highscore website has been broken since at least May and possibly longer. I used a very old version of PHP and my host decided to upgrade to 7 last year without telling me. It broke everything! I had them downgrade until I had time to update my code. Rather than try to maintain legacy code using deprecated libraries, I've done a complete rewrite from scratch. I made several changes to the database which would obviously break the original site, so I decided to push forward with what I have ready now and upgrade the server. Attempted to make the move to php 8 but I couldn't get sessions to work properly.

Registration still uses the old page for now and I haven't built the "create game" page just yet (all coming this week). But for anyone who's an existing user, current games can still be managed. Games can now have multiple screenshots (1.5mb limit per image). First image uploaded will be used as the game's thumbnail in previews. One of the quirks at the moment is with the image slideshow requiring you to resize the window to get it to display correctly (using splide js). Other features require page refresh to reflect their changes on screen.

As for the backend, scores sent using the REST API will now track the date and time they're submitted. This data is not yet retrievable by the user.

The site currently has 72 active accounts, with 19 new ones this year alone.

https://purpletoken.com/
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
Kevin Picone
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 13th Aug 2021 06:25

Cool.. we're experiencing the very same thing with forced php upgrades.. what a pain

PlayBASIC To HTML5/WEB - Convert PlayBASIC To Machine Code
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 13th Aug 2021 23:12
I've been wanting to switch over from mysqli to using pdo anyway. But when you do web dev for a living, you don't feel like doing it when you come home.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 14th Aug 2021 02:23
is there a way to utilize PT with AppGameKit HTML exports?
[My Itch.io Home] [Community Apps on Itch.io]
[AGK Resource Directory] [TGC @ GitHub]
[CODE lang=agk] YOUR CODE HERE [/CODE]
[VIDEO=youtube] VIDEO ID [/VIDEO]
[AGK Showcase][Google Forum Search]
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 14th Aug 2021 19:13
I've never tried, I'm not sure how the networking commands work after exporting. But it's just a rest api, so if you can make an ajax call or something then yea
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 21st Aug 2021 07:48
I think I've restored all the old site's functionality into the new one as well as improved (hopefully) many of them. You can view the scores of your game keys and will eventually be able to insert/delete scores from the web interface. I've completely reworked how screenshots are implemented and users may now have multiple images associated to their game. I've spent more time on function than form and for the moment still not happy with the design of how all the games are listed. So there will still be some cosmetic changes. When you go to manage one of your games you might notice tables are a different color scheme. That's due to me stealing the table code from another project of mine and not updating the css yet.

If any bugs are found please let me know here until I get a chance to build a support page for the site.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 31st Aug 2021 21:05
Late to the party but does your hosting allow docker containers? It might help you avoid these forced PHP upgrades in the future


\"everyone forgets a semi-colon sometimes.\" - Phaelax
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 2nd Sep 2021 00:37
Quote: "is there a way to utilize PT with AppGameKit HTML exports?"


Yes it does, I just tried it. Here's an example, use space bar to send a random a score and enter key to retrieve the scores.

https://purpletoken.com/agk/thingy.html

A word of caution though, though it's done over https, I was able to find the private key in plain text stored in the AGKPlayer.data file. So if you go this route, don't assign your private to a string variable as-is. I'd use at least some simple form of encryption and decrypt it at run time. Since the key hashes are a fixed length, I don't think it'd be too difficult to discover other people's keys in their data file either.


Quote: "does your hosting allow docker containers"

I doubt it. There's nothing in the cpanel about it. I could ask them and they might be able to if the systems are setup that way, but then again I asked them if I could get tomcat installed so I could do some JSP stuff and they replied with "can't you just use node.js"..... I have little faith in tech support that doesn't know the difference between java and javascript. But I do have the ability now to manually select which version of php to use. I was on 5.6. But it appears 7.2 is already deprecated though I had issues with getting sessions to work properly using 8. I've abandoned mysqli in favor of PDO, I think it'll be more future proof.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

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

Login to post a reply

Server time is: 2024-04-20 07:57:54
Your offset time is: 2024-04-20 07:57:54