Event Position/"Fusion Event Breaks"

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • (I was unsure of whether or not to post this in the Open Topic Community Forum, but seeing as how this forum is more active, and the topic is relevant to 2.5 I put it here. Please move this topic if it doesn't belong, thanks!)

    Hello!

    I had a neat idea I submitted to the bug tracker that I haven't seen posted here before (or have not noticed if it was), and wanted to share it in the hopes that it garners support/traction. That idea is: Event Position.

    The premise of Event Position is that, since Fusion reads through your events/loops from top to bottom in one whole game 'loop', the user would be given control during any specific event to break the 'loop' and jump to any other event of their choosing. This would allow for much more intricate checks (think collisions when you are making a movement engine, or enemy AI for example) and greater jurisdiction over what your code does. You could use this feature to repeat sections of code, skip sections entirely, reset the Fusion loop from the start, etc. You would also be able to retrieve the line you are currently on so it could be saved to a value, that way you could skip to a line, perform whatever checks you need, then have an event that sends you right back to where you were before by retrieving. It would be very powerful and only add to Fusion 2.5 in my opinion :)

    I'd appreciate if you all could give this one some thought, and by all means give some feedback!


    (side-request: could we maybe get manual object selection reset clickteam? That'd be nice too!)

    Best person at writing incomprehensible posts. Edits are a regularity.

  • What you describe is almost exactly how fast loops function in Fusion...

    When you call a fastloop Fusion stores the current position (event line and even position within the actions execution in that event).

    The runtime then immediately runs any events which match your loop condition, ignoring everything else in the process. It does this for the specified number of loops and then returns the execution to the stored event/action where it left off.

    You can nest loops also, to make even more complex functions with them.

  • Simon, I don't think you quite understand how the feature would work.

    I want the option to be on event 10, then jump to event 1 and have fusion read from 1 and keep going until it reaches the end again: basically resetting the entire game update from where I want it to be. Or if you are on 1, you can jump to 50 and read from there. I also wanted to be able to return to a stored event optionally, not by default; fast loops don't skip blocks of code, or jump back backwards (and if fusion does immediately jump up to any loop, you're still forced to return to where you left off, defeating the purpose of not reading lines), and you can't quite put "on loop" in front of every event you might want to repeat :P

    The only way this would be possible now is through very heavy group control... and even then, you can't skip back: you would lose a frame.

    Best person at writing incomprehensible posts. Edits are a regularity.

  • that'd definitely be a nice feature, especially for optimising on the mobile runtimes.


    It definitely would be great for optimization! :D Especially since skipping lines would stop fusion from even performing comparisons that might be expensive that you wouldn't want tested for every frame.

    Best person at writing incomprehensible posts. Edits are a regularity.

  • Ah. I'm almost certain this feature won't be included in that case, it is quite a break from the way the runtime works and I think it would not only be difficult to implement, but would probably break a lot of extensions. Allowing the event loop to potentially never reach the end would cause a lot of issues.

    Everything you wish to achieve can be done currently with loops, conditions and groups - it just requires thinking differently in your design.

  • Ah I'm sorry to hear that. One last question though: if the event loop finishing is an issue, would it be possible to simply exclude events from being read themselves then? That way it will still complete an update but without executing/checking certain lines. Could still emulate the original idea by just treating everything before the Target event as if it were in a closed group, then regain focus when reaching the target? Putting it that way doesn't seem like it has the potential to break anything, and it's just creatively using a feature you already have so it could be easy to implement.

    Best person at writing incomprehensible posts. Edits are a regularity.

    Edited 2 times, last by casleziro (August 5, 2014 at 8:59 PM).

  • It's not that straight forward, for one thing line numbers aren't actually the same at runtime as edit time. Events which are inactive, contain a "Never", use extensions unsupported in the target platform or are comments are all stripped out for starters.

    Just for your information on the efficiency point... once a condition fails, the rest of the conditions in that event are not checked (obviously an OR condition will cause two or more sets of condition checks to happen in the event).

    Skipping whole blocks of code can be as simple as checking a flag or value at the start of events and this is not an expensive process. This in combination with minimal use of groups and loops should easily give you the efficiency you're concerned about.

    :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!