User Tag List

Results 1 to 6 of 6

Thread: Camera jostle when moving diagonally

  1. #1
    Clicker Fusion 2.5

    Join Date
    Jun 2018
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Camera jostle when moving diagonally

    When moving diagonally using the 8-directional movement preset, I notice in my game that the camera jostles very noticeably while it follows the player. is there any way I can minimize/eliminate this? it's not annoying now but I'm sure it will be later on when more scenery is added. Thanks for your time, guys. I'm new to this forum and it seems very friendly here.

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleMac Export Module
    dsilvers's Avatar
    Join Date
    Jun 2008
    Location
    Boston, MA
    Posts
    658
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Hi! Welcome to the forum.

    Without seeing your code, my recommendation would be to create an active object called "Camera." Set the scrolling X position to its X position, and the scrolling Y position to its Y position, instead of the player. This way you can control the camera separately from the scrolling, and you can interpret the camera's position based on the player position, rather than making it 1:1. Using this technique, you can ease the camera in and out based on range from the player, add in some trig to smooth scroll it at different angles, etc.

    Check out the "Expressions" section of this site to help you set up some really smooth trig functions that'll make for a great camera: http://www.sketchy.co.nf/

  3. #3
    Clicker Fusion 2.5

    Join Date
    Jun 2018
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alright, thanks for the help.

  4. #4
    Clicker Fusion 2.5

    Join Date
    Jun 2018
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I hate to post so inefficiently like this, but I added smooth scrolling in the form of a camera object and the scrolling works fine... but the problem I think is the movement system, as it seems that the player will noticeably skip pixels in his movement. I think this may be because I am using a small resolution for the frame (256x224), but I'd hope that there might be a fix to at least make it less... jostled. Any ideas? I'm thinking making my own movement system might be the way to go but I'm much too inexperienced to understand how to get rid of this pixel-skipping.

  5. #5
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    679
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Is your player moving at a slow speed? If so, this might simply be the nature of "floating point movement" being noticeable at low velocities. Since movement uses "in-between" values before shifting whole pixels (i.e moving 1 pixel over 2 frames instead of 1) it can appear "jagged" when moving diagonally, because there are some frames where the object might not be moving at all on one axis but is on the other, etc.

    Reading about your "pixel skipping" though I doubt that's what is causing it. Try this:

    click on your frame in the workspace toolbar and go to the "runtime options" tab in frame properties. Uncheck "timer-based movements" and see if this helps. The option applies Delta Time to the clickteam movements, so they always run at the same speed, even when framerate changes. This might be causing your "jostling".

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleMac Export Module
    dsilvers's Avatar
    Join Date
    Jun 2008
    Location
    Boston, MA
    Posts
    658
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    This might also be because of the significance of moving one pixel at a low resolution compared to a high resolution. You can't move an object less than 1 pixel directly, however you CAN use sub-pixel positioning to smooth things out. It's a lot simpler than it sounds. Instead of setting X("player") to X("player")+1 or -1 for movement, create a "MovementSpeed" value on the player. Set this to, say, 2.5, or some other non-integer value. Then set X("player") + movementSpeed("player"). Things will look a heck of a lot smoother.

Similar Threads

  1. Camera moving from screen to screen
    By arrrek5 in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 22nd September 2015, 03:42 AM
  2. What's the formula for moving diagonally?
    By Emerson3 in forum Fusion 2.5
    Replies: 3
    Last Post: 29th July 2015, 08:38 PM
  3. IP Camera and Web Camera Extension for MMF2
    By droberson in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 2nd June 2010, 05:37 PM
  4. Smooth scrolling with moving camera.
    By Popcorn in forum File Archive
    Replies: 0
    Last Post: 31st August 2009, 08:10 PM
  5. Moving a camera object
    By Mantis in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 12th February 2007, 09:25 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
  •