Optimisation work-arounds (avoiding constrain etc)
HoneyTribeStudios
Member Posts: 1,792
Hi, I'm new to Game Salad. I'm making my first games and have been reading the forums to make sure that my finished games will run as smoothly as possible with quick loading times.
From what I can gather I should avoid using timers, constrain attributes and spawning.
Does anyone know if 1 constrain attribute + multiple change attributes that are triggering every 0.1 seconds will be any more resource efficient than using multiple constrains? I'm thinking to make a global attribute 'modulo_0.1' and constrain it to game.time%0.1
Then whenever i wanted to use a constrain attribute i was going to instead use a change attribute inside a rule: when 'modulo_0.1' = 0 change attribute abc to xyz. Which means every 0.1seconds the attribute will change.
Any thoughts?
Cheers
From what I can gather I should avoid using timers, constrain attributes and spawning.
Does anyone know if 1 constrain attribute + multiple change attributes that are triggering every 0.1 seconds will be any more resource efficient than using multiple constrains? I'm thinking to make a global attribute 'modulo_0.1' and constrain it to game.time%0.1
Then whenever i wanted to use a constrain attribute i was going to instead use a change attribute inside a rule: when 'modulo_0.1' = 0 change attribute abc to xyz. Which means every 0.1seconds the attribute will change.
Any thoughts?
Cheers
Comments
Then a 'modulo_2' attribute is constrained to tempo%2
Then the rule: when modulo_2 = 0 is used to change attributes.
So it works fine, but the question is, will this be better for cpu/memory usage than using multiple timers and constrains?
Do it both ways, run it on the GS viewer on your device and monitor the stats that come through.
...
Oh and post your results... :-)
Intuitively it feels like performance should improve with the above method as timers, constrains and the number of rules can all be reduced.
If anyone else already knows please speak up!