How to make an actor appear and disappear?

Hi,

I am trying to create a menu to display a picture and it's data. I am thinking which way is better. 1)Spawn and destroy the display or 2) Use alpha to make the actor invisible (the actor would still remain on screen.

Many Thanks.

Newbie

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2012
    Both work well
    Use alpha. Spawning and destroying uses up too much memory. avoid as much as possible
    It's a myth. Honestly, you hear it all the time, spawning & destroying uses up memory, but if you test it out for yourself you'll find spawning & destroying has no impact on memory usage at all, spawn all you want, spawn to your heart's desire, it's all good.

    :)

    http://forums.gamesalad.com/discussion/52067/recycling-vs-spawndestroy#latest

  • cbtcbt Member Posts: 644
    Both work well
    Use alpha. Spawning and destroying uses up too much memory. avoid as much as possible
    It's a myth.

    You are wrong mate, so wrong that words can't even describe.
  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2012
    I gotta disagree there man. I have a project that crashes after 3 minutes from spawning and destroying.
    Do you have an example file of this problematic spawning/destroying I could take a look at ? Even if it's just the spawning/destroying part [with everything else deleted] if you'd rather people not have access to the project itself.

    ?
  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2012
    You are wrong mate, so wrong that words can't even describe.
    Give it a go, it's what discussion forums were built for.

    :)

    As far as I understand it, the idea that spawning and destroying slowly eats into memory usage is a myth left over from versions of GameSalad from a fair while back, I've done some fairly extensive testing (in the order of hundreds of thousands of spawn destroy cycles in a single project) and from what I can see it's impossible, not difficult but actually impossible, to impact on performance or memory usage using spawning and destroying.

    But . . . . I would be happy to be proven wrong - it's all free learning / information to me, so like I say, give it a go, if you can produce a project, a basic spawning and destroying project, that eats into system memory on a device I'd be more than happy to take a look at it.
  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2012
    nothing I do is crashing it.
    Yeah, it's rock solid from what I can tell, I've tried pretty much everything you can imagine to bring the device to it's knees with wanton spawning and destroying (or 'S&D' as I like to call it) but it's all handled trouble free, no memory issues, no performance issues.

    Back to the OP, both spawn & destroy or switching the alpha channel work well, use whichever suits the project.
Sign In or Register to comment.