one optimization technique question

For questions about using Classic.

Post » Wed Jul 22, 2009 6:24 pm

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
B
24
S
7
G
3
Posts: 138
Reputation: 2,795

Post » Wed Jul 22, 2009 6:52 pm

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.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Wed Jul 22, 2009 6:53 pm

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.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Wed Jul 22, 2009 10:14 pm

[quote="Davioware":2qtfuar5]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.[/quote:2qtfuar5]
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..
B
24
S
7
G
3
Posts: 138
Reputation: 2,795

Post » Wed Jul 22, 2009 10:40 pm

[quote="hellwalker":2j4lu0d4].cap files grow pretty big with its uncompressed .png sprites[/quote:2j4lu0d4]
PNG is a compressed format!

[quote:2j4lu0d4]Less size of .exe file, if that Actually gives any ram or speed boost.[/quote:2j4lu0d4]
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.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Wed Jul 22, 2009 11:59 pm

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 :D 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.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Thu Jul 23, 2009 12:26 am

[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[/quote:1vz97o7i]

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.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Thu Jul 23, 2009 12:48 am

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.
B
24
S
7
G
3
Posts: 138
Reputation: 2,795

Post » Thu Jul 23, 2009 9:02 am

PNG is de facto standard, though. Lossless quality, good compression?
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Thu Jul 23, 2009 9:44 am

How do you get an alpha channel into a jpeg?
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests