User Tag List

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 27

Thread: Significant MMF2 Bug - Object selection

  1. #1
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export ModuleUnicode Add-on

    Join Date
    Jun 2006
    Location
    Australia
    Posts
    988
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Significant MMF2 Bug - Object selection

    Sorry if this has been reported before, but I think I have found a significant bug in MMF2 Build 248 (Dev).

    Please run the attached mfa file.

    Frame 1 shows a normal example where clicking a box will destroy it.

    Frame 2 shows the bug where clicking a box will destroy all boxes. The only difference is that I have decided to run a loop on that condition which does nothing important.

    Update: I just ran some more tests and if you change the action of the box in frame 2 to "Make Invisble" or even "Set position" it still does the same for all boxes. Therefore this would appear to be a problem with object selection.
    Attached files Attached files

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Posts
    1,027
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Significant MMF2 Bug - Destroying Objects

    Wow, that's a legendary bug.

  3. #3
    Clicker Multimedia Fusion 2
    SEELE's Avatar
    Join Date
    Jul 2007
    Location
    Terra australis incognito
    Posts
    1,916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Significant MMF2 Bug - Destroying Objects

    Object selection happens within the condition that calls it.

    By calling a loop the; loop condition becomes the most recent selection condition if the loop is empty the selection is effectively cleared.

    It's not a bug - simply another layer of selection, which is just as important as the first..




    It sounds confusing but its not a bug!

  4. #4
    Clicker Fusion 2.5 Developer

    Join Date
    Jan 2007
    Location
    USA
    Posts
    691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Significant MMF2 Bug - Destroying Objects

    Yeah, I thought this was a bug until I realized how MMF selects stuff. I actually like it now.

  5. #5
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Posts
    1,027
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Significant MMF2 Bug - Destroying Objects

    How can that not be a bug? Seriously that's just justifying something that really is a bug as a 'design feature'.

  6. #6
    Clicker Fusion 2.5 Developer

    Join Date
    Jan 2007
    Location
    USA
    Posts
    691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Significant MMF2 Bug - Destroying Objects

    It's not a bug, because a loop does not designate any specific object in the condition.

  7. #7
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,537
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Significant MMF2 Bug - Destroying Objects

    when you execute an event, you define which objects are selected via the conditions. So conditions like "if object value A > 10" narrows it down from selecting ALL objects to just the ones with A > 10. This list of objects is saved for the duration of that line of code.

    when you start a loop event inside of a line of code, it prematurely ends that line of code, and starts running the looped code sections.

    Then, once the looped events are done, it RETURNS to the initial code line on the stack, to just after it started the event loop. What appears to be the problem is that it isn't preserving the object selection list when returning the stack, so any code executed after a loop call inside an event would reference all copies of objects, not specific ones.

    This would be a straight up bug; it can't possibly be intentional that the stack frame wouldn't be preserved over a loop, thats just not consistent with normal programming etiquette.

    An easy way to work around this is the fact that if you had any code that you needed to execute AFTER the loop call inside of a line of code, you could just as easily spread it out over a second line of code inside your loop taking place directly after.

    So if you had:


    ON LOOP: X
    Do Event 1
    Start Loop: Y
    Do Event 2

    and event 2 referenced objects, you could do this instead:

    ON LOOP: X
    Do Event 1
    Start Loop: Y

    ON LOOP: X
    Do Event 2



    so yes, its a glitch, and yes, it could be fixed, and yes, its easy to work around, but no, if it was fixed, it would destroy backwards compatibility with some projects, because some applications might actually rely on loops killing references from the object selection list. So don't count on this being changed any time soon

  8. #8
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Posts
    1,027
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Significant MMF2 Bug - Destroying Objects

    This causes all of the boxes to be destroyed when one is clicked.


  9. #9
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,537
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Significant MMF2 Bug - Destroying Objects

    or in other words.

    For each line of events that executes, the MMF2 saves both a list of objects that are were defined by the conditions in the event, like if you chose only objects with FLAG1 is ON, as well as a list of actions that will occur in that event, in sequential order (like destroy object, play sound, start a loop).

    MMF2 saves it as a stack, and piles a new frame on top when a loop is called, and returns normally after it is finished. However, while the list of actions is preserved, the object selection list is, in this situation, not. So its only saving one part of the stack frame, not all of it, which leads to obvious discrepencies and makes the world blow up



    another thing worth noting:

    The reason this seems to occur when you set the value of the other object inside an otherwise blank loop, is because MMF2 deletes blank loops when it compiles a program. Because it knows that executing the loop would do absolutely nothing, it actually doesn't run the blank code at all. The problem here is that this is an INCONSISTENCY: running the blank loop actually DOES have an effect, because it would delete the object selection list.

    Another similar problem is with creating objects. When you have an event that creates an object, it alters the object selection list to only specify that copy of the object. So if you have an event like:

    Press Space Bar:
    Create: Baddy
    Set Baddy Value A to 100

    well, even though the conditions don't specify any baddies, after it runs the create object event, it will only specify that single baddy, and therefore it will only set that baddies value A to 100, not all baddies. BUT, when the object limit is reached, like you have 256 Actives in a 256 limit game, the 'create object' event fails; it can't create a new object. But because it failed, it never reset the object selection list. And because of that, the previous code would actually set the value a of ALL baddies to 100, all of them. And that would be catastrophically bad. Very similar problem

  10. #10
    Clicker Multimedia Fusion 2
    SEELE's Avatar
    Join Date
    Jul 2007
    Location
    Terra australis incognito
    Posts
    1,916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Significant MMF2 Bug - Destroying Objects

    Its not a bug... but the selection is not! restored after a loop.. however this is intensional/necessary

    It may seem as if it would be easier to use if it wasn't controlled like this.. but it actually allows for much broader application...

    ...For example a loop which defines a selection may be 'run' or 'not run' depending on the result of an expression WITHIN AN ACTION!

Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. > 16 significant digits?
    By Bipolar_Games in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 14th July 2012, 05:43 AM
  2. MMF2 weird object selection?
    By JimJam in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 27th November 2010, 11:16 PM
  3. Significant Differences Using Fast Loops?
    By N64Mario in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 13th June 2009, 03:34 PM
  4. Significant framerate drops while scrolling.
    By pirodaggar in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 29th July 2008, 07:14 PM
  5. MMF2 needs prober object selection
    By Mathias in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 18th March 2007, 09:57 AM

Posting Permissions

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