Would centering objects like this slow my game down?

Hello, I am fairly new to Gdevelop. I am making a game for mobile platforms. I have started with a scene that’s 1280x720. I want it to be able to scale for several different devices, while my buttons stay where I want them, and text is centered. I have ‘Activate Full Screen’ on.

My question is, if I center and move objects like this (code included), will it negatively effect the performance of my game? Do I need to worry about it at all?

Any advice would be helpful, thanks for your time.

Hi @Seth12. As far as I know, this shouldn’t affect the performance too much.

It shouldn’t impact it, but note that unless you’re constantly moving/changing those objects sizes, you can add a “trigger once” condition and it’ll use even less resources.

1 Like

Thank you both for your replies. I don’t need to change or move these objects, so I definitely will be adding a ‘trigger once while true’ condition. Right on, thanks Silver-Streak.

Would the same be true for the events I have in the condition ‘at the beginning of the scene’?

No, you don’t need a Trigger Once with At the beginning of the scene because the beginning of the scene only happens once.

1 Like

Yep, that makes perfect sense. Yesterday was a really long day for me, Thanks Mixen.

If I’m not mistaken, there is also a “Change the Position” Action that will change both the X and Y coordinate in one Action (instead of two actions for each Object as you have in your screenshot).

I just looked, there sure is! It’s just called Position. That would have made it much faster to implement. Do you think that event would use any less resources?