Search Unity

Question WebGL Project with High Score Table

Discussion in 'Web' started by twocrittersstudio, Mar 3, 2019.

  1. twocrittersstudio


    Mar 3, 2019
    I'm working on a WebGL project that I'm hosting on an Amazon S3 bucket. In this project, I'd like to be able to:
    • Allow the player to post a high score if they have one
    • Allow the player to view current high scores (top N scores)
    • Tell the player "You're the Nth person to beat the game"
    • If the player is in the first N number of people to beat the game, they get an exclusive redemption code
    Currently, I'm using to host my temporary leaderboard but this solution isn't sustainable due to security concerns (it uses HTTP get for both listing and posting scores and it's super easy to intercept the traffic).

    I've tried using the AWS .NET SDK to interact with DynamoDB but this doesn't work once you compile the product into a WebGL package. There's also an AWS SDK made specifically for Unity but it states "Applications written with the AWS SDK for Unity can run on iOS or Android devices"... no luck for WebGL projects. I've also considered writing all my AWS interaction through the low-level RESTful APIs but I don't want to go down that long road only to realize it might not be best.

    Could anyone point me in the right direction for how I can securely manage a high score table through a WebGL project? If the solution could also support the last two bullet points also, that'd be a bonus.
    OmarVector likes this.
  2. MrsPiggy


    Jun 13, 2018
    dyanmodb seems like overkill for a simple high score table. I'd rather use a normal SQL-based DB such as MySQL (or Amazon's own MySQL-compatible Aurora) and PHP.
    In other words you could run your own LAMP server in AWS EC2, associate a domain name to it and deploy an SSL certificate to activate HTTPS.

    In terms of security you will still need to guard against potential attempts to call your PHP server directly and post fake scores. If they reverse-engineer your client code they could find the details of the HTTPS call and replicate it manually. .
  3. OmarVector


    Apr 18, 2018
    AWS until this moment, does not support Webgl for unity.

    And I still cant find any alternative
  4. wanlwanl


    Jul 7, 2022
    What about azure playfab multiplayer server?