User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 12 of 12

Thread: Selecting last created Object

  1. #11
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Jaffob's Avatar
    Join Date
    May 2008
    Location
    USA
    Posts
    1,833
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Pixelthief, I did a test, and it seems that finding an object by fixed value does in fact iterate through all the objects of that type. I tested this by creating a large number of objects with a loop, then using another loop that finds a random object by fixed value each time. Look at the file attached, run the application, then press Space. Note how long a pause you observe in the counter. Then go into the events and increase the number of objects created, and you should see a proportionally longer pause. I changed it from 1000 to 3000 objects, and the pause was about three times longer, so it seems like MMF does iterate through every object to find the one with the right fixed value.

  2. #12
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Derp, no file attached. But I take your word on it, so I constructed one of my own. I hadn't thought about judging the time based on increasing the # of objects

    If you watch it, for whatever reason, checking by fixed values is faster than by alt. values, but not exponentially as you would expect- it scales up by # of objects like you say. But its always about 3x faster than alt values. So indeed, its not an O(N) way of checking it, its still O(N^2) for sure, but its 3N^2 vs N^2. So yeah, it wouldn't be stable for a critical component of my engine. Which gives me a toughy, do I edit my code so that it might perform marginally faster, when its already 60 FPS and doesn't show any signs of slowdown, or do I make it more stable, when I've scoured my whole engine to make sure theres never any possible bad input anyway? Either one does nothing perceivable off the bat, but a year from now might be a crucial difference. So I'll run with the faster one and comment out but not delete the other

    Check out the attachment
    Attached files Attached files

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. Selecting an object without clicking on it
    By TheOriginator in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 13th March 2012, 08:58 AM
  2. Assign random created object to another created object
    By wizlore in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 12th November 2011, 11:53 AM
  3. Selecting an Object by Alterable Value
    By matt_barr in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 19th October 2009, 02:39 PM
  4. Problems with Object selecting
    By TotallyTurton in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 5th February 2008, 10:25 AM
  5. selecting object
    By westray in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 15th July 2006, 01:23 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
  •