Is spawning 7 actors and destroying a bad practice?

Hello everyone,

Just another question,

Spawning and destroying actors have always been avoided cause of the memory usage and all the rest.

I was wondering though, if the engine had improved with dealing with spawning and destroying actors, cause at the moment I can't seem to recycle the actors so this may be my only option.

So if 7 actors are spawned every second and 7 are destroyed every second, would the game crash after a while, how long would it last? Is it a good practice or should I invest 100% of my time figuring out how to recycle.

If you have any experince or games that spawn heaps feel free to let me know.

Thanks

Comments

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    This is a non issue now. Not because of GS software but because the majority of devices now have more processing power. It's not GS that limits things it's the device limits that one must stay in line with.
  • SocksSocks London, UK.Member Posts: 12,822
    Spawning and destroying actors have always been avoided cause of the memory usage and all the rest.
    It's a myth, a myth from the long distant past, you are safe to spawn and destroy as many actors as you like, I tested this last year on my iPad, spawing (and destroying) around a quarter of a million actors, with around 110 on screen at anyone time, the project ran for hours quite happily and I kept track of the RAM usage, there were no issues.

    As you are only dealing with 7 actors would it not just be quicker to just set it up and test it ? Let it run for a while and monitor the RAM usage ? Probably quicker than typing out your post ?
  • MillionairAppsMillionairApps Member Posts: 110
    Great, my concern was that there was a memory build up on GS side which then crashed the app, is this still happening or is that long gone?
    I don't really keep up to date with these stuff unless if directly affects me, so apologies if its so simple :)
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited September 2013
    It's important to keep up with all things as often they have implications to more than just one thing. If you're serious about Game making you need to sleep and eat this stuff.
  • MillionairAppsMillionairApps Member Posts: 110
    Spawning and destroying actors have always been avoided cause of the memory usage and all the rest.
    It's a myth, a myth from the long distant past, you are safe to spawn and destroy as many actors as you like, I tested this last year on my iPad, spawing (and destroying) around a quarter of a million actors, with around 110 on screen at anyone time, the project ran for hours quite happily and I kept track of the RAM usage, there were no issues.

    As you are only dealing with 7 actors would it not just be quicker to just set it up and test it ? Let it run for a while and monitor the RAM usage ? Probably quicker than typing out your post ?
    @Socks Cheers, how many actors were being spawned and destroyed per a second roughly.


    @FryingBaconStudio Agree with you there, take half a year off and everything has changed dramatically. Thanks for the help.
  • SocksSocks London, UK.Member Posts: 12,822
    . . . how many actors were being spawned and destroyed per a second roughly.
    I can't remember, the spawner was set on 'every 0 seconds' - which put around 110 actors on screen at anyone time (moving right across the screen to be destroyed by touching a big destroy bar).

    Why do you want to know how many were spawned a second ?

Sign In or Register to comment.