• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Speeding up HTML5 Javascript load time on pages?

N

Nathan Archer

Guest
Hey I've been trying to decrease my load time on my pages but the javascript from my HTML5 game (which is about 1MB) is taking a long time to load.

Any way I can speed it up? Already tried to reduce the size of images, and ran it through a .js compressor but it ended up breaking it.
 

FrostyCat

Redemption Seeker
The HTML5 runner itself is already 1.2MB with just an empty room, so there isn't much you can do in terms of file size. You could try getting a better host or using a CDN to improve the server-side throughput, but when it comes to actual download performance, in the end it takes two to tango.
 
N

Nathan Archer

Guest
The HTML5 runner itself is already 1.2MB with just an empty room, so there isn't much you can do in terms of file size. You could try getting a better host or using a CDN to improve the server-side throughput, but when it comes to actual download performance, in the end it takes two to tango.
It's the execution performance that's the problem more than the loading. Anyway I can solve that?
 

FrostyCat

Redemption Seeker
It's the execution performance that's the problem more than the loading. Anyway I can solve that?
You shouldn't be having hopes this high in terms of performance from a quintessentially interpreted scripting language. There isn't much you can do, other than optimizing your code or simply not trying to do any computationally intensive work/genre on the HTML5 platform.
 
N

Nathan Archer

Guest
So I think I found the reason why it was taking so long to execute. I was doing a gmcallback call at Game Start within an object and it appears that can take a lot of execution time within Google's Page Speed tool. I made an empty room at the beginning and an object that loads the first room later and set the "Game Start" event to "Room Start" and it cut down on the execution time.
 
Top