Hi Everyone,
As I work on my current project, it has become apparent that I really don’t have a way to evaluate which things I should skimp on because they are going to overburden the system. I need some heuristic help with decisions I make with regard to memory, processing and system performance. I’m looking for some rules of thumb that have worked for other developers to establish a basis for my system performance decisions. For instance:
Should I reduce the number of joints in my physics bodies or should I simplify my animations?
How much strain do multiple timers and event listeners place on the system?
When should I use sprites and when should I use system display vectors with transition.to( ) functions to maximize performance?
I know the answer is often “it depends” but I’m curious how you all make decisions about optimizing performance.
OK, here are some more solid questions:
A.
When adding simple geometric shapes to your project as physics bodies, how do you decide whether it is better to go with images - displaynewImageRect() or system display vectors - display.newRect()?
B.
With regard to physics bodies, how much drag do weld joints place on the system? As weld joints don’t seem like they add a lot of overhead to physics calculations, I’m hoping the answer is that they have a negligible effect on performance as the world I’m envisions will require hundreds of them!
C.
If I have multiple physics bodies fused together with weld joints is there any memory or performance advantage to defining them as one complex body? How much memory / processor drain will those extra event listeners cost me if I track the physics bodies separately?
D.
I find myself in a situation where collision filters won’t suffice and I want to use multiple invisible physics sensors to track collisions. How much of a drain on system resources will this approach create? I’m working on 2-3 sensors with event listeners on each body and at least 100 bodies. Am I expecting too much out of iOS and Android or does this seem reasonable?
E.
Animations! We’re talking about many, many fade-in / fade-out animations of simple geometric shapes. How would you decide whether to use system display vectors with fades orchestrated by transition.to( ) functions or sprites.
F.
Timers! My current project will have hundreds of timers. Each timer will have a cycle of 1 - 10 seconds and trigger a body to perform an action determined by its current state (I’m building an AI State Machine to handle this). Am I nuts to think iOS and Android devices can handle this craziness? Am I pushing past some rule of thumb I don’t know about?
Thanks for taking a look and I eagerly await your practical advice.
Jonathan