Having trouble loading my game in a browser - how do I fix this?

0 favourites
  • 4 posts
From the Asset Store
This is a single chapter from the Construct Starter Kit Collection and the Student Workbook from the Workshop.
  • Hi there, I'm very new to construct (and game making in general), but I'm using this program to make a project for a gallery show. Its not a game persé, but more of an interactive piece of concept art, where you can walk around as my character through buildings and such.

    Anywhoo, my game is basically just a bunch of images organized in layers, with three invisible tilemaps. I have everything finished, and it works fine in preview. The problem comes with the fact that everything might be too large. I shrunk most of my images in photoshop and re-uploaded them, but when I export everything and put the folder in Netlify, the website (with the construct loading screen) takes forever to load, and when it does finish loading, it is just a black screen. I'm worried that its not just a matter of my images being too large, but maybe I have too MANY images. If someone could help me out, I'd be super thankful. My goal is for it to take a decent amount of time to load in a browser, and for it to work.

    Here's a little video so you can see what I'm doing:

    youtube.com/watch

    Here's the file:

    drive.google.com/file/d/1xtTLyaV0ajCTWFfl95vq9niS6KICWe08/view

    Tagged:

  • You need to optimize the graphics in your game. The number of images doesn't matter, but their size does. The images in your game are insanely huge!

    First of all, why your viewport size is set to 10000x5000? What kind of monitor supports this resolution? You need to set the viewport size to something like 1920x1080 and then resize all images (in the animation editor, not on the layout!) to fit the viewport.

    For example, if the sprite target size on the screen is going to be 100x100 px, then the image itself should not be larger than 100x100 px. If your image is 4000x4000px and it is scaled down to 100x100 px when it's shown to players, you are wasting A LOT of storage, bandwidth and memory!

    Once you optimize the graphics and reduce the size of your game significantly, then it should work when uploaded to web.

    I also suggest re-compressing png images after export, this can shave off a few extra MB from the game size. But you need to resize images in the game first!

  • Also, crop the empty space in images. For example, your Sprite11 resolution is 7200x4800, and about 90% of it is empty space. This sprite alone takes about 150MB of memory when loaded! This is absolutely unacceptable for web games. Your entire game should use that much!

    Click the Crop icon on the toolbar to remove all the empty space, and then resize the image to something like 600x800, preserving the aspect ratio.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you so much for the response! I'm sure this was like explaining 2+2 to a kindergartener for you but I'm not accustomed to thinking this way since I mainly illustrate. Everything you said helped immensely, I really appreciate it. It works now.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)