User Tag List

Results 1 to 8 of 8

Thread: Bug: Weird random pattern!

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    chrilley's Avatar
    Join Date
    Jul 2006
    Posts
    1,013
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)

    Bug: Weird random pattern!

    I was trying to make MMF2 draw me a random pattern, and then I discovered a weird bug. The pattern it makes is identical on each side, very much like a mirror. And after a while of drawing it just stops, even though I haven't told it to.

    To reproduce:
    Make a single active object, resize to 1 pixel in size. And add this event...

    + Always
    - Set X Position to ("Active") + random(2) - random (2)
    - Set Y Position to ("Active") + random(2) - random (2)
    - ("Active"): Add backdrop

    Copy this event 40-50 times so it doesn't take too long to draw the pattern. Run Application and watch the pattern.

    Example file here

    [edit: I was wrong, it does not stop! In fact it just moves in the same pattern all over again! Why does it do that?]

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Bug: Weird random pattern!

    You're not seeing anything more being drawn because the bank of randomly generated numbers has looped around back to the beginning and the object is drawing over the top of itself again. If you run it a few times, occasionally you'll see the pattern slowly moving across the screen as the same random numbers are used again.

    It's not so much a bug as due to the way that computers generate random numbers. To get a more 'random' pattern, you need something to generate random numbers from - for example, use a Date and Time object in the frame, and Randomize (under "Special") with the value of its seconds every time a second passes.

  3. #3
    No Products Registered

    Join Date
    Jun 2006
    Posts
    625
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Bug: Weird random pattern!

    As davidN said, it's not a bug. Add an event such as
    -Always Randomize timer
    and you'll get something better. Timer always increases, that's why it will work, if you used Randomize "Hundreds" or "seconds" or something like that you'll get a pattern again (every 1 second or 60 sec).

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    chrilley's Avatar
    Join Date
    Jul 2006
    Posts
    1,013
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)

    Re: Bug: Weird random pattern!

    I see, I never saw random numbers that way before. But now it doesn't feel very much like "random" values anymore... :P

    The work-around works like a charm, even though I don't really understand how it works.

    When I for example use random(100) inside the randomize action instead of "seconds of ("Date & Time") the pattern goes odd again. How come it only works using seconds as value? :S

  5. #5
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Bug: Weird random pattern!

    I see, I never saw random numbers that way before. But now it doesn't feel very much like "random" values anymore... :P
    If you think about it, how is a computer supposed to generate a truly random number, when everything that happens inside it are mathematical calculations? It's logically impossible to program something that just picks a random number out of thin air.

    To explain how this process works: There's always a "random seed" involved - a number which is used to mathematically calculate a series of other numbers which purpose is to appear as random as possible. The same random seed will always generate the same series of numbers.

    Try this. Create a new empty application, and add a counter. In the event editor, you use these events:

    [Start of frame]
    (Special Conditions) Randomize 1

    [Upon pressing Space Bar]
    Set counter to random(10)

    Now launch your application, and press Space Bar to see it generate random numbers. Then close the application and start it again. Press Space Bar a few times to see it generate exactly the same series of numbers (4-4-7-0-2-5-9 and so on), since it "1" is it's random seed.

    To get a series of numbers that's different every time, you basically need to get the random seed from something that's not a constant. You usually use the internal computer clock, but you can also use the mouse position, etc.

    How random the pattern will appear depends on two things.

    1: How is the random number algorithm programmed?
    2: What is the random seed, and how often is it changed?

  6. #6
    Clicker Fusion 2.5 Developer
    00J's Avatar
    Join Date
    Jun 2006
    Location
    Virginia, USA
    Posts
    1,510
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Bug: Weird random pattern!

    I think people use the word bug to freely also. I say if you haven't used MMF for more than a few years don't post a bug thread...

    Just because something isn't understood, does not categorize it as a bug. :sleep:


  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    chrilley's Avatar
    Join Date
    Jul 2006
    Posts
    1,013
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)

    Re: Bug: Weird random pattern!

    Nifflas: Thanks for the explaination. Made me a bunch smarter. :-)

    OOJ: I've used click tools back to 1997 starting with Klik 'n Play. It's almost 10 years exactly now. So just because you use them for years doesn't mean you know exactly how they function. Also it's better to be safe than sorry. :P

  8. #8
    Clicker Fusion 2.5 Developer
    00J's Avatar
    Join Date
    Jun 2006
    Location
    Virginia, USA
    Posts
    1,510
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Bug: Weird random pattern!

    I wasn't saying asking for help was a problem, just that people in general use the word bug too much to describe a problem they have, the way I understand the meaning of the word bug, "programming error". Anyhow, it's not a big deal. I didn't offer a solution so my post wasn't really constructive anyway.

Similar Threads

  1. weird problem with direction selection via random value
    By Darkechibi in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 23rd April 2013, 08:01 PM
  2. Testing all error pattern
    By ASD in forum Install Creator and Patch Maker
    Replies: 2
    Last Post: 19th September 2011, 10:36 AM
  3. Animated Pattern Backgrounds?
    By Atherton in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 20th June 2009, 10:14 AM
  4. Pattern
    By MechatheSlag in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 17th September 2008, 04:30 PM
  5. Random Pattern Bug, example!
    By chrilley in forum File Archive
    Replies: 0
    Last Post: 15th March 2007, 05:58 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
  •