How do I optimized the spawn object ?

Get help using Construct 2

Post » Fri Apr 07, 2017 8:18 pm

Hello, and im already sorry for my english but:

How do i optimize the spawn/create object ?

I read: that if the object is on the layout it will be charged on start of layout but when i do that and create an object i have a huge lag spike.

(the object is an SPINE PLUGIN with everything correct)


In my game i need to create and destroy a lot of this "spine2dObject"


Thank's and sorry for my english have a nice day
B
11
S
3
Posts: 40
Reputation: 815

Post » Sat Apr 08, 2017 5:55 am

The object only needs to be on "a" layout somewhere in the project at the start of the initial layout. Once the start layout is loaded all sprite objects can be deleted and still be accessible via spawn. I use two methods myself. One for static sprites where I put them all in a family and on-start of layout destroy the family. Second are things that start with bullet or movement behaviors enabled. Sometimes I simply put them behind a killer sprite and have an on-overlap with killer sprite destroy them after start.

That said, I don't believe your lag is from your object creation... unless its massive. You may need to post your .capx to get to the root.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
71
S
19
G
8
Posts: 640
Reputation: 9,701

Post » Sat Apr 08, 2017 6:53 pm

Thanks for your answer,

I try every solution with put the object on layer but i thinks the best way i can do it is to teleport the object when dead (but dont destroy it) and Re-teleport it when needed but it seem to be really stupid.

I Found the problem, my object is a SpineAnimation Object 309ko of data are loaded everytime i create or spawn the object.

Sorry for taking your time have a nice day and thank you !!!!

Casimir
B
11
S
3
Posts: 40
Reputation: 815


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 20 guests