Ideas for Optimization - Windows Mobile

You must understand the Game Editor concepts, before post here.

Ideas for Optimization - Windows Mobile

Postby OmniArts » Wed Sep 02, 2009 1:25 am

For optimizing a game for Windows Mobile.. please read on

General
-----------
-Activation Regions
-Lowest Sound quality - 11025 Hz
-Keep view movement to the minimum -- don't make the player its parent
-Keep your Code Clean!!
-Beware of collisions!! They will lag your game

Images
-----------
-Decrease the size of each image
-Slice Images up in GIMP or PS
-Try not to overlap Environment Images

Animations
---------------
The amount of frames you have in your animations really isnt a problem (I have 2000 frames in my game) but make sure you keep your images small.
If you want to get your images smaller try decreasing the color depth!

Bee-Ants Tricks
---------------
Turn off activation out of vision.
Avoid mega cloning usage (clone more than 500)
Use narrower view
Use multifunction actor
Avoid too much of collision usage
Use midi for the music


Any more suggestions would be helpful.
Last edited by OmniArts on Tue Oct 13, 2009 2:22 pm, edited 3 times in total.
User avatar
OmniArts
 
Posts: 134
Joined: Sat May 30, 2009 2:30 am
Location: Sydney
Score: 16 Give a positive score

Re: Ideas for Optimization

Postby Chai » Wed Sep 02, 2009 2:54 am

For background picture, .JPG is better than .GIF
Resize the picture as small as possible.
User avatar
Chai
 
Posts: 361
Joined: Sat Apr 30, 2005 2:26 pm
Location: Thailand
Score: 30 Give a positive score

Re: Ideas for Optimization

Postby cforall » Wed Sep 02, 2009 12:08 pm

:D
If you use .PNG, try to use png optimization tools like PngOptimizer/PNGOUTWin...
most of these tools use diferent algorithm , so use 2 or more tools to make your image smaller~
User avatar
cforall
 
Posts: 65
Joined: Thu Aug 06, 2009 2:46 pm
Location: Shanghai
Score: 8 Give a positive score

Re: Ideas for Optimization

Postby Hblade » Wed Sep 02, 2009 1:20 pm

cforall -
You dont realy need a PNG Optimizer, simply use the gimp, click save ass, then of course png, then you have all of these selections. Uncheck them all, and an image thats, say 640 X 480 will be like, less then 1 KB
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Ideas for Optimization

Postby OmniArts » Wed Sep 02, 2009 2:45 pm

oh really? Damn I should be switching to Gimp :)
Our character images are around 80 x 80 and currently 4~5kb, but I will give this a try!
User avatar
OmniArts
 
Posts: 134
Joined: Sat May 30, 2009 2:30 am
Location: Sydney
Score: 16 Give a positive score

Re: Ideas for Optimization

Postby Hblade » Wed Sep 02, 2009 3:12 pm

Ok. Heres an example
tran screen.png

With transparrency - 50-KB
Here's one without transparrency
trans2.png
trans2.png (985 Bytes) Viewed 4019 times

It's less then 1 KB
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Ideas for Optimization

Postby cforall » Thu Sep 03, 2009 1:21 am

Hblade wrote:Ok. Heres an example
tran screen.png

With transparrency - 50-KB
Here's one without transparrency
trans2.png

It's less then 1 KB

OK :mrgreen: :mrgreen: :mrgreen:
I just never heard this before,
I will try,
Thx~
User avatar
cforall
 
Posts: 65
Joined: Thu Aug 06, 2009 2:46 pm
Location: Shanghai
Score: 8 Give a positive score

Re: Ideas for Optimization

Postby Hblade » Thu Sep 03, 2009 2:19 am

Ok :D Glad to help. I'd say this is probably one of the top 3 ways to imporove Game performance
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Ideas for Optimization

Postby OmniArts » Thu Sep 03, 2009 3:43 am

well, I have used gimp, compression level 9 and unchecked all the boxes, but my image is still 2.7kb
Anything im doing wrong?
Attachments
dwarf_attack10020.png
dwarf_attack10020.png (2.72 KiB) Viewed 4005 times
User avatar
OmniArts
 
Posts: 134
Joined: Sat May 30, 2009 2:30 am
Location: Sydney
Score: 16 Give a positive score

Re: Ideas for Optimization

Postby Hblade » Thu Sep 03, 2009 3:49 am

Hmm, that is strange, your not doing anything wrong either. Well, I guess thats about as optimized as its gonna get :D
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Ideas for Optimization

Postby cforall » Thu Sep 03, 2009 6:55 am

:D Guys...I run a test with dwarf_attack10020.png to check the compression ratio... :D

1.
Firstly I use PngOptimizer to optimize (2790 bytes -> 2533 bytes) (90%)
and then I use PNGOUTWin to Optimize (2533 bytes -> 2497 bytes) (98%)
2.
Firstly I use PNGOUTWin to optimize (2790 bytes -> 2714 bytes) (97%)
and then I use PngOptimizer to optimize (2714 bytes -> 2533 bytes) (93%)
again I use PNGOUTWin to optimize (2533 bytes -> 2497 bytes) (98%)

I find many articles about "Gimp vs PhotoShop"
so I think Gimp may be good at image editing~but not good at image compression...
Attachments
dwarf_attack10020.png
dwarf_attack10020.png (2.44 KiB) Viewed 3999 times
User avatar
cforall
 
Posts: 65
Joined: Thu Aug 06, 2009 2:46 pm
Location: Shanghai
Score: 8 Give a positive score

Re: Ideas for Optimization

Postby OmniArts » Thu Sep 03, 2009 7:42 am

ah, finally. In Photoshop i "saved for web" and unchecked all the boxes, saved it as png-8 and selected 16 colors (i know that it's small but it really doesn't degrade it too much because of the images size)

But behold.. 926 bytes :)
Now I'm hoping I can get the script working properly in Photoshop so I don't have to this for every image lol
Attachments
dwarf_attack3.png
dwarf_attack3.png (926 Bytes) Viewed 3995 times
User avatar
OmniArts
 
Posts: 134
Joined: Sat May 30, 2009 2:30 am
Location: Sydney
Score: 16 Give a positive score

Re: Ideas for Optimization

Postby Hblade » Thu Sep 03, 2009 2:31 pm

Now that its 16 bit try again in Gimp it'll probably be like 30 bytes xD
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Ideas for Optimization

Postby OmniArts » Thu Sep 03, 2009 4:54 pm

I just got the image down too 800 bytes, thats decent for me.
Well just to update on my optimization progress.. the game is working wonders now, the image compression helped a little, but what really got the game running fine was the removal of our collision barrier (which kept u inside the arena) So I need to think hard on a work-around for this!
User avatar
OmniArts
 
Posts: 134
Joined: Sat May 30, 2009 2:30 am
Location: Sydney
Score: 16 Give a positive score

Re: Ideas for Optimization

Postby Hblade » Thu Sep 03, 2009 5:04 pm

Theres another way to stay inside the arena. ok, what ever key moves your character, say... left, you'd say, if (x>areana.x) { x = x - 4; } this would make the character move left ONLY when he's in the arena, when he reaches the arena's X he stops moving :D
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Next

Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest