Animation issue

Village IdiotVillage Idiot Member, PRO Posts: 486

I've noticed that since the update that my little animation sequence includes a flash of white. It appears to be as if one of my three PNG files is not on a transparent background. The thing is that they all are on transparent backgrounds – and I even tested it with other random images and it does the same thing. Has anyone got any ideas?

«1

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    Are you able to supply any more context / information ?

  • Village IdiotVillage Idiot Member, PRO Posts: 486
    edited May 2016

    Hi @Socks It's this thing I've been working on for a while now. The dragon fly that breathes fire – part of my endless runner with the bee and the flowers and all of that stuff. The fire is constrained to the dragon fly's x and y position. It all works fine – just that tiny issue has arrived since the update it seems. I even tested older versions of the game that I know I haven't messed with for weeks and it happens there as well. So it seems to be the way that GS actually handles the process, if that makes any sense.

  • ka822ka822 Member, PRO Posts: 40

    I don't think it is your image issue if you see flash of white.

    Sometimes, I have similar issue. After updating some functions or images (in my character actor), my character actor's particle will become flash of white and that the image inside the particle rule becomes "none". I have to reassign the image in this case to fix the issue, but this occurs randomly and only I am editing my character actor.

    Did you check your animation actor and see if there any unusual image or missing in the animation rule?

  • SocksSocks London, UK.Member Posts: 12,822
    edited May 2016

    //

  • SocksSocks London, UK.Member Posts: 12,822

    @monkeyboy simian said:
    Hi @Socks It's this thing I've been working on for a while now. The dragon fly that breathes fire – part of my endless runner with the bee and the flowers and all of that stuff. The fire is constrained to the dragon fly's x and y position. It all works fine – just that tiny issue has arrived since the update it seems. I even tested older versions of the game that I know I haven't messed with for weeks and it happens there as well. So it seems to be the way that GS actually handles the process, if that makes any sense.

    Are you able to supply any more context / information about the issue rather than the project, I mean stuff like . . . . "the actor is being spawned in a timed loop (every 2 seconds) and is being spawned above the spawner actor, the actor has only three rules which are (etc)" . . . . rather than . . . "I haven't messed with for weeks / part of my endless runner with the bee and the flowers" type information.

  • SocksSocks London, UK.Member Posts: 12,822

    I might take the interrogation approach . . . :)

    Is this actor being spawned ?

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    Also is this in the viewer? Sometimes you need to quit and restart the viewer.

  • supafly129supafly129 Member Posts: 454
    edited May 2016

    @monkeyboy simian I believe I had this same issue. From what GS support said, it has to do with the fact that all actors that already exist on the scene are updated, and any new actors are not updated until the next frame to be consistent and keep them in sync with physics.

    A fix I found is that you should add a "change image" behavior to each actor that you are having trouble with and the initial white frame in the animation sequence should go away. Let me know if that works for you or if there's a different problem you are having.

  • SocksSocks London, UK.Member Posts: 12,822
    edited May 2016

    @supafly129 said:
    @monkeyboy simian I believe I had this same issue. From what GS support said, it has to do with the fact that all actors that already exist on the scene are updated, and any new actors are not updated until the next frame to be consistent and keep them in sync with physics.

    A fix I found is that you should add a "change image" behavior to each actor that you are having trouble with and the initial white frame in the animation sequence should go away. Let me know if that works for you or if there's a different problem you are having.

    That reminds me . . . .

    @monkeyboy simian

    Does your actor have an image applied to it, by that I mean are you relying on the animation behaviour to populate the actor with images, or does it start out with an image by default, or does it start out as a blank actor ?

  • Village IdiotVillage Idiot Member, PRO Posts: 486
    edited May 2016

    Thanks for the replies everyone. Sorry, I couldn't reply sooner but I posted that after 12:30 last night (Oz time) and it was time for me to hit the hay – as they say in the movies.

    @Socks – Sorry, I know my descriptions are lacking, it's just that I'm still quite remedial. I've attached grabs of the rules governing the fire animation and a second grab which is part of the rules for the dragon fly (the part pertaining to the fire spawning) which hopefully will help.

    Basically I've got the fire constrained to a dragon fly and the x and ys are slightly offset (which isn't showing in the grab).

    The white flash I hastily mentioned as the sand man stalked me from the corner of my darkened room, appears to be the background of one of the the fire images.

    It seems like for a fraction of a second, one of the frames seems to not be on a transparent background (which they all are – I checked).

    @Lost_Oasis_Games – I don't think it's just the viewer as it also happens when I play it on my physical phone.

    @ka822 – I actually deleted all of the flame images and reloaded them into the animation with the same thing happening. I also tried swapping the fire images for other images, and it still happened – weirdness.

    The thing is that this was not happening until I noticed it over the last couple of days. The only thing that I can do is ask myself: "What has changed?"

    I know I haven't messed around with the fire or the dragon fly in at least a few months – as I finished that – and had it working as it should back then. The only answer I come up with is GS 1.25. Maybe a tiny bug?

    I'll have a closer look at what @supafly129 said and give that a go.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited May 2016

    It has to do with spawning and the frame scan. Show us the code in the fire.

  • Village IdiotVillage Idiot Member, PRO Posts: 486

    FIXED!!! Right now I'm partying like it's 1999 (in my mind). That's gotta be the quickest fix I've had to date! Thanks @supafly129 !

    @Lost_Oasis_Games – It was the change image thing! See grab below..

    This seems like something that's been caused by the update.. like I said before – it only appeared very recently.. before that it was working fine. Theories anyone? Either way.. I'm dancin' – for now. :)

  • Village IdiotVillage Idiot Member, PRO Posts: 486

    Like it's 1999!!

  • Village IdiotVillage Idiot Member, PRO Posts: 486

    oo yeah!

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    Wrap the constrains and the animate in a loop behavior. Set the condition of the loop to anything that doesn't change, like self.color.green =1 set the loop iteration to 2 this will cause it to jump the scan.

  • IceboxIcebox Member Posts: 1,485

    i don't understand how it works , change image and loop animation that don't have conditions to trigger

  • Village IdiotVillage Idiot Member, PRO Posts: 486

    like it's 1999!

  • ka822ka822 Member, PRO Posts: 40

    Did u set your flame with an empty transparent image in the first place? I believe you need an empty image for the fir flame actor before it runs the animation.

  • Village IdiotVillage Idiot Member, PRO Posts: 486

    @ka822 – argh..

    really? I never thought you had to do that are you sure? I didn't do that in the first place.. and it worked then.. only started lately – see above.. and then party like it's 1999!

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    @Icebox said:
    i don't understand how it works , change image and loop animation that don't have conditions to trigger

    It's because when the actor is spawned the code isn't firing until the next frame. by adding a loop with an iteration of 2 it will force it to read in that frame

  • IceboxIcebox Member Posts: 1,485

    @Lost_Oasis_Games Interesting thanks for the info

  • ka822ka822 Member, PRO Posts: 40

    I am not too sure, when your flash of white happens. If it happens immediately after spawn, then pretty sure your actor initially did not set any image which is why a flash of white appear. You can try set an empty image or the first frame of the flame animation to the actor.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    You could also delay the animation a frame scan by adding an timer after .03 seconds

  • Village IdiotVillage Idiot Member, PRO Posts: 486

    but the change image works!

  • Village IdiotVillage Idiot Member, PRO Posts: 486

    now I'm not partying like it's 1999... I'm unsure and afraid.

  • ka822ka822 Member, PRO Posts: 40

    @monkeyboy simian said:
    but the change image works!

    And I still believe you just don't have the empty image set initially, so that your upon your actor spawn it is at its initial frame which is a white box, like new actor.

  • ka822ka822 Member, PRO Posts: 40

    Also check your image png format. If the flash happens within the animation, then it must be one of your image png format is incorrect.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    @ka822 said:

    @monkeyboy simian said:
    but the change image works!

    And I still believe you just don't have the empty image set initially, so that your upon your actor spawn it is at its initial frame which is a white box, like new actor.

    You don't need a empty image. You can have the starting image in the actor. I do all my animations that way, always have for six years. This statement is not true. This is why the animate behavior has the option, restore actor image when done.

Sign In or Register to comment.