Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question Ways to improve loading time for WebGL games on personal websites?

Discussion in 'Web' started by grantnowotny, Feb 18, 2023.

  1. grantnowotny

    grantnowotny

    Joined:
    Jan 28, 2022
    Posts:
    1
    Hi, so I've been working on a small 2d game for exporting on WebGL. Though I need to have the game on my personal domain. Due to blocked links, I can't embed an itch.io game in the website so I have to load it directly. Compared to itch.io it takes around 25-40 seconds on a fast connection to load the game. What kind of issues could be causing this? I've looked into upgrading the hosting server, but I've seen some warn that it probably wouldn't affect loading time. Also is there some reason besides obviously better servers that it runs better on itch.io?

    Here are the two links to the games to compare:
    itch.io - https://gdev-studios.itch.io/stranded
    Personal Domain: https://gdevstudios.com/

    Info about the build:
    Using Universal RP 2D lighting
    Using Gzip compression
    The game is less than 16MB when exported with compressed textures and audio

    Here are the player settings:
    Screenshot 2023-02-18 170230.jpg Screenshot 2023-02-18 170151.jpg

    Thanks for taking the time to help!
     
    Last edited: Feb 18, 2023
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    4,379
    Try the uncompressed build. If that loads faster your webserver is most definitely CPU limited as is the case with most entry-level webhosting solutions where your website is just one of many served by the same physical machine.
     
  3. DannyWebbie

    DannyWebbie

    Joined:
    Jun 5, 2018
    Posts:
    7
    What sort of web hosting setup are you running? I would recommend using Brotli compression on your personal site and using a distributed web host (like Netlify) with a CDN (like Cloudflare). Netlify + Cloudflare should bring you great delivery performance without spending anything.

    Would compression matter when using precompressed files?
     
  4. grantnowotny07

    grantnowotny07

    Joined:
    Jan 3, 2022
    Posts:
    1
    Hi, I tried using uncompressed but that only slowed down load time. I don’t think it is CPU bound. Thank you though!