User Tag List

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

Thread: Removing object 'lag'

  1. #1
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, ┼rhus
    Posts
    3,455
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Removing object 'lag'

    This is a bug in Sticky Object that I came around in MMF1.5 by using OEFLAG_BACKGROUND so it was processed before any other active object but it doesn't seem to work in MMF2.

    Basically I want to move objects when their parent moves but everything seems to be one frame behind. Aren't the hoX/hoY coordinates properly updated when an object is moved? How do I find the most current position of an object then?

    I also thought it might be MMF2 not updating the position of the objects before the next frame so I tried using callRunTimeFunction with RFUNCTION_SETPOSITION. That caused the objects not to move at all for some reason.

    What should I do?

  2. #2
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    13,076
    Mentioned
    119 Post(s)
    Tagged
    2 Thread(s)

    Re: Removing object 'lag'

    Do you set the roc.rcChanged flag to 1 after changing the position?

  3. #3
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, ┼rhus
    Posts
    3,455
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Removing object 'lag'

    Yes I do. The object updates its position fine, it's just that it is one frame behind.

  4. #4
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    13,076
    Mentioned
    119 Post(s)
    Tagged
    2 Thread(s)

    Re: Removing object 'lag'

    Hmm... maybe try sending your object to Francois?

  5. #5
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export ModuleUnicode Add-on
    LIJI's Avatar
    Join Date
    Jun 2006
    Location
    Israel
    Posts
    1,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Removing object 'lag'

    This is how I move objects if that helps:
    Code:
    LPRO obj1=(LPRO)CNC_GetParameter(rdPtr);  //or any other thing
    if(obj1==NULL) //stop crashes
    	return -1;
    obj1->roHo.hoX=x;//move the object
    obj1->roHo.hoY=y;
    obj1->roc.rcChanged=1;//updates the object
    return 0;

  6. #6
    No Products Registered

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

    Re: Removing object 'lag'

    All I remember is that there was an extension, I think, that dealt with that problem, prior to MMF2.

    I think there was something about the movement being processed before and not after each cycle that caused the problem, according to the author.

  7. #7
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, ┼rhus
    Posts
    3,455
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Removing object 'lag'

    Yeah I think Alien found some way to immedeatly update objects. (by using code snippet from you Yves I think)

    I move all objects if needed in the HandleRunObject function:
    (Code snippet from relative attach)
    Code:
    Child->roHo.hoX = Child->roHo.hoX + (Parent->roHo.hoX - rdPtr->Attached->at(i).ParentX);
    Child->roHo.hoY = Child->roHo.hoY + (Parent->roHo.hoY - rdPtr->Attached->at(i).ParentY);
    //Some other code in-between to update offsets
    Child->roc.rcChanged = true;
    As far as I remember when programming the Lens object, the hoX and hoY positions are always one frame behind (made the Lens object lag like this object does now when displaying the background and moving at the same time)
    It was because I used hoX and hoY to get the background from it's position, but I quickly found out to use to the rect-top/left values instead as they were up to date. I can't really do that in this extension... Or can i? :-/

  8. #8
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    13,076
    Mentioned
    119 Post(s)
    Tagged
    2 Thread(s)

    Re: Removing object 'lag'

    Or can i?
    Ask Francois directly, probably he didn't see this post. I would have to look at his source code to see where and when you can use hoRect and I'm not sure if I would be able to give you a 100% correct answer.

  9. #9
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: Removing object 'lag'

    Is any of the following flags set in the OEFLAG of you object? OEFLAG_ANIMATIONS, OEFLAG_MOVEMENTS, OEFLAG_SPRITES
    If not, then the object is not updated at the end of the loop. Usually a RCom structure (the one which contains the rcChanged flag) is only present when one of these flags is set. So if it is not, I do not see how I can correct that...

  10. #10
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, ┼rhus
    Posts
    3,455
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Removing object 'lag'

    What do you mean?

    None of those flags are set because my object isn't a graphical object. I tried using them and inserting the structures they use but it didn't fix the delay.

    So then what? Did something in MMF2 change since it isn't possible anymore? It seemed to work perfectly in MMF1.5 when I used the OEFLAG_BACKGROUND flag by itself to force MMF to handle my object before any object on the 'active' layer.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. List Object txt file load removing blank lines
    By AyreGuitar in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 7th July 2013, 09:40 AM
  2. Removing decimals
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 23rd March 2012, 08:11 PM
  3. Removing Deleted Object
    By drnebula in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 10th October 2009, 06:54 PM
  4. Removing an obstacle
    By LazyCoder in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 17th September 2006, 01:14 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
  •