Do unused behaviors take up ressource/slow down the game?

Just started using Construct 2? Post your questions here

Post » Fri Dec 19, 2014 9:54 pm

Let's say I want platforms that move and some that don't using the Sine behavior.

-I could either make 2 different object types, one with the sine behavior and one without the sine behavior.
-I could also have just one type of object, with the sine behavior, and to platforms that don't move put all the "Sine stuff" to 0 (or just disable the behavior on them).

So my question is simple: are platforms with Sine behavior set to 0 (doesn't move) taking any more resource than a platform with no sine behavior at all?
B
10
S
3
G
1
Posts: 25
Reputation: 803

Post » Fri Dec 19, 2014 9:57 pm

I think they get loaded in ram, but not used.
B
10
S
1
Posts: 54
Reputation: 677

Post » Fri Dec 19, 2014 10:00 pm

A behavior sine with a magnitude of 0 still takes up calcul time, to be exact, even disabled behavior take up calcul time.

however, that will matter only when a lot of objets are concerned ("a lot" depending on the target platform, but I would say under 100 you should not see much difference, but test it.)
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
52
S
22
G
18
Posts: 2,122
Reputation: 17,093

Post » Fri Dec 19, 2014 10:06 pm

Thanks for the quick replies!

I don't think I'll have as much as 100, but even if it won't make much difference, I'd rather stay safe and optimize it. :)

Thanks again!
B
10
S
3
G
1
Posts: 25
Reputation: 803

Post » Fri Dec 19, 2014 10:26 pm

thnx @Aphrodite good to know.
B
10
S
1
Posts: 54
Reputation: 677

Post » Fri Dec 19, 2014 11:06 pm

It's a give and take though, you may use a fraction less memory but you'll also have more objects which means bigger download etc.
B
60
S
20
G
56
Posts: 1,077
Reputation: 35,941

Post » Sat Dec 20, 2014 12:15 am

Phenom wrote:Thanks for the quick replies!

I don't think I'll have as much as 100, but even if it won't make much difference, I'd rather stay safe and optimize it. :)

Thanks again!


the point was "the optimisation at this scale is probably a waste of time, as something else would probably eat more ressources", I said 100 but it would not surprise me if even at 1000 it would not be a big deal compared to other things that might happen in a game.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
52
S
22
G
18
Posts: 2,122
Reputation: 17,093

Post » Sat Dec 20, 2014 1:40 am

Yeah but even if it's just a little bit, a bit here and there at the end can add up if I let every single little thing pass. Didn't take much time to change anyway, so all good.
B
10
S
3
G
1
Posts: 25
Reputation: 803


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest