Actors and performance

GuaveMediaGuaveMedia Member, PRO Posts: 1,262
Hey guys,

hope all of you had a great weekend, my parents used the 12.12 last week for their marriage.
But back to GS, I was wondering about a performance thing. Is it better to move actors out of the scene and set their alpha to 0 OR let them in scene and just colored 0. I have a big scene in height and have placed actors all the way up. Does it make sense to move them out and get them in when I need them or? I have set preload off and moveable also, I just want to speed up loading time since it takes a bit because I have many actors in it. Total memory usage is around 60-80mb.

Thx and all the best,
Alex

Comments

  • DanielDoeDanielDoe Member Posts: 307
    edited December 2012
    As far as I know and tested it's better to set self.graphicsVisible to 0, it's much more efficient that alpha. In some cases it's better to spawn actor that to keep him on the scene all the time. I like spaw behavour and in last 2 versions of GS I didn't notice any drop of performance during spawning.
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Sure non visible is better but is it possible to turn it on again with change attribute?
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    I am still having issues. You feel it when the spawn points are reached.
    I am having a platformer where I built levels up to a scene height of 6000.
    The platforms etc. have 8kb and backgrounds have 250kb. I can't resize the images anymore. How do you guys set up something like this? I just tried to use tables but when spawn points are reached there is a short lag.

    thx for the help
  • DanielDoeDanielDoe Member Posts: 307
    If it's not a very top secret project you could share it, it would be much easier because there can be many reasons for lags and slowdowns.
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Sorry I can't share it, I would like to if it helps but I can't. Basically I have many actors,
    some also animated, but I only let them animate when the main character is close enough. I always use prototype function, maybe this changes something?!

    Any tips?
  • DanielDoeDanielDoe Member Posts: 307
    Ok so in my current project i have a scenes about 3000x2000px, about 20 actors filled with heavy code (there is a lot of behavours inside), next 50 acrots are being spawn during level + music + a lot of sounds and everything run smooth, both on Mac, GS Viewer and Ad hoc... all Preload art are ON (I'll change it in final version) all invisible actors are set to Visibile=False, all Physics are changed to 0 (I don't use build-in physics) and all actors that don't move are set to Movable=No... That's the basics I use.
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    The game runs smooth at 60fps and and a max of 70mb total memory usage. I was just looking for ways to speed up loading times..

    But thank you @DanielDoe
Sign In or Register to comment.