User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: why does event with "jump to frame" fire before all others?

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,081
    Mentioned
    71 Post(s)
    Tagged
    0 Thread(s)

    why does event with "jump to frame" fire before all others?

    When I run this, my game loads successfully. Why?



  2. #2
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,081
    Mentioned
    71 Post(s)
    Tagged
    0 Thread(s)
    If I change the last event to Start of Frame, it no longer fires:



    That PAX object is just a regular Active Object (global object, create at start)

  3. #3
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,081
    Mentioned
    71 Post(s)
    Tagged
    0 Thread(s)
    Anyone? I find this really weird and a bit disconcerting. I would really like to understand how Fusion works in this situation.

  4. #4
    Clicker Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jan 2015
    Location
    Australia
    Posts
    152
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Couple of other odd behaviours I just tried out (excuse the image size, DPI scaling on my monitor):

    This *should* jump to the next frame before changing the global values/strings, but those both occur before the frame jump (Global Value A ends up as 1, meaning the frame loop finished before jump)


    This ends the app before the jump, despite the End Application event happening last.

    I thought it might have been something to do with "Optimise Events" but leaving this unchecked results in the same behaviour. Same thing regardless of whether it's dx9 or dx11, iOS, Android etc. The same thing also happens in the free Fusion version (R291.4)

    Seems to be jumping to the next frame/ending the application at the *end* of the event cycle rather than mid cycle, and then it performs jump/end depending on which is the most recent in the event tick

  5. #5
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,081
    Mentioned
    71 Post(s)
    Tagged
    0 Thread(s)
    Sorry to keep bumping this, but I really think this warrants some sort of response from the developers. Surely this is really weird behaviour by anyone's definition. In the first example, a regular condition for an Active Object fires before an earlier Always condition, and before a Start of Frame condition. Something similar is going on in @marbenx 's first example.

    In marbenx's second example, it appears like the internal ordering within a Start of Frame check is glitchy.

    Surely these are bugs. Or at the very least, they're very unexpected behaviours that deserve an explanation so that we know how to work around them.

  6. #6
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)
    elvisish's Avatar
    Join Date
    Oct 2014
    Posts
    616
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    This is where a lateUpdate or "trigger on next update" "trigger on x frames" condition would be very useful, you could use fire events, but they're unpredictable and can't be paused manually. I agree though, the Fusion quirks guide should make mention of any unconventionally triggering actions.

  7. #7
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    12,847
    Mentioned
    84 Post(s)
    Tagged
    2 Thread(s)
    Internally, the Jump To Frame, Next Frame, Previous Frame, End Application actions set a "return code" to the game loop function. This return code is tested only when the entire game loop is completed.

    If you do a Jump to Frame and then End of Application, the End of Application return code will overwrite the return code previously set to Jump to Frame, so the game will end at the end of frame.

  8. #8
    Clicker Fusion 2.5 Developer

    Join Date
    Feb 2014
    Posts
    956
    Mentioned
    16 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Yves View Post
    If you do a Jump to Frame and then End of Application, the End of Application return code will overwrite the return code previously set to Jump to Frame, so the game will end at the end of frame.
    sounds like another hydra head of the dreaded "collision bug"

  9. #9
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,081
    Mentioned
    71 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Yves View Post
    Internally, the Jump To Frame, Next Frame, Previous Frame, End Application actions set a "return code" to the game loop function. This return code is tested only when the entire game loop is completed.

    If you do a Jump to Frame and then End of Application, the End of Application return code will overwrite the return code previously set to Jump to Frame, so the game will end at the end of frame.
    So is vice versa also true? An End of Application and then a Jump to Frame results in the Jump to Frame return code overwriting the End of Application return code? (that would explain my first example).

    So the only thing that matters here is the order of the return codes, is that right? There's no special hierarchy between End Application, Jump to Frame, Next Frame, Previous Frame. They don't get preferential treatment if they're in a green-conditioned event, or anything like that. The only thing that matters is the order of the return codes: only one return code will ever be executed, and it's always the most recent one that will 'win'. Is that correct?

  10. #10
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    12,847
    Mentioned
    84 Post(s)
    Tagged
    2 Thread(s)
    Yes, it's correct.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Problem with "end animation" and "jump to next frame"
    By ThePhoenixMeifwa in forum Fusion 2.5
    Replies: 2
    Last Post: 5th June 2018, 12:00 AM
  2. All encompassing "Jump to Frame" event.
    By rockesper in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 3rd January 2016, 09:18 PM
  3. Edit box says "bowsser", jump to frame.
    By crashkandicoot in forum Fusion 2.5
    Replies: 5
    Last Post: 6th September 2015, 11:00 PM
  4. Sub-Application : Can't "Jump to frame"
    By Romain in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 18th August 2010, 10:59 PM
  5. Subapp and "Jump to a frame" action doesn't work
    By Tiny in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 2nd December 2008, 02:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •