This may be a dumb question...

As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343

But, if I import all images at 72dpi, will this increase the performance speed of my game? Also, will this lower the quality appearance of my game?

I have imported several images at 300dpi. I am trying to optimize my game for better performance, as it takes about 5-6 seconds to load the next scene...

Any advice :# ?

Comments

  • As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343

    Here is a screen shot of the GS Viewer, during my initial gameplay... :|

  • SocksSocks London, UK.Member Posts: 12,822
    edited May 2015

    @As Of Latte said:
    But, if I import all images at 72dpi, will this increase the performance speed of my game?

    No (with caveats).

    @As Of Latte said:
    Also, will this lower the quality appearance of my game?

    No (with caveats).

    I have imported several images at 300dpi. I am trying to optimize my game for better performance, as it takes about 5-6 seconds to load the next scene...

    "I have imported several images at 300dpi" doesn't actually convey anything useful, it could mean anything.

    . . . . . .

    Example:

    Q: I have a 100 x 100 pixel actor - the project is aimed at Retina devices - it has an image applied to it that is 300ppi - is this image a suitable size ?

    . . . . . .

    Another example . . .

    A 300ppi image at 1 inch x 1 inch = 300 pixels x 300 pixels.
    A 6,000ppi image at 1mm x 1mm = 236 pixels x 236 pixels.

    . . . so the 6,000ppi image is a little lower resolution that the 300ppi image, but without knowing that one is 1 inch and the other is 1mm we can't really say anything useful about resolution, simply saying I have an image that is XXXppi doesn't really tell us anything.

    . . . . . .

    One more example . . .

    A 30,000 pixel x 30,000 pixel image at 1 pixel per inch is 30,000 pixel x 30,000 pixels.

    A 30,000 pixel x 30,000 pixel image at 300 pixel per inch is 30,000 pixel x 30,000.

    Both images are identical, 30,000 pixels x 30,000 pixels.

    . . . . . .

    I'd completely ignore ppi values and simply work at absolute pixels values, if you have an actor that requires a 240 x 240 pixel image, then simply make your image 240 x 240, the ppi is irrelevant (other than a tiny piece of metadata that helps software like GS interpret the intended size correctly).

  • As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343
    edited May 2015

    Thanks for the feedback @Socks !

    To be more specific; I've designed my project at 1536 x 2048 pixels, iPad resolution and scaled down for smaller devices, with help of a universal build. The images I've imported into my project are at least 72dpi but many are at 300dpi. (Several background images are at 1536x2048, 300dpi). I even have gradients and transparent images. Also, images were saved as .PNG files. My current project size is 40MB and does include some sound files.

    I've been trying everything to optimize my game as it has major lag issues...Almost 5-6 seconds between each scene.

    Some of the major steps I've taken include; Removing all timers, and using ImageOptim software to remove unnecessary metadata from images. Also, several other small techniques were taken, such as removing excess code, setting physics to 0...etc.

    I am at a loss on how to speed up the performance of my game. :(

    Via Test Flight and the GS Viewer, I've tested on iPad air, iPad Mini, iPhone 4s, iPhone 5 and iPhone 6. As well as my Mac Mini, which I am creating my game on.

    Any advice, would be greatly appreciated!

  • SocksSocks London, UK.Member Posts: 12,822
    edited May 2015

    @As Of Latte said:
    To be more specific; I've designed my project at 1536 x 2048 pixels, iPad resolution and scaled down for smaller devices, with help of a universal build.

    You shouldn't really have to scale anything down, that should be handled by GameSalad's (really rather comprehensive) publishing server magic ?

    @As Of Latte said:
    The images I've imported into my project are at least 72dpi but many are at 300dpi. (Several background images are at 1536x2048, 300dpi).

    Like I say, saying something is 72ppi or 300ppi (without context) doesn't actually mean anything. The following images are absolutely identical, they have the same number of pixels, the same image quality, they take up the same amount of disk space, the same amount of RAM, they have the same impact on performance, they will look the same on screen (etc etc):

    A 1536 x 2048 pixel background image at 1 ppi
    A 1536 x 2048 pixel background image at 300000000000 ppi
    A 1536 x 2048 pixel background image at 19.82 ppi
    A 1536 x 2048 pixel background image at 400 ppi
    A 1536 x 2048 pixel background image at 2 ppi

    Changing the ppi of a 1536 x 2048 pixel image is similar to changing the name of a 1536 x 2048 pixel image, you can do it, but it won't have an effect on the image itself, a 1536 x 2048 pixel background image called "Jungle Forest" renamed to "Jungle Forest with Trees" and then re-imported will look identical to the file called "Jungle Forest".

    I have a question . . . .

    I have 2 images, an image that is 300ppi and another image that is 72ppi, which image is the larger (more pixels / higher image fidelity/quality) ?

    @As Of Latte said:
    I even have gradients and transparent images. Also, images were saved as .PNG files. My current project size is 40MB and does include some sound files.

    Not sure what any of that means (or how it is related the question) ?

  • As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343

    @Socks I apologize for my lack of knowledge in this department.

    I've been doing a lot of research and several users mentioned that pixel/image size can hinder the performance of a game. Some even mention transparency and gradients play into effect of load time.

    I appreciate your feedback as I would be trying to redo all my images, since I was uncertain.

    To continue further, if pixel size is not of concern to performance, can you recommend what I can do to optimize my game?

    I thought for sure it was something to do with my images, but after reading what your wrote, I am even more at a loss...

  • SummationSummation Member, PRO Posts: 476

    @As Of Latte said:
    But, if I import all images at 72dpi, will this increase the performance speed of my game? Also, will this lower the quality appearance of my game?

    I have imported several images at 300dpi. I am trying to optimize my game for better performance, as it takes about 5-6 seconds to load the next scene...

    Any advice :# ?

    Have you tried unticking the "Preload Art" option on some of your actors with images, or tried having a spawner that spawns the images after the scene has loaded?

  • As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343

    @Summation I have tried unchecking the "preload art" option on most of my actors with images and I do spawn several actors after the scene has loaded :(

    Thanks for the suggestions!

  • SummationSummation Member, PRO Posts: 476

    @As Of Latte said:
    Summation I have tried unchecking the "preload art" option on most of my actors with images and I do spawn several actors after the scene has loaded :(

    Thanks for the suggestions!

    Just out of curiosity, how long does it take a blank scene to load?

  • As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343

    @Summation Just tested loading to a blank scene (via the GS Viewer) and blank scenes do seem to load much faster! (However the loading wheel does pop up for about a second).

    I believe you're onto something! Do you recommend I possibly clear more of the actors from my scenes that take longer to load?

  • SummationSummation Member, PRO Posts: 476

    @As Of Latte said:
    Summation Just tested loading to a blank scene (via the GS Viewer) and blank scenes do seem to load much faster! (However the loading wheel does pop up for about a second).

    I believe you're onto something! Do you recommend I possibly clear more of the actors from my scenes that take longer to load?

    For me it's just a matter of testing a scene image by image until you achieve the load times you want.
    If you have a hard limit on acceptable load times, then that's the number of images you can place.

  • As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343

    @Summation That is a good approach to building a scene! I would prefer load time to be almost instant... :# This may be a tricky puzzle to solve with several actors per scene.

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    I would prefer load time to be almost instant...

    Depending on the game type you are creating you could consider building all of your game levels in one giant scene. That way the only load time would really be at game launch and load of the one scene. I've never done this but I know it's been done by several people here on the forums to avoid long level load times.

  • SocksSocks London, UK.Member Posts: 12,822
    edited May 2015

    @As Of Latte said:
    . . . . several users mentioned that pixel/image size can hinder the performance of a game.

    Absolutely ! Image size can effect a game's performance, a 4,000 x 4,000 pixel image is going to be much harder on a processor than a 400 x 400 pixel image.

    @As Of Latte said:
    Some even mention transparency and gradients play into effect of load time.

    I can see an argument for transparency effecting loading time (although I'm going to guess the loading time difference between a 24bit and 32bit image would be fractional), but the idea that a gradient would effect load time is nonsense, lol ! (although I'm happy to be shown why this is the case).

    @As Of Latte said:
    To continue further, if pixel size is not of concern to performance, can you recommend what I can do to optimize my game?

    I'm not sure what you mean by 'pixel size' - as far as I understand it pixels are 'picture elements' and have no size.

    You didn't answer my question ! It might be useful to the conversation if you were to answer it.

    Q: I have 2 images, an image that is 300ppi and another image that is 72ppi, which image is the larger (more pixels / higher image fidelity/quality) ?

    @As Of Latte said:
    I thought for sure it was something to do with my images, but after reading what your wrote, I am even more at a loss...

    Your issues could well be something to do with your images, I've just made the point that 'ppi' is irrelevant without context.

  • ant_ladant_lad Member Posts: 222

    @jamie_c said:
    Depending on the game type you are creating you could consider building all of your game levels in one giant scene. That way the only load time would really be at game launch and load of the one scene. I've never done this but I know it's been done by several people here on the forums to avoid long level load times.

    This is how Metal Slug was done, very long scenes. A second for a separate area, like jumping into a sub and fighting through it

Sign In or Register to comment.