mohasad

hi ,
i ave been in developing a game for windows mobile 5.0 smartphone .. i am using visual studio 2005 to develop the application .
i have used Image Attribute class for setting transparency by following method.
SetColorKey(getPixe(0,0));
my application is having the following problems:
1. i am using double buffering concept , the application is slow while handling keypress . what are the method to make it fast .
2. in windows mobile 5.0 emulator , the white color in the images had become transparent .
3. . i am using more than 11 .png images , around 74 kb size .
when i open the the .exe file inside the bin folder , the .exe file is showing outof memory exception . but the build is running well in all the emulators .
could any one help me in solving the above issues .
thanks
sadiq



Re: Smart Devices VB and C# Projects regarding the application speed

AlexY

It would be really hard to provide help without seeing the code.



Re: Smart Devices VB and C# Projects regarding the application speed

mohasad

hi alex,
what are the things make the application much slow .

thanks
sadiq





Re: Smart Devices VB and C# Projects regarding the application speed

Michael Koster

Hi Sadiq

That higly depends on your application. Without seeing your code we cant do much.

There are a fair number of resources dealing with optimizing .NET CF application performance.
MEDC 2006 had some sessions dealing with performance (download the contents via Microsoft Downloads)
There are articles on MSDN here: http://msdn2.microsoft.com/en-us/library/aa127190.aspx

Michael






Re: Smart Devices VB and C# Projects regarding the application speed

gtamas

Hi,

i suppose you include the pngs in your project. if it is so... don't do it. just load them dinamically, on demand.. it makes your app start faster, and you even get out of memory so easy.

Another cool tip: Remote performance monitor (included in CF2.0 SP1)

http://blogs.msdn.com/stevenpr/archive/2006/04/17/577636.aspx




Re: Smart Devices VB and C# Projects regarding the application speed

gtamas

a realy performance killer is boxing/unboxing, so beware of codes like this:


private long number = 4;
private string myString = "4";
public long GiveMeMyValue( object AnyValue )
{
if ( AnyValue is long ) return AnyValue as long;
else if ( AnyValue is string ) return long.parse ( AnyValue as string );
}





Re: Smart Devices VB and C# Projects regarding the application speed

mohasad

hi ,
my application is a game oriented .so all the images should be loaded initially . what to do in this case .
thanks
sadiq





Re: Smart Devices VB and C# Projects regarding the application speed

gtamas

Anyway i would suggest you to load them dinamically, and not include them in the source. If they are included in the source they would make the start extremly slow. You can just include some basic images (signalise processing), display them to the user and load the images you need. It is a better user experience if the application is displayed fast and start doing something.
I don't know the design of your applikation, but do you really need all the pictures already by starting the application, or may be there are some of them which used only on a later stage of the game Or maybe just in a specified context
Anyway, such a solution will speed app your application start.




Re: Smart Devices VB and C# Projects regarding the application speed

mohasad

hi gtamas,
actually in my application , there is a speed limitation in not only during application start , but when i a handle the keypress also , the application is responding very slow.

thanks
sadiq