Jump to content

Is 10MB too much for an HTML5 game?


ozdy
 Share

Recommended Posts

Hi guys,

 

I am planning on making a nice jump and run game with different levels and bosses, etc. I would like to have it ported to Flash/HTML5/Mobile, and not surprisingly my bottleneck will be HTML5 - both in terms of size and computational power. Hence, I would like to push the HTML5 boundaries as much as possible while still making it suitable for HTML5 sponsorship. Do you guys think 10MB is too much?

Link to comment
Share on other sites

I'd be nervous of straying too far over 4MB for the mobile web market

 

I'm sure you have it mind already, but using a tool like https://tinypng.com/ should help immensely if you are using multiple/large png tilesheets

 

Maybe produce your HTML5 version at a lower resolution than the others to reduce image filesize overhead. 

 

You could also only use in-game music on the menu screens (thus getting away with a shorter loop) and rely on spot and ambient sound effects in game

Link to comment
Share on other sites

I've also got a similar platform game with levels on the go, and my intention is to load assets for each level either on demand or in the background whilst the previous level is being played. Or both! I definitely want to keep it to around 3MB up front download, I do think sponsors will complain otherwise.

Link to comment
Share on other sites

I don't think this is true. Firstly why would a 'call' be bad for battery? Actual transition sure, but that's also negligible to what CPU/GPU and display is eating up. Secondly, you can't "keepalive" the same connection if you are loading stuff through http, that's just not how it works, http sends request for each and every item. Also even if you kept connection alive, you still need to do some kind of request, all you would save is TCP handshake which is iirc 1 small packet sent, 2 received - negligible.

Link to comment
Share on other sites

You can also download background music only after game is loaded and running.

 

Yeah, I'm also planning to do this for some longer web audio sounds that only occur later in the game. My only slight worry is that decoding them might take enough CPU to interfere with my games frame rate noticeably, but hopefully this won't be the case.

Link to comment
Share on other sites

I don't think this is true. Firstly why would a 'call' be bad for battery? Actual transition sure, but that's also negligible to what CPU/GPU and display is eating up. Secondly, you can't "keepalive" the same connection if you are loading stuff through http, that's just not how it works, http sends request for each and every item. Also even if you kept connection alive, you still need to do some kind of request, all you would save is TCP handshake which is iirc 1 small packet sent, 2 received - negligible.

 

I was recently reading a book High Performance Browser Networking and in Chapter 8. Optimizing for Mobile Networks is says that its a good idea. Is the resource wrong or did I understand it incorrectly? Could you please point me to a better resource maybe?

 

Thanks  :)

Link to comment
Share on other sites

I skimmed through it and yes, what's there makes sense. But it talks about websites, games are different. By sending a request you activate the radio for some period of time, which doesn't really matter if you are already using it and loading other stuff. With websites, sure, if you weren't using the radio, this extra request could drain battery a bit. This is still not much compared to what CPU/GPU and display takes thought (or at least I believe so, I'm no expert).

Also these days most people have countless stuff on background loading things anyway.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...