Replicate is bad for your health !

POMPOM Member Posts: 2,599
edited November -1 in Working with GS (Mac)
Just wanted to share something i just figured out ,
I'm currently working on a game that has a very long scene , i have a repeated background ,
What i did was replicating the background (about 10 times) to the right .
i had terrible performance (30-40 fps) and all day long i blamed it on my movable actors and tried to optimize them , after no success in improving performance , i started eliminate all kind of stuff in the game to find what caused it , eliminating the background with only the replicate behavior , made my fps jump to 55-60 !

So yeah , you may use replicate for small images i guess , (not sure about performance there) but DO NOT REPLICATE BIG IMAGES like backgrounds, otherwise you end up going nuts like i did finding what causing fps drop !

Cheers
Roy.

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Interesting, I have never thought of using it for Backgrounds only small things. Never had any issues with the small actors. Its kinda weird it would hurt performance though since all it does it duplicate the image and nothing else. it should use no extra ram cause the image is already loaded and once its duplicated I would think it really wouldn't use any extra processor either.
  • POMPOM Member Posts: 2,599
    tenrdrmer said:
    Interesting, I have never thought of using it for Backgrounds only small things. Never had any issues with the small actors. Its kinda weird it would hurt performance though since all it does it duplicate the image and nothing else. it should use no extra ram cause the image is already loaded and once its duplicated I would think it really wouldn't use any extra processor either.

    Yes thats exactly what i was thinking ! thats why i used it , but the fact is , that in real life test it make a huge fps drop (at least in my project) , the ram stay the same cause its the same image,
    but it consume fps .
    tshirtbooth said:
    Hey POM

    Leap frog your BG images.

    Have 2 copies on your bg image one in the main section and one to the right of it.
    Then give them a rule that says when the one on the left is out of frame move it to the front of the other one.

    just like a leap frog.

    hope that helps

    cheers

    Exactly what I'm about to do , thank TSB !

    Roy.
Sign In or Register to comment.