Page 1 of 1

Help to optimize!

PostPosted: Thu Jan 05, 2006 1:39 am
by Murd-Machine[_]
I have a "canvas" actor 320x240.
When I press down a mouse button on it I get variable "shoot" to become 1 (shoot=1;)
On mouse button up I have "shoot=0;"
Then my actor checks if shoot==1 then -/-/-/- (creating rockets, etc.)
The problem is: when I run it on PPC I have such a terrible slowdown even to 5 fps.
As I checked it is definetely not because of shooting (creating instances), but to my mind of checking mouse, that sounds strange... :?
Where is a problem?
Everything goes fine before I tap the screen. Even if I hold stylus it continues slowing even if I'm not shooting! :x
Would someone be so kind to help me.[/code]

PostPosted: Thu Jan 05, 2006 12:43 pm
by makslane
What's happen if you don't use the canvas actor?

PostPosted: Thu Jan 05, 2006 1:51 pm
by Murd-Machine[_]
if I use normal actor (big rectangle 320x240 with transp=9) it does the same.

PostPosted: Thu Jan 05, 2006 4:04 pm
by makslane
If you need a sensor to catch the clicks, it's better use a Filled Region actor.

PostPosted: Thu Jan 05, 2006 9:30 pm
by Murd-Machine[_]
I tried filled region. Works fine, but it slows down too. :?
May you would recommend me some other way to catch mouse clicks/to shoot when press mouse?

PostPosted: Thu Jan 05, 2006 10:58 pm
by mrdark7734
Were do you have the code, and how is it implimented that checks if shoot = 1 and then creates rockets?

PostPosted: Thu Jan 05, 2006 11:05 pm
by makslane
Murd-Machine[_] wrote:I tried filled region. Works fine, but it slows down too. :?
May you would recommend me some other way to catch mouse clicks/to shoot when press mouse?


I think you have problems with other things.
Can you send me the game executable?

PostPosted: Sat Sep 02, 2006 1:22 pm
by ericdg
I know this is on old topic, but in case you are still interested, using the stylus at all slows down the pocket pc around 20%.

It will be much faster to use hardware buttons, than onscreen buttons. It's probably not possible in your situation though.