Author Topic: 100 images or 1 image loaded?  (Read 660 times)

Offline Sim

  • Level 13
  • *
  • Posts: 104
  • Reputation: +1/-1
    • View Profile
    • Online RPG Creator
100 images or 1 image loaded?
« on: February 17, 2011, 10:39:16 PM »
I am debating whether or not I should load all my 100's or even 1000's of images or just load 1 large image. What would you guys do?

http://phpengines.info/tactical/game.php?id=19

People will have  a character on there and when they click. It will move to that spot.

Offline 133794m3r

  • Level 22
  • *
  • Posts: 265
  • Reputation: +2/-0
    • View Profile
Re: 100 images or 1 image loaded?
« Reply #1 on: February 17, 2011, 10:57:59 PM »
I am debating whether or not I should load all my 100's or even 1000's of images or just load 1 large image. What would you guys do?

http://phpengines.info/tactical/game.php?id=19

People will have  a character on there and when they click. It will move to that spot.
why not load them as 100s or so whatever you wish for it to be like a 'tile set' as ONE HUGE image? That'd allow you to decrease http requests for the thing, and also maybe save a bit of space from the end result. Also, if i was you i'd do the tons of images and then also, use css sprites to do everything.

Offline Sim

  • Level 13
  • *
  • Posts: 104
  • Reputation: +1/-1
    • View Profile
    • Online RPG Creator
Re: 100 images or 1 image loaded?
« Reply #2 on: February 17, 2011, 11:50:28 PM »
why not load them as 100s or so whatever you wish for it to be like a 'tile set' as ONE HUGE image?

I dont quite understand what you are saying...

Offline toxin

  • Level 21
  • *
  • Posts: 231
  • Reputation: +4/-2
    • View Profile
    • Encore Montreal
Re: 100 images or 1 image loaded?
« Reply #3 on: February 18, 2011, 12:04:14 AM »
I would say one large image. You could even make one large terrain image and use it as a sprite this way you can keep a linkable grid. If you think about doing this http://spritegen.website-performance.org/ will save you time.

Edit:
Just found this http://spriteme.org/
« Last Edit: February 18, 2011, 12:46:48 AM by toxin »

Offline DV8

  • Level 10
  • *
  • Posts: 63
  • Reputation: +0/-0
    • View Profile
    • Shadowrun: Corrosion
Re: 100 images or 1 image loaded?
« Reply #4 on: February 18, 2011, 02:57:04 AM »
why not load them as 100s or so whatever you wish for it to be like a 'tile set' as ONE HUGE image?

I dont quite understand what you are saying...
I think what he's saying is that he'd rather have one large image with 100 smaller images on it than having 100 images. He can then use that one image in multiple spots and adjust the background-position of the image to show the right section of the large image. That way, there's only one http call to the large file instead of 100 to the smaller files.

Offline Chris

  • Game Owner
  • Level 35
  • *
  • Posts: 2,217
  • Reputation: +28/-1
    • View Profile
Re: 100 images or 1 image loaded?
« Reply #5 on: February 18, 2011, 06:57:31 AM »
Hard to tell... It depends how you feel about it, making 1 big file makes coding more troublesome plus you need to test how it display on all browsers. The most important I would say is your personal preference. These are just simple small tiles, it will work fine both ways.

It also depends on number of tiles. If there is only 100 then one bigger file sounds perfect. But one file with 1000 sounds too big, plus most of these won't be needed in most cases, so a wasteful slowdown to load it. With 1000 I would go for separate files.

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal