Jump to content

Best way to reduce server calls with multiple sprite sheets


pitaman
 Share

Recommended Posts

Hi everyone.

 

I have a few questions that I would like some assistance with. As I'm getting into HTML5 game development as a technical designer/artist...I know that with an online game (especially html5), having your game assets require too many server calls is undesirable.

 

  1. What is a comfortable/safe number of server calls?
  2. When your dealing with multiple sprite sheets, is there a way to wrap multiple sprite sheets into one file? Not one big sprite sheet.
  3. What would be best practices for this?

I am concerned because of mobile and/or other countries where bandwidth is an issue. I have the image asset file size part covered with Texturepacker, TinyPNG Re-using certain assets in smart ways, but I know that server calls can be a problem.

 

Any help would be appreciated.

 

 

Sincerely,

 

 

Carlos

Link to comment
Share on other sites

  • 2 weeks later...

Well depending on your game, it varies.

 

With server calls, you mean the game is pinging server code yah? With javascript development there IS NOT a lot of server code unless you use some PHP, NodeJS or other server language on top of it. The user downloads everything at the beginning and this is called your  "client". Very little server interaction typically, aside from the initial connection to your webserver.

 

Assuming you are using server code then :).

 

1.) There is no safe number because there are a ton of factors you have to consider. Ping, Server specs, etc.

2.) Caching is what you mean, and yes, but no? Combining sprite sheets will make one big sprite sheet, so I am confused by your desire.

3.) Best practice are to code your game as best you can and if performance becomes a problem either upgrade your server or look into intensive methods (typically any loop or large filesizes can be bottlenecks).

 

Kind Regards,

 

~Outrider

Link to comment
Share on other sites

  • 1 month later...

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...