one optimization technique question

This forum is currently in read-only mode.
0 favourites
From the Asset Store
Footsteps SFX One contains 400 sounds of steps and jumps on different surfaces.
  • Ok, what I want to find out is, does it actually optimize anything.

    what I want to do is, build the level normally and when it's ready to be published.

    I want to replace all the graphics added in game with invisible one pixel[or original size transparent if this will sabotage placement] image, then create event sheet that will load graphics to sprites using load frame function. I mean to do this for static imagery.

    the obvious advantages I see are:

    Less overall size of the game, [if you have all your graphics as external .jpg or .dds], easier to download and digitally distribute. [size loss should be huge the way I see it, as .cap files grow pretty big with its uncompressed .png sprites]

    Less size of .exe file, if that Actually gives any ram or speed boost.

    The disadvantages:

    Your graphic files are open to public, especially if you use .jpg

    Will be hard to make any changes to level after this

    more tedious repetitive work to do

    there are probably more to both lists but thats what I want to find out.

    What differences are there for pre loaded spire and load frame function loaded graphics? any collision or layout loading time problems? any other disadvatages?

    thx in advance

  • Why would you would want to use lossy jpg's is beyond me. If anything this will slow your game down more than speed it up. Png's are pretty small to begin with, so I don't know what you are worried about.

  • Just the loading time, once loaded its the same as normal.

    If you're loading a lot of images you could do a progress indicator.

  • Why would you would want to use lossy jpg's is beyond me. If anything this will slow your game down more than speed it up. Png's are pretty small to begin with, so I don't know what you are worried about.

    uncompressed png stuff, I mean that image that is 200kb in jpg sometimes makes .cap 2~3mb larger.

    I'm working on a game with a bit highres images, kind of painted 2d backgrounds, 3d renders etc, not pixelated look. and I also want to make game playable on as low end pc-s as possible so..

  • .cap files grow pretty big with its uncompressed .png sprites

    PNG is a compressed format!

    [quote:2j4lu0d4]Less size of .exe file, if that Actually gives any ram or speed boost.

    It won't save RAM and it won't run faster. I'm not convinced it'll even change the load time because there is the same amount of work to do, just the data is in different files. To be honest, I wouldn't bother.

  • JPG does save in distribution size though. I could easily see myself doing that.

    Why would one want to use lossy jpgs? well, the same reason the whole world uses it as the primary image distribution format

    Come to think of it... I'll probably do it too I have a game that will use big backgrounds and I don't want the distribution getting all huge because of that.

    Won't make a difference performance-wise though, except at image load time.

  • [quote:1vz97o7i]Why would one want to use lossy jpgs? well, the same reason the whole world uses it as the primary image distribution format

    Yeah, primary for photos on the web, not for games. JPG compression is crap for games. It makes your graphics look like barf. Trading off a bucketload of image quality for just a few extra kb of compression is silly, if you ask me.

  • DDS is cool alternative to jpg, its small, fast and has lots of cool features.

    I messed with it some when playing around with morrowind editor.

  • PNG is de facto standard, though. Lossless quality, good compression?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • How do you get an alpha channel into a jpeg?

  • How do you get an alpha channel into a jpeg?

    jpg doesn't support alpha channels AFAIK...

  • How do you get an alpha channel into a jpeg?

    An excellent point that nobody else bothered to bring up

  • How do you get an alpha channel into a jpeg?

    1. Open it in Photoshop

    2. Press CTRL+ALT+SHIFT+S

    3. Under the file dropdown box, choose PNG24

    4. ?????

    5. PROFIT!!!

    ~Sol

  • <img src="http://upload.wikimedia.org/wikipedia/commons/d/d8/Jpg_pixel_cube_2x.jpg">

    JPG

    <img src="http://upload.wikimedia.org/wikipedia/commons/e/e6/Png_pixel_cube.png">

    PNG + it has alpha support

  • yeah actually.... jpg is designed for photos.

    If your image is not a photo it will probably look horrible in jpg.

    Only use jpg for high-res photo-like images that have no alpha and are to be loaded on runtime. For anything else go with PNG.

    I'm using jpg for photo background images

    Oh and you can control the compression error in JPG. Of course, as error is reduced, size approaches (and surpasses) that of a PNG.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)