Leaderboard Fixed


I've fixed the online leaderboard in the HTML5 export. I'm using dreamlo.com to provide the leaderboard itself and obviously itch,io to host the game, so any attempt to call the dreamlo API crosses domains and violates the Same Origin Policy. The workaround was to host my own service on Azure which grants access control from any origin. This service calls the dreamlo API, gets the JSON, then reformats it as JSON-P and sends it on to Itch, which will accept the JSON-P format, then its simply a case of converting back to JSON in-game and getting the results.

It's a long-winded process for a small jam game, but I do plan on using the service for other things in the future, so it will be useful, and it was an interesting problem to solve nonetheless.

Files

po-html.zip Play in browser
Jan 23, 2022
po-win.zip 32 MB
Jan 23, 2022

Get Pole Opposition

Leave a comment

Log in with itch.io to leave a comment.