Spawn Actor problem

hi

I am developing shooting game for Android and IOS.
This game creates enemies and background tiles during the play.

On average, it creates 10 actors per 3 seconds.

-result-
Iphone 6s : very good performance.
Iphone 4s : Crash
early Ipad3 : There is a frame drop, but it is good.

LG G stylo : bad performance.
LG g3 beat : very bad performance.
galaxy note 2 : bad performance

The cause of this problem is frame dropping when an actor is created in Android.
It is the same without image. (just rectangle actor)
Is there a frame drop when spawn actor on Android?

or What are the behaviors that drop the frame?
I mainly use Move, interpolate, Animation, constrain.

Actors condition.

pre-load art : false
physics : 0
collision shape : custom shape
moveable : true

In another experiment, I created three actors per second and then dropped them.

Actor condition

rectangle.
size w.54, h.100
behavior
move 270 degree 150 speed.
self.position y < 0-(self.heght*2) = destroy.

Frame drop occurred every 5 seconds on average. (There are a total of 15 actors on the screen.)

Test device : lg G style
Qualcomm Snapdragon 410 MSM8916 SoC. ARM Cortex-A53 MP4 1.2 GHz CPU, Qualcomm Adreno 306 GPU
1.5gb ddr Ram

Is there a way to solve it?

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    What are the behaviors that drop the frame?

    I mainly use Move, interpolate, Animation, constrain.

    Behaviors that fire repeatedly such as Move, Interpolate, Animation, Constrain, and Timer will negatively affect performance. So if you're spawning AND doing several of those, that could be a problem.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • creview.jo@gmail.comcreview.jo@gmail.com Member, PRO Posts: 12
    edited April 2017

    @tatiang said:

    What are the behaviors that drop the frame?

    I mainly use Move, interpolate, Animation, constrain.

    Behaviors that fire repeatedly such as Move, Interpolate, Animation, Constrain, and Timer will negatively affect performance. So if you're spawning AND doing several of those, that could be a problem.

    Thanks for your advice.
    I have more question.
    Is this same case?


    I spawn three actors per second and then dropped them.

    Actor condition

    rectangle.
    size w.54, h.100
    behavior
    move 270 degree 150 speed.
    self.position y < 0-(self.heght*2) = destroy.

    Frame drop occurred every 5 seconds on average. (There are a total of 15 actors on the screen.)

    The result was the same if spawn one actor.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    If you have 15 actors in a scene ONLY using the Move behavior, I wouldn't think that's too much for the engine to handle but again, if you have other behaviors that I mentioned (e.g. constrain, etc.) included in those actors, you could easily have an issue.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • creview.jo@gmail.comcreview.jo@gmail.com Member, PRO Posts: 12
    edited April 2017

    @tatiang said:
    If you have 15 actors in a scene ONLY using the Move behavior, I wouldn't think that's too much for the engine to handle but again, if you have other behaviors that I mentioned (e.g. constrain, etc.) included in those actors, you could easily have an issue.

    those actors have only move and destroy behaviors.
    iOS do not have that issue.
    only android...

    It is test video

    thanks for your comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    I wish I could help you with Android but I only develop and test on iOS.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • creview.jo@gmail.comcreview.jo@gmail.com Member, PRO Posts: 12

    @tatiang said:
    I wish I could help you with Android but I only develop and test on iOS.

    I posted a test video on the above comments.

    I sent an email to GS engineer about this problem.
    I will leave a comment when the result comes out.

    Thank you.

Sign In or Register to comment.