Optimisation work-arounds (avoiding constrain etc)

HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
edited November -1 in Working with GS (Mac)
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

Comments

  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    Ok, just the above doesn't work, first i have to make an integer attribute. call it 'tempo'. A timer is set to add 1 to this integer every 0.01 secs.

    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?
  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    someone else may know already, but otherwise...

    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... :-)
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    I'm yet to sign up as an apple developer, but yeah, when i do that I'll be able to test the 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!
  • Sunny_1etha1Sunny_1etha1 Member Posts: 41
    I'd love to hear an informed answer on this, too…
Sign In or Register to comment.