Solved

Is clipping GIF's in code better than storing the GIF cuts in web-space?

Posted on 2014-12-30
5
142 Views
Last Modified: 2014-12-31
Hi

for my RTS, I have the GIF tiles ready for my map scenery.
I can chop them up from a big image at the beginning or load in each tile one by one.

Is the obvious improvement in loading a GIF once and chopping the sub-images out the best way to go, or is loading in the images pre-cut better?

Thanks
0
Comment
Question by:beavoid
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 28

Accepted Solution

by:
dpearson earned 500 total points
ID: 40525059
Generally it's better to load 1 large image and pull the image elements from within that.

This is generally known as "texture packing" and makes a big difference if you can load the entire image (a texture atlas) into video memory in one go.  You can read more about it here: http://en.wikipedia.org/wiki/Texture_atlas

I've not personally attempted to do this with a Java front end client, but it's a common technique used with many other rendering technologies.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40525180
HTTP adds heap of latency when loading lots of sprites, so it is best to join them together.
It will kind of be solved with HTTP/2.0, currently known as SPDY or so.
0
 

Author Comment

by:beavoid
ID: 40525446
I am not using HTTP, no text, just extracting the GIF from my domain into memory.
But it's best to make one load of graphics and chop it up? Latency, how? Surely once it is in memory, it is solid?

Thanks
0
 
LVL 62

Expert Comment

by:gheist
ID: 40526273
You can have one huge png resource for all.
0
 

Author Closing Comment

by:beavoid
ID: 40526275
Great
Thanks
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question