User Tag List

Results 1 to 2 of 2

Thread: Platform Adventures Part 2: Camera Tweaking

  1. #1
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2017
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Platform Adventures Part 2: Camera Tweaking

    My first step in building a platformer was the Custom Platform Movement tutorial by DavidN, which after some tweaking and the addition of wallclimbing, I'm satisfied with. Then came the camera, which while working with the movement I just kept centered on the player. But that's not ideal, one reason being that you'd want to see more of the direction you're moving in. So instead of following the player, I set a new object to be 96 pixels in front of the player, and have the screen follow that. Which led to the problem of changing directions suddenly jarring the camera. So I added a second object that follows the first object, which creates a much smoother effect.

    The result is usable, I think. And definitely better than having the camera centered on the player. My question is, do you guys have any suggestions for improving this system, presentation or efficiency wise? Or an alternate, better system to use?

    Here's an image of the camera relevant code, Active 2(green) being the guide and Active 3(purple/pink) being the camera.
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2017
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm going to answer my own question in case anyone else was looking for the same thing as me.

    The glaring issue with the above camera setup is when it comes to more precise jumping. Any time the player taps back, the camera swings around to look left. Which is very jarring, and terrible when dealing with adjusting at platform edges. But I've found a way around that:

    When Horiz < 0.2 and Horiz > -0.2: (when the player is still. Initially this was Horiz == 0, at which point I realized it pretty much only is upon running into a wall.):
    - Set CamCheck to PlayerX (meaning X Position of Player)
    When Horiz =/= 0 and PlayerX < CamCheck - 35:
    - Set Direction of Player left
    When Horiz =/= 0 and PlayerX > CamCheck +35:
    - Set Direction of Player right

    This way, the camera only swings around if the player has moved more than a block (currently working with a 32x32 grid), solving the tap-change-direction problem! It's still not perfect, but definitely a huge improvement, so I'm happy. :>

Similar Threads

  1. [Free] Big Santa Adventures (Platform game).
    By digitalmind in forum Android Released Games & Apps
    Replies: 1
    Last Post: 30th January 2017, 11:14 PM
  2. Camera zoom for cross platform
    By MEHRDAD in forum Fusion 2.5
    Replies: 1
    Last Post: 24th October 2016, 08:33 AM
  3. Replies: 0
    Last Post: 5th April 2014, 06:04 PM
  4. 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •