Hi,
I try to rotate an active object by changing the angle, in mmf2 and Flash it runs great, in IOS it turns very slow.
What can be the problem?
Printable View
Hi,
I try to rotate an active object by changing the angle, in mmf2 and Flash it runs great, in IOS it turns very slow.
What can be the problem?
Slow in game or slow in the emulator?
I'm rotating on a 3g and it was fine, so need a bit more information please :)
size of image/animation frames etc.
I say its either the size of the objects or the visual characteristics of an active object, such as alpha channels.
I think its important to keep in mind that too many alpha channels may cause minor slowdowns (That's something I experienced with VTA..). I suggest you keep to a minimum as possible or you can try the color reduction with the objects and see how it works.
It's running slow in simulator, it's the only object that rotates for a short time in the game.
The object is about 64x40 pixels, so not that big, don't remember exactly as I am not at home now.
The simulator in xcode might not be the best test environment.
Nothing beat actually getting my creation on to the device to really see if it was running correctly or not.
Perhaps its better now but this was with older versions of xcode.
Tested now on iPhone4, same speed as in simulator.
The object size is 64x85 pixels.
Don't know where to look now.
Maybe upload an MFA example so people can see what your doing?
Make sure you have the test mode set to release and not debug mode!
The file is much too big to upload, but I tried around and found out the following:
The more static images there are, the slower the rotation gets.
So I deleted almost all of the images and then it's ok.
Same problem if I use actives or backdrops, jpg or png.
Could just be overloading iOS
In the help there are some tips about optimizing your creations the devices do have a limited amount of CPU power and memory so you have to be concerned about your game design.
How many animation frames do you have, or is it just that one. In Whackem World Tour, my single frame was quite large and rotates perfectly fine.
I only have one active rotating, all the other actives are static. While rotating I only calculate two different Random Numbers, nothing else.
The zip file from mmf2 is 35MB.
I tried to reduce the image files in length, didn't help.
The following static actives are present:
2 of 720x600
5 of 200x200
2 of 500x400
the rest are small ones
these are not all in the visible area but outside.
Too many large actives will slow down your game.
As you would expect the hardware makes a huge difference.
My first game runs like a dog on my 3G (I've optimized it to hell now, and it's playable but definitely quite slow). But it runs flawlessly and silky smooth on my friend's 3rd gen ipod touch.
I recommend reading the 'things to know' section on the help file to learn how to squeeze the best performance out of your app.
Does it make a difference if I take an active or backdrop to show a simple graphic, or another format as png?
What is the best setting for the frame rate?
2 of 720x600
5 of 200x200
2 of 500x400
Thats quite alot of sizes for static actives?
Your making stuff for ipad as well as iphone then right?
Where possible merge images.
All images are increased to power of 2 on iphone etc.. so 720x600 is changed to 1024x1024... this means that single file alone is 4MB of memory (1024x1024x4 - if using alpha)... and you have two of them, so thats 8MB for two static actives. If i remember correctly.
Not sure if this is giving you any issues or not... what device are you trying to run it on
As a note the speed performances between a 3G and 4 is massive, and you do need to take care of alot of different things to make it run properly, for example if you have static background images as separates, make sure you make it into a single image where you can.
Jason
Yes, I try to port my flash game to iPhone4 and Ipad 1+2.
I thought that several smaller actives would be better, I try to put them together where possible tomorrow.
But there are still several outside the visible area which I position to the visible one while needed and which I couldn't merge.
720x600 is in fact the play area, so the 2 big files are 2 different background pictures.
The rotations themselves are very fast (hardware accelerated). What takes time it the rotation of the collision mask...
I don't suppose there's any way of turning off collisions for certain objects, layers or frames? Perhaps this is something for future versions, eg a no collision object or extra tick box next to fine detection called no detection - just a suggestion!
Hi,
just want to let you know that the problem is solved, it had nothing to do with the graphics but it was sound related.
The problem didn't appear in the flash version, neither in the exe version but only on the IOS.
The game runs now very smooth on the iPhone 4, even better than the PC and Flash Version in my oppinion (rotations and scaling)even without reducing my big actives.
Anyway, I learned a lot from your help for my future projects.
Lastly, big thanks to anybody who helped and Clickteam for the great job on the IOS exporter which let dreams come true!
I suspect that most active objects i have, don't ever need to use their collision mask. An option to turn them off and save some cpu would be great!