User Tag List

Results 1 to 9 of 9

Thread: Trouble with scrolling objects :( ?

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)iOS Export Module (Steam)

    Join Date
    Jan 2015
    Posts
    262
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Trouble with scrolling objects :( ?

    Hi all,

    I would like to create scrolling system for my game background. I have objects and I set bouncing movement and when the object reached determined position change it position to another. Everything is fine but i have a problem with GAP between my scrolling background. I attached example and youtube video with this problem:

    This is my video YOUTUBE:
    https://www.youtube.com/watch?v=gqOB4B9jg

    This is my example (dropbox):
    https://www.dropbox.com/s/tmnuxpk0i3...lling.mfa?dl=0

    Anybody know where is problem ? or maybe is it better way to doing this.

  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)
    I think this happens because the Bouncing Ball movement is processed after the events are, which means it has the potential to be a couple of pixels out of alignment (my memory on how exactly this works is a little hazy).

    I would remove the Bouncing Ball movement (set it to Static instead), and move the objects with something like this event:

    + Always
    -> Set Y position of scrolling to Y("scrolling") + 4

  3. #3
    Clicker Multimedia Fusion 2HTML5 Export Module
    Kentronisk's Avatar
    Join Date
    Nov 2011
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Moving it with Y position + //some number// would be my approach too.

    Two other quick fixes would be
    I) paint the background blue so that even though there are gaps, they wont show
    II) Increase the height of the scrolling object by a few pixels so that they always overlap and have some space for a potentional gap

    EDIT: Im guessing the issue is that the movement is not totally accurate on the pixel you want. If the position is greater than 720 (lets say 721) when it moves, this will produce a small hole. It seems you can solve your issue the way you have it now by instead of static placing it at 0,0 every time, you place the Y position to "Y( "scrolling" ) - 960".
    But still, DavidNs reply is a better way

  4. #4
    Clicker Fusion 2.5iOS 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)
    SolarB's Avatar
    Join Date
    Feb 2012
    Location
    Melbourne
    Posts
    905
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Are you using "overlap" or "collides with"? The second (shows up green) is processed before the event loop and I find it to be more reliable.

  5. #5
    Clicker 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)
    MPnetbox's Avatar
    Join Date
    Dec 2014
    Location
    Portugal
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you must use bouncing ball movement for some reason, i would remove the fake object because it's not really needed (unless there's some other use for it that i'm not aware).
    Also replace the "set position at (0,0)" that you have with:

    :: set Y coordinate = Y( "scrolling" ) - OHeight( "scrolling" )*2

    I tested this with several movement speeds and never had the gap issue

  6. #6
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)iOS Export Module (Steam)

    Join Date
    Jan 2015
    Posts
    262
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I have to use bouncing ball movement because i need change speed depending on the situation. All ways are good but "MPnetbox" solution was created for me

    Thanks guys for the help.

  7. #7
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)iOS Export Module (Steam)

    Join Date
    Jan 2015
    Posts
    262
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I have one question more. What about if i create universal app. My main resolution is 320x480 (game resolution) and my frame resolution is 360x569. In this case this code (set Y coordinate = Y( "scrolling" ) - OHeight( "scrolling" )*2) working very well but if I test my app on 360x569 i can see a GAP between two active objects. How can I fix it and prepare app for universal app ? ( i set in my properties in iOS project - DISPLAY : FIT INSIDE AND ADJUST WINDOW SIZE )

  8. #8
    Clicker 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)
    MPnetbox's Avatar
    Join Date
    Dec 2014
    Location
    Portugal
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, i think that i solved your problem... i didnt test on any iOS device because i don't have any but try it out and let me know.
    Here are the changes that i made:

    - On the "scrolling" object i went to the RunTime Options and disabled "Destroy object if too far from frame" and changed the "Inactivate if too far" from "automatic" to "NO". (This is important, or else your scrolling object will be destroyed or won't move when too far away from the frame);

    - Next, i added a new scrolling active, because since your frame is now bigger, it needs 3 actives to cover the whole thing, or else you will see a little gap between object repositioning.

    - Finally, on the event editor, i change the event condition from Y position of ("scrolling") >= 720
    to:
    :: Y position of ("scrolling") > Frame Height
    - Y( "scrolling" ) - OHeight( "scrolling" ) * NObjects( "scrolling" )

    This way it will adapt everytime you change the frame resolution and also when you change the number of actives for background.

    Here is the attachment.

    scrolling_probable_fix.mfa

  9. #9
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)iOS Export Module (Steam)

    Join Date
    Jan 2015
    Posts
    262
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    Now it works great on all iDevices. Thank you for your help

Similar Threads

  1. Pinch to zoom - Scrolling trouble
    By RhysD in forum Fusion 2.5
    Replies: 2
    Last Post: 17th February 2015, 01:15 PM
  2. Trouble with events with duplicated objects
    By renan63 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 5th June 2013, 04:27 PM
  3. PMO and active objects collision trouble
    By Hash in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 7th January 2011, 08:31 PM
  4. pasting objects to backround trouble
    By Skeets in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 1st September 2007, 11:54 PM
  5. Trouble with backdrop objects
    By Shmeegs in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 6th August 2007, 02:15 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
  •