User Tag List

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

Thread: Doing parallaxing with values instead of layers?

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

    Question Doing parallaxing with values instead of layers?

    I have always used different layers and adjusting the X and Y coefficient in these layers to achieve parallaxing in games. And while it is simple and works I have noticed that things on these layers can move a bit stiffly. I guess it is because they only move in 1 pixel steps?

    Anyway, I know I have heard there are methods to doing these parallaxing effects but doing it manually with moving the actual backgrounds certain amounts depending on X and Y values. Do anyone know how to do this, or even better have an example? And how to achieve it so things can move as smoothly as possible. I know there are extensions to help with this, but I can't use any extensions that are not supported in all runtimes.

  2. #2
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform 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)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,132
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    you'd have to use active objects or active picture (not sure if thats supported / what type of hit it would cause) I think you're best off using layers.

  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,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    I know I need to use active objects, but I want to know the method to achieve this. I assume you have to have some formula that always checks the x and y position of the "camera" and adjust the other parallaxing objects x and y positions to it, but I would love if someone have some experience with this that can help.

    I want to achieve the same smooth result as can be seen in this example: http://www.fileden.com/files/2011/3/...lax%20Pack.zip

    This example was made in another game tool, but I am positive the same result could be made in mmf to.
    I tried to replicate it with just layer parallaxing but that did not make it near as smooth so I think I need to do this without layers.

  4. #4
    Clicker Multimedia Fusion 2 Developer
    Maverick's Avatar
    Join Date
    Aug 2006
    Location
    Defiance, OH
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Normally I just use layers as well, and I set my background layer X and Y coefficients something like 0.2000. You may be able to achieve multiple layers of paralaxing by staggering these coefficients (normally, I only use one layer though).

    I used to use Actives back in the days of Click & Create.

    I found an old Games Factory Example that may be of some use if you don't want to use Layers (I didn't create this, just found it on a site I used to go to): http://www.sonicfangameshq.com/view.php?sec=4&id=53

  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,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Maverick View Post
    Normally I just use layers as well, and I set my background layer X and Y coefficients something like 0.2000. You may be able to achieve multiple layers of paralaxing by staggering these coefficients (normally, I only use one layer though).

    I used to use Actives back in the days of Click & Create.

    I found an old Games Factory Example that may be of some use if you don't want to use Layers (I didn't create this, just found it on a site I used to go to): http://www.sonicfangameshq.com/view.php?sec=4&id=53
    The problem again with layer coefficient is that it is not as smooth as in the example I posted.
    This old games factory example uses some method that also does very shoppy scrolling

  6. #6
    Clicker Multimedia Fusion 2 Developer
    Maverick's Avatar
    Join Date
    Aug 2006
    Location
    Defiance, OH
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not really sure myself of any other methods. The example you posted and the coefficient method seem to both be about the same (at least on my machine) in terms of smoothness. Maybe it has a boosted frame rate as well? Not 100% on that however, sorry.

  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,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Maverick View Post
    Not really sure myself of any other methods. The example you posted and the coefficient method seem to both be about the same (at least on my machine) in terms of smoothness. Maybe it has a boosted frame rate as well? Not 100% on that however, sorry.
    It is not the same I assure you.

  8. #8
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform 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)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,132
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    my point was that using giant actives might not be very smooth either, ill post an example when i get home tonight though so you can see what works best.

  9. #9
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    Alonso's Avatar
    Join Date
    Jul 2006
    Posts
    681
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In my game I use background system boxes / background image objects (for things that need transparency/animation) through qualifiers.

    At the start of frame, I set these values:

    • *Set Alt. Value A to : 1+(Alterable Value A( "Group.Background Scenery" )/100.0)
      *Set Alt. Value B to : 1+(Alterable Value B( "Group.Background Scenery" )/100.0)
      *Set Alt. Value C to : (X( "Group.Background Scenery" )*((1.0-Alterable Value A( "Group.Background Scenery" ))*-1))+((GAMEWINDOWWIDTH/2)*Max(-1, Min(1, (X( "Group.Background Scenery" ))))*1+((1-Alterable Value A( "Group.Background Scenery" ))*-1))
      *Set Alt. Value D to : (Y( "Group.Background Scenery" )*((1.0-Alterable Value B( "Group.Background Scenery" ))*-1))+((GAMEWINDOWHEIGHT/2)*Max(-1, Min(1, (Y( "Group.Background Scenery" ))))*1+((1-Alterable Value B( "Group.Background Scenery" ))*-1))


    Then, in an always event:
    • *Set X position to : (Alterable Value C( "Group.Background Scenery" )+X Left Frame)/1.0/Alterable Value A( "Group.Background Scenery" )
      *Set Y position to : (Alterable Value D( "Group.Background Scenery" )+Y Top Frame)/1.0/Alterable Value B( "Group.Background Scenery" )


    Configure these values at edit time. Game divides by 100.0 to get 2 decimals (seeing that you can't set decimals in alt. values during edit-time).
    The closer the value is to 0, the less it will scroll. Set it somewhere between 10 (far away) or 500 (close). Setting it to 5000 doesn't yield much difference from 500, I think.

    Alt. Value A -> Parallax Factor X
    Alt. Value B -> Parallax Factor Y

    Hope it helps. There is probably another way to do it to get a scale of parallaxing between 0 and 100, instead of 0 and infinite, but this has been modular enough to work for me.

  10. #10
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform 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)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,132
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    I didn't make this one (no idea who the author was, this ollld), but it's pretty much what you're after. The example uses active system box objects instead of active objects, but it would be easy to re-create with actives if you really wanted to.

    Paralax.mfa

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Parallaxing/Layers Issue
    By camelman in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 27th May 2010, 11:02 AM
  2. Parallaxing... help please
    By Tuna in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 19th September 2009, 01:01 AM
  3. Parallaxing question
    By McPuff in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 28th March 2009, 10:59 PM
  4. Viable objects for Parallaxing?
    By Pixelthief in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 19th January 2009, 06:33 PM
  5. Parallaxing active object,,, question..
    By camelman in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 14th June 2007, 04:46 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
  •