How do I optimized the spawn object ?

0 favourites
  • 3 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • 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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)