Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (489)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (555)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Do colored images take longer to load?  (Read 779 times)
0 Members and 1 Guest are viewing this topic.
Offline Jacob Pickens
« Posted 2014-03-04 22:43:01 »

What if i make all the images in my game monochromatic and then color them in game? Would that improve load times?
Offline Danny02
« Reply #1 - Posted 2014-03-04 22:50:13 »

I highly doubt that load times of a few images will be of any concern to you

fewer colours -> less data -> shorter time to read
Offline Jacob Pickens
« Reply #2 - Posted 2014-03-04 22:53:42 »

I'm making a large game though so trust me.... It concerns me quite highly.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Varkas
« Reply #3 - Posted 2014-03-04 22:57:03 »

I've had projects with a few thousand of images, and image loading time really wasn't a problem. But Danny02 is right, the less information there is in an image, the better it compresses and the less data there is to read from disk.

I'd say, to make it looking good is more important than to save 5% image loading time.

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline pploco1996

Junior Member


Medals: 2
Exp: 1 year



« Reply #4 - Posted 2014-03-04 22:58:17 »

Probably they load faster, but, wouldn't it take some time to add color to each image?

I think you should do it the normal way just to keep it simple, plus, any modern day device will load textures pretty fast i think.
Offline LiquidNitrogen
« Reply #5 - Posted 2014-03-05 03:23:02 »

im sure it would take longer to color the images in any meaningful/appropriate way than it would to load already colored images.
Offline opiop65

JGO Kernel


Medals: 154
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #6 - Posted 2014-03-05 03:25:25 »

You quite simply aren't making a large enough game where this could matter at all, trust me. Don't underestimate the power of the modern day CPU/GPU.

Online Rayvolution

JGO Kernel


Medals: 189
Projects: 2
Exp: 1 year


Resident Crazyman


« Reply #7 - Posted 2014-03-05 03:34:46 »

technically speaking, loading a 8 bit, grayscale or any image that is smaller (disk usage wise) will load faster, but unless you're loading thousands upon thousands of images pretty much any modern day computer will handle it.

Here's an example, I am also working on a resource pack for minecraft. It currently has over 4,000 textures (uses a mod called MCPatcher, that allows me to have multiple textures per block). Using the logic that MC is programmed in java and with LWJGL, i'll assume we'd get similar results via LibGDX or Slick.

The results:
4,000 full 24 Bit Color PNG files - 10 seconds load time.
4,000 compressed 8 bit PNG files - 8 seconds.

So yes, it does matter. But with *4,000* 64x64 textures, it only changed the load time 2 whole seconds. You could argue it was a "20% increase" but really, images aren't a big deal to load. I'd just stick with full uncompressed images, most of your load time will be from running tons of game logic, not images. At least, that's been my experience.

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Survival Sim/Builder/Roguelike!
LIVE-STREAMING DEVELOPMENT: http://www.twitch.tv/SG_Rayvolution
Offline BurntPizza
« Reply #8 - Posted 2014-03-05 03:42:25 »

Welp, whole post erased by accident...
Basically what everyone is saying: "Don't worry about it."

Any (minuscule, as in microseconds per image) time saved in loading will be dwarfed by the time it takes to 'color them in game,' what ever you meant by that.
Besides, there are other more effective ways of reducing loading time, such as only loading what you need when you need it, and pre-loading stuff in the background when you know you're about to need it.

One of the main rules of optimization is: "Don't fix it if it ain't broken." Unless your loading times are unbearable (really), this isn't yet an issue and is not something to worry about.
Offline HeroesGraveDev

JGO Kernel


Medals: 246
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #9 - Posted 2014-03-05 04:25:05 »

If this is a performance issue for you, you have serious problems somewhere else.

And if this is such a "large game", shouldn't you be a bit more experienced first?

 Undecided

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Jacob Pickens
« Reply #10 - Posted 2014-03-05 04:27:35 »

haha well the game isn't uk WoW big. And really I have no issue with loading (YET!) I'm trying to think ahead.
Offline BurntPizza
« Reply #11 - Posted 2014-03-05 04:42:58 »

I'm trying to think ahead.

There's two versions of that: Planning, and Premature Optimization. One is a useful skill, the other is pure evil.

Make sure you choose the correct one.
Offline Jacob Pickens
« Reply #12 - Posted 2014-03-05 04:43:54 »

Think it's a little bit of both.   Tongue
Offline StumpyStrust
« Reply #13 - Posted 2014-03-05 09:37:08 »

...I do not get it. Googling would have been faster then starting a new thread. For the love of God google first. You have made 14 topics in what a month? Not trying to make you afraid of asking questions but really google before posting.

Offline Roquen
« Reply #14 - Posted 2014-03-05 09:44:05 »

If you want to "plan ahead" fine.  So you have a bagillion images...demand load and unload them.  If you truly are building a "big" game then you'll need to be able to do this with various resources anyway.
Offline Gibbo3771
« Reply #15 - Posted 2014-03-05 11:42:40 »

...I do not get it. Googling would have been faster then starting a new thread. For the love of God google first. You have made 14 topics in what a month? Not trying to make you afraid of asking questions but really google before posting.

Although I agree that Googling before posting is usually a good idea but now this post will show up in Google and give people an example such as :

technically speaking, loading a 8 bit, grayscale or any image that is smaller (disk usage wise) will load faster, but unless you're loading thousands upon thousands of images pretty much any modern day computer will handle it.

Here's an example, I am also working on a resource pack for minecraft. It currently has over 4,000 textures (uses a mod called MCPatcher, that allows me to have multiple textures per block). Using the logic that MC is programmed in java and with LWJGL, i'll assume we'd get similar results via LibGDX or Slick.

The results:
4,000 full 24 Bit Color PNG files - 10 seconds load time.
4,000 compressed 8 bit PNG files - 8 seconds.

So yes, it does matter. But with *4,000* 64x64 textures, it only changed the load time 2 whole seconds. You could argue it was a "20% increase" but really, images aren't a big deal to load. I'd just stick with full uncompressed images, most of your load time will be from running tons of game logic, not images. At least, that's been my experience.

It keeps the forum active imo, better than no one posting just because Google answered it, although some things should never be posted.....such as the infamous "Which 2D library" thread that pops up once or twice a week.

"This code works flawlessly first time and exactly how I wanted it"
Said no programmer ever
Offline jonjava
« Reply #16 - Posted 2014-03-05 15:23:23 »

It depends on the image format.

Logically less data should mean faster load times. In practice, however, in this case it makes no difference.

To really try and benefit from doing something like this you should use the correct image format (or even make your own) and a suitable compression algorithm.

To answer your question: No.

Offline Varkas
« Reply #17 - Posted 2014-03-05 15:44:11 »

It keeps the forum active imo, better than no one posting  ...

<offtopic>
I wish there was more talk about game design (as in, how to make it fun, create ideas, transforum ideas into a game), and less about how to program java. Currrently we have 99% programming questions to 1% design questions.
</offtopic>

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline StumpyStrust
« Reply #18 - Posted 2014-03-05 22:59:30 »

Sorry for derailing here but I agree with Varkas. Programming is big obviously but there have been so many new topics that have literally been answer over and over again and are very much basic java type questions. Doesn't matter how fast, nice looking, or technical your game is, if it isn't fun it isn't a very good game.

I would rather no one posting then posting for the sake of posting. Those posts become useless noise.


Pages: [1]
  ignore  |  Print  
 
 

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Nickropheliac (9 views)
2014-08-31 22:59:12

TehJavaDev (22 views)
2014-08-28 18:26:30

CopyableCougar4 (27 views)
2014-08-22 19:31:30

atombrot (40 views)
2014-08-19 09:29:53

Tekkerue (38 views)
2014-08-16 06:45:27

Tekkerue (34 views)
2014-08-16 06:22:17

Tekkerue (24 views)
2014-08-16 06:20:21

Tekkerue (34 views)
2014-08-16 06:12:11

Rayexar (71 views)
2014-08-11 02:49:23

BurntPizza (47 views)
2014-08-09 21:09:32
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!