Pages: 1
Topic closed
I've always wondered if when you create more scripts, whether that affects your project in any way (e.g. makes it lag, more memory etc.). Often I end up creating more complex scripts instead of simpler ones because I'm worried that too many scripts would have some affect. For example, I would write this:
when gf clicked set [game] to [0] switch to costume [1] forever if <(timer) = [10]> set [game] to [1] end if <[game] = [1]> switch to costume [2] say [game over] end endthanks
when gf clicked switch to costume [1] forever if <(timer) = [10]> broadcast [game over] end end when I receive [game over] switch to costume [2] say [game over]
Offline
trinary wrote:
In my experience, combining scripts will cause less lag overall, but slower response times.
I think the reason it decreases response times is because longer scripts obviously take longer to execute, so it'll take longer to reach the boolean. (That is what you mean, right?
)
Offline
trinary wrote:
In my experience, combining scripts will cause less lag overall, but slower response times.
By response times, I believe trinary means the time it takes each individual script (if they were seperate) to act, given a condition.
For instance:
when gf clicked forever if<condition1> script 1 end if<condition2> script 2 endThis script will have less lag overall, but script 1 and script 2 will be slower to react when their respective conditions are true, especially if one of them was already activated (because the script has to execute the accepted script before checking the conditional of the other one.
Last edited by MoreGamesNow (2012-04-13 18:40:54)
Offline
RedRocker227 wrote:
trinary wrote:
In my experience, combining scripts will cause less lag overall, but slower response times.
I think the reason it decreases response times is because longer scripts obviously take longer to execute, so it'll take longer to reach the boolean. (That is what you mean, right?
)
That is what I mean.
Offline
Topic closed
Pages: 1