Will hiding actors that are not "onscreen" help performance?

bladeolsonbladeolson Member Posts: 295
edited November -1 in Working with GS (Mac)
As my main character moves through my game he will encounter many actors. Is it better performance to have these hidden until they are actually viewable? Does that make sense?

Any examples on how to do this would be appreciated.

Comments

  • synthesissynthesis Member Posts: 1,693
    Use an alpha setting as a "light switch" for an actor. Then put all of your routines inside a rule that checks if alpha=1. This way if the alpha is 0...it will be quiet.

    If you never need the actor for the rest of your scene...destroy it. Otherwise keep it around to recycle later. Its much better than spawning a new one.
  • bladeolsonbladeolson Member Posts: 295
    OK, yeah I generally have been using Alpha channel if I intend to bring an actor back and have been destroying them as main guy grabs a prize or such.

    What I am asking is a little different though..

    So I have a large map like 5000 tall and as the player jumps up is it better to hide or kill the scenery below? and vice verca when he goes down should I hide what is above?
  • synthesissynthesis Member Posts: 1,693
    Try avoid destroying actors unless you know you will NEVER need them again in the scene...otherwise reuse them or find way to reuse them (eg...same behaviors...or slightly adjusted...and a different character image). This will reduce spawning demands on the processor and keep gameplay fresh.

    I have not built a map that large...but I hear in some other posts that many are using "tiled" scenes and dumping tiles when they are no longer needed...or moving them to the top to allow continuation and to reduce the number of PNG files needed.
Sign In or Register to comment.