Objects on layouts vs. event creation

Discussion and feedback on Construct 2

Post » Wed Apr 24, 2013 5:32 pm

Just a clarification, did you mean gpus don't render what's NOT currently on the screen? On a side note while they may not render it on the screen at the time if it is already in the layout vs created on the fly it will still be using memory until destroyed regardless of it is currently being rendered, though this should be a much smaller hit on memory for instances.
Posts: 1,833
Reputation: 14,648

Post » Wed Apr 24, 2013 6:44 pm

@Excal, I think that would really only benefit you if you had 1000s of objects on the layout. Every little bit of optimisation helps with mobile devices though, so even if you had 500 or so objects, it may help. I'm not sure my idea would even make a difference tbh. It was more of a suggestion to try if you had problems when you started on your next game. Obviously, as has been pointed out, you're going to have other issues, like stuttering.

If I have the time, sure, I'll pitch in when you're ready to see if we can come to some solution if you have performance issues. I've never needed to optimise because I usually only do smaller games on desktop, but that's not to say it wouldn't come in handy when I do create a game with a large layout with a lot of objects to track!

Sometimes the best optimisations come from rethinking the game design. In your case, adding something like motherships / bases where the enemy won't fly further than some distance away from said mothership / base. JoyfulDreamer's distance suggestion gave me that idea. You can destroy enemies not in the current zone, and because you've limited how far they can travel, you don't need to worry about storing ship coords etc when entering a new zone. So that way you can limit the enemies to different zones, while retaining a huge level, and no need for complicated code ;p
Posts: 876
Reputation: 5,650


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 1 guest