User Tag List

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

Thread: Any way to calculate objects new position after changing layer scrolling coefficient?

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,157
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Question Any way to calculate objects new position after changing layer scrolling coefficient?

    I find the displacement of objects when using the different layer scrolling coefficient when trying to create parallaxing backgrounds to be extremely frustrating. What I mean is that if you for example have a a platform game with a frame made up of 3 layers. You have the main character and all platforms and so on on layer 1 with a scroll coefficient of 1.000000. Then you have Hills on layer 2 which have a scrolling coeffficient of 0.900000. Then lastly you have the far background on the 3:rd layer with a scrolling coefficient of maybe 0.500000.

    Now you place everything to look nice in your frame. But because of the different scrolling coefficient values on the layers stuff will be totally in the wrong places when you actually start the frame. I guess there is no option to make the program understand that you want stuff to start in the place you have them in frame and then start to scroll accordingly when you start to move in the frame? I cant make events for them either because I use backdrop objects.

    The only thing I can think of is if its possible to somehow calculate the number of pixels you have to move stuff around in the frame editor according to how much scrolling coefficient you have on the layer the object is on, after you have placed everything out as you want? Is this possible and how do i calculate it? Say for example I want to place the first Hill in my frame at X position 100, and the X scrolling coefficient is 0.900000. How many pixels do I have to move the Hill to counter its misplacement when the frame start, to make it stand in the spot I have it in the frame editor?

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,157
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    No one? I am suspecting I have to take the frame size into the calculation, am i right?

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,157
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Bumpy

  4. #4
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleXNA Export Module
    ProdigyX's Avatar
    Join Date
    Jan 2011
    Posts
    1,197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Trial and Error
    You could also view positions of the other layers with a counter.

    I have a hunch that for the example your gave, for every 10 pixels layer one moves, layer 2 moves 9 and layer 3 moves 5

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,157
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ProdigyX View Post
    Trial and Error
    You could also view positions of the other layers with a counter.

    I have a hunch that for the example your gave, for every 10 pixels layer one moves, layer 2 moves 9 and layer 3 moves 5
    Trial and error is just what I am doing now and want to avoid :P

    But yes maybe that 10 pixel thing is right.. It should be possible to translate it into something you can mathematically figure out from some formula..

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    KLiK-iT's Avatar
    Join Date
    Sep 2011
    Location
    New Jersey
    Posts
    2,862
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Outcast,.when you want to use objects in layers,.you have to drag them to that layer for it to be in that layer and same goes for backdrops. If you already knew that,.then can you explain in a little more detail of what the issue is or upload the mfa here.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    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)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,350
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    TheSmanman, if I understand it correctly, he wants the objects to appear in the game relative to each other as they are in the frame editor. For instance, when the player has walked for a long time, he comes to a house and there is a tree behind it. Now, if the tree is in a layer with a slower scrolling coefficent, in the frame editor you wouldn't know where to put the tree for it to appear behind the house when the player is there.

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,157
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Popcorn View Post
    TheSmanman, if I understand it correctly, he wants the objects to appear in the game relative to each other as they are in the frame editor. For instance, when the player has walked for a long time, he comes to a house and there is a tree behind it. Now, if the tree is in a layer with a slower scrolling coefficent, in the frame editor you wouldn't know where to put the tree for it to appear behind the house when the player is there.
    Thats exactly what i mean

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    KLiK-iT's Avatar
    Join Date
    Sep 2011
    Location
    New Jersey
    Posts
    2,862
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I got ya. Doesn't the objects just appear where you place them? I've done layer scrolling before and I just place the objects in the frames where they are supposed to be and have no issue where they are showing up?!!

    If you're talking about,... say the tree behind the house like Popcorn said,..just create it in that layer at the time when needed. There's an option that lets you do that when working with layers in MMF.

  10. #10
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,157
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TheSmanman View Post
    I got ya. Doesn't the objects just appear where you place them? I've done layer scrolling before and I just place the objects in the frames where they are supposed to be and have no issue where they are showing up?!!

    If you're talking about,... say the tree behind the house like Popcorn said,..just create it in that layer at the time when needed. There's an option that lets you do that when working with layers in MMF.
    If you have not had an issue with this have you used different layer coefficients on the layers?

    Its not possible to create backdrop objects at runtime as far as I know if you are not having them as actives first? I can't take shortcuts and sacrifice performance for this because its mainly for flash where I need all the performance I can get :/

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 2
    Last Post: 20th December 2012, 12:49 AM
  2. Position layer using Layer Object
    By Sumo in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 4th October 2012, 06:51 AM
  3. How to calculate RGB coefficient?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 4th March 2012, 10:34 PM
  4. Layer bug with coefficient 0
    By Nioreh in forum File Archive
    Replies: 5
    Last Post: 27th July 2006, 10:05 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
  •