User Tag List

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

Thread: Problem with parallax and snap objects

  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,231
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Question Problem with parallax and snap objects

    I made a thread recently where I did not know how to snap objects to positions.
    I got help though with it and it was very simple (Set to Xmouse/32*32 etc)

    So that is all good, now I have a new problem though. I want to still snap the objects to places, but I also want parallaxing on different layers. This seems to screw up everything though where there is any parallaxing on those layers and if you scroll and then try to place something it does not place them right.

    I have made an example of what I have got so far, you can scroll with the A and D keys and you can create a box on the top layer (with no parallax) with the 1 key, then use mouse to place it somewhere. This layer works good. Then you can create other boxes with the 2 key and these are placed on a layer with a slight parallax behind the other. This works also fine as long as you don't scroll. But if you scroll and then try to place on this layer again everything gets screwed up..

    I have also recorded a video to better show what I mean: https://www.dropbox.com/s/qmew1638hl...oblem.wmv?dl=0

    Do anyone know of a way to solve this?
    Attached files Attached files

  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,231
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Anyone know a solution to this?

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleSWF Export Module

    Join Date
    Jul 2010
    Location
    Belgium
    Posts
    244
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I don't know how big your scrolling layers will be, or how much objects they will contain eventually, but maybe this is an (overly complex) solution. Could you make a set of invisible objects fixed to the parallax layer, and use them as placeholders. Then when you drop your objects, let them snap to the invisible boxes.
    There's bound to be a better solution, but this is the only one I can think of right now.

  4. #4
    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,231
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Hmm that does sound like adding additional complexity to something that is rather simple now. There must be a way to adjust the calculation to make the objects be placed evently no matter if you scroll?

  5. #5
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    When the X coefficient is set at 0.8, the X position of all objects on that layer are offset by X Left Frame - ( X Left Frame * 0.8 ).
    As a consequence, the "grid lines" on the offset layer are now out of sync with those on the main layer and you need to take that into account.

    XMouse / 32 * 32 simply becomes XMouse / 32 * 32 + Offset mod 32.
    Attached files Attached files

  6. #6
    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,231
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Great Chris! Thanks a lot! (please do more tutorials and articles on your site soon! )

  7. #7
    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,231
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    I got a new problem with this now!

    It seems there is something happening if you scroll and then place objects and then reload the frame. I have it set up now so it saves all the objects x positions in an ini, and then when the frame is restarted it loads those x positions. But because the X positions seems to "move" when you are scrolling because they are on a parallaxing layer it gets messed up :/ How can I fix this?

    I have also recorded a video of this happening: https://www.dropbox.com/s/8kaco7lupe...63248.wmv?dl=0
    Attached files Attached files

  8. #8
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Set the horizontal scrolling to 0 prior to saving and loading. Either that or each layer's x-coefficient to 1.

  9. #9
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,768
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Outcast. See if my open source World Editor, on my website, helps. It supports scrolling.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  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,231
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Thanks Nivram!, but it seems setting the X coefficient like ChrisBurrows suggested solved it for me!

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Parallax scrolling problem
    By MTCMusic in forum HTML5 Export Module 2.5
    Replies: 2
    Last Post: 5th April 2014, 12:56 PM
  2. Move a group of objects with the mouse (snap to grid)
    By Vetmora in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 22nd November 2013, 08:36 AM
  3. Problem with parallax caused center display event
    By keokeo in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 11th April 2008, 12:16 PM
  4. Snap to grid problem example.
    By Attan in forum File Archive
    Replies: 3
    Last Post: 21st February 2007, 03:51 PM
  5. Snap to grid problem!!!
    By Attan in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 21st February 2007, 09:08 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
  •