Solved

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

Posted on 2014-12-30
5
119 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
  • 2
  • 2
5 Comments
 
LVL 26

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 61

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 61

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Java asynchronous logging 4 50
Requested array size exceeds VM limit 3 85
Any Advice on Sonar / DAW freaky instruments? 2 45
servlet example issue 6 33
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
What is RenderMan: RenderMan is a not any particular piece of software. RenderMan is an industry standard, defining set of rules that any rendering software should use, to be RenderMan-compliant. Pixar's RenderMan is a flagship implementation of …
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…

862 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now