User Tag List

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

Thread: Custom Smooth Screen Scrolling Effect Topdown

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleXNA Export ModuleInstall Creator Pro
    Shadeve's Avatar
    Join Date
    Aug 2011
    Location
    GA USA
    Posts
    228
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Custom Smooth Screen Scrolling Effect Topdown

    I've created a system where ScreenPositionMain object is where the screen is centered. This object follows the player to make it so when the player moves the camera doesn't suddenly move the same speed as the player.
    This ScreenObject's speed depends on the distance between the player and the object.
    The problem is that when this object follows the player it is not smooth and the object is going back and forth between a pixel or two while following. This problem is fixed when I increase the speed of the player, but I can't do that for gameplay purposes.

    If anyone has any ideas for how to make this work nice and smooth I would greatly appreciate it!

  2. #2
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Is it moving back and forth a pixel or two because it keeps trying to center on the main player? Try to compare to a range of values that are +/- 5 pixels off from the player so when it gets close enough it doesn't spaz out. Then you can snap it to the player when it gets close.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleXNA Export ModuleInstall Creator Pro
    Shadeve's Avatar
    Join Date
    Aug 2011
    Location
    GA USA
    Posts
    228
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I've tried that before, and it looks worse because it just keeps snapping back. I have just discovered though that I can set the X and Y Scrolling positions and this works very smoothly. I have it set here so the frame position is mainly centered on the player, but also looks a bit in the direction of where your mouse is. Similar to the game RUNNING WITH RIFLES.

    CENTER X of SCROLLING ON:
    X( "Player" ) + ( XMouse - X( "Player" ) ) * 0.1
    CENTER Y of SCROLLING ON:
    Y( "Player" ) + ( YMouse - Y( "Player" ) ) * 0.1

    BUT, I still would like to add the feature of the frame smoothly and more slowly moving and not quickly toward wherever the mouse is.
    Do you have any ideas how to incorporate that into the formula?

  4. #4
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I made this example a few years ago: https://community.clickteam.com/threads/93446-Midpoint-Camera-Between-Player-and-Cursor-Example

    Maybe tweak this a bit to your needs? When I looked up the game Running with Rifles, it reminded me of this example I made.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleXNA Export ModuleInstall Creator Pro
    Shadeve's Avatar
    Join Date
    Aug 2011
    Location
    GA USA
    Posts
    228
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Sumo View Post
    I made this example a few years ago: https://community.clickteam.com/threads/93446-Midpoint-Camera-Between-Player-and-Cursor-Example

    Maybe tweak this a bit to your needs? When I looked up the game Running with Rifles, it reminded me of this example I made.
    Yeah, I was able to make mine scrolling work like that, but the extra feature I would like would be a smooth effect, where the screen doesn't adjust so quickly to where the mouse or player is.

  6. #6
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    676
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    couple rules:

    -always ALWAYS put your camera events below your movement events
    -don't try using floats in the "center x" or "center y". put your expressions in alterable values, then have center x and center y focus on those, using Round()

    Using the x axis as an example:
    Put X( "Player" ) + ( XMouse - X( "Player" ) ) * 0.1 in an alterable value, called something like "x scroll"

    then

    always
    ---> center x on Round(x scroll)

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleXNA Export ModuleInstall Creator Pro
    Shadeve's Avatar
    Join Date
    Aug 2011
    Location
    GA USA
    Posts
    228
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by casleziro View Post
    couple rules:

    -always ALWAYS put your camera events below your movement events
    -don't try using floats in the "center x" or "center y". put your expressions in alterable values, then have center x and center y focus on those, using Round()

    Using the x axis as an example:
    Put X( "Player" ) + ( XMouse - X( "Player" ) ) * 0.1 in an alterable value, called something like "x scroll"

    then

    always
    ---> center x on Round(x scroll)
    I added that and it made it very slightly more smooth, which helps. Appreciate it.

    Still looking for a way to make the camera move toward/follow the position it's supposed to be on so it doesn't quickly go to its position depending on the mouse.

  8. #8
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hi Shadeve I edited my previous example to include a 360 movement object that follows the previous camera spot, so it slowly transitions over to the new camera location smoothly. You can edit the camera speed and camera distance threshold alterable values in the cyan camera object.

    Let me know how you want me to edit it further to fit your needs. Thanks.
    Attached files Attached files

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    jn2002dk's Avatar
    Join Date
    Mar 2014
    Posts
    217
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why not use the easing object?

    Like so

    CameraEasing.mfa

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleXNA Export ModuleInstall Creator Pro
    Shadeve's Avatar
    Join Date
    Aug 2011
    Location
    GA USA
    Posts
    228
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    If you notice though, in both of your examples the main character/where the camera centers bounces left and right or up and down when the camera is moving and trying to catch up with the player object.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Smooth scrolling.
    By GoatSlave in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 2nd April 2014, 03:04 PM
  2. No smooth scrolling.
    By blub in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 16th April 2012, 10:01 PM
  3. Smooth Scrolling.
    By Almightyzentaco in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 12th August 2010, 04:47 AM
  4. TopDown Custom Movement Help
    By Sumo in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 16th September 2009, 07:18 PM
  5. Smooth scrolling
    By thps13 in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 14th December 2008, 11:44 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
  •