Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2014-12-30
5
Medium Priority
?
164 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 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

618 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