Performance: Spawn or visibillity or animation.

Get help using Construct 2

Post » Wed Jul 16, 2014 2:25 pm

Visibility wouldn't be an option for me at all.
About spawning, the images are all loaded up anyway, you need to leave one instance of each object type at the layout for it to be able to spawn later, could possibly be an option but not a good practice, imagine controlling 72 sprites, can easily become a mess.
My choice would definitely be animation, it's easier to control and probably the best practice, you can also create a family for all the upgradable objects and use one logic for them all, something like: On Click 'Upgradable' > set frame to currentFrame+1
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Thu Jul 17, 2014 6:16 am

When spawning to avoid spikes use fade in top appear more smoothly and maybe don't spawn them all at the same time.
Black Bobby The Hole Greenlit with 303 votes.
B
35
S
8
G
1
Posts: 163
Reputation: 2,979

Post » Tue Jul 22, 2014 4:04 pm

Tried it with spawn and destroy....memory usage went from (in debug mode) 84,6mb to 30-40mb. Cpu lightly increases(1-2%) but for a point and click game
spawn and destroy definitely works great.
B
7
S
2
G
1
Posts: 77
Reputation: 727

Post » Tue Jul 22, 2014 5:17 pm

Use a variable that toggles (enables/disables) visibility & collision then reset animation and location/position
-Much more work but it'll save memory. Make sure all your textures are power of two & limit the amount of collision points where possible.
-Measure your fps and if your struggling with all that then see what sprites are taking up the most memory and make adjustments accordingly.

- Also try grouping the sprites so you don't have to list conditions & actions for each individual one
B
6
S
2
Posts: 151
Reputation: 1,366

Previous

Return to How do I....?

Who is online

Users browsing this forum: luck1210 and 7 guests