User Tag List

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

Thread: Slow down camera speed?

  1. #1
    Clicker Fusion 2.5 (Steam)
    Mazerwulf's Avatar
    Join Date
    Dec 2014
    Posts
    34
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Slow down camera speed?

    Hello! I have a quick question for the community.

    I have a vertical shooter that I am working on. Currently the way the level scrolling is done is through this:

    I have an active object that is acting as my "Camera" that scrolls up the level.

    I have the following to move the camera up the level

    "Always" - Start loop "Scroll" 1 times
    On Loop Scroll - Set Y Position "Camera" -1
    Center Display "Camera" (0,0)


    The problem with this, however, is that the scrolling speed is too fast for the level I am trying to do. Is there any way to slow the scrolling speed down? Or is there a more efficient way to make the camera scroll up the level period? Any help would be super amazing!

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Chrille's Avatar
    Join Date
    Jul 2006
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Store the camera position in a value. You can use the "Camera" object's Alterable Value Y for example:

    Code:
    + Start of Frame
    - Set "Camera" Alterable Value Y to "Camera" Y Position
    
    + Always
    - Start loop "Scroll" 1 times
    
    + On Loop "Scroll"
    - Substract 0.5 (or even less) from "Camera" Alterable Value Y
    - Set Y Position "Camera" to "Camera" Alterable Value Y
    - Center Display "Camera" (0,0)
    Of course, you don't really need the Active Object "Camera". You can center the camera on two values instead of an object, but an Active is a good way to store values.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    If you feel more comfortable without loops,
    you could also set "camera" object movement to "bouncing ball"
    set its initial direction to "up"
    and its speed to a low value (try with 5-8)

    you could also alter its speed during the game to create "pauses" with big enemies,
    or other nice effects

  4. #4
    Clicker Fusion 2.5 (Steam)
    Mazerwulf's Avatar
    Join Date
    Dec 2014
    Posts
    34
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    @ Schrodinger

    That worked beautifully! Problem is now that my ship seems to be moving faster than the camera and it goes off screen >.<

    Any suggestions to keep the ship in the field scroll with the camera without leaving the arena?

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Mmmm...
    you could face the problem in many ways:

    1) slow down the ship

    2) speed up the camera ()

    3) make a dynamic system, where the camera "chases" the ship if ship goes too far (variable scrolling speed)

    for example when:
    ship Y position < Y top coordinate of frame + 50
    >> set camera speed to 20
    or
    >> set ship speed to 6

    or easier,
    in "position - is ship getting close to a window's edge"
    i.e. 20 px
    lower speed, or stop ship (this however causes a "muddy" effect), or bounce ship..

    then revert to normal speed when ship returns down the screen

    4) set ship to "stop" when leaving frame area,
    (test position of ship --> click all outgoing arrows, this should create a "ship leaves the play area" event)
    >>> ship movement - stop

    in this way the ship will always be bounded to the screen area that is following the camera

    Edit: sorry n° 4 is uncorrect, this works only for leaving actual frame area, not for windowed "screen" area.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Oh, sorry, another simpler/more effective way:

    1) untick "follow the frame" for your spaceship, if it's ticked
    2) create a "border" active object whose size = boundaries of your screen
    3) untick "follow the frame" for the border object
    4) in the event editor, make ship stop when colliding with "border" object

    See example:
    scroller.mfa

  7. #7
    Clicker Fusion 2.5 (Steam)
    Mazerwulf's Avatar
    Join Date
    Dec 2014
    Posts
    34
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I'll try it when I get home

    . However what I am really attempting to do is have the ship maintain the same speed of the camera. Meaning that if the player stops moving, the ship doesn't go towards the bottom as the camera pans up, but keeps moving forward at the same speed as the level/camera. Would those solution help with this?

    Seriously appreciate the help ^_^ Learning a lot from these different examples

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    OK then you definitely should go with the last example!
    Main thing to do is unticking "follow the frame" for the ship object in object's properties.
    Then you may want to prevent the ship from slipping out by testing its position or adding a "border object" as in last example.

  9. #9
    Clicker Fusion 2.5 (Steam)
    Mazerwulf's Avatar
    Join Date
    Dec 2014
    Posts
    34
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks! I'll post the update the moment I am able to work on it !

  10. #10
    Clicker Fusion 2.5 (Steam)
    Mazerwulf's Avatar
    Join Date
    Dec 2014
    Posts
    34
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    This is very odd...when I untick the "Follow frame" option...my ship vanishes when I play

    **EDIT**

    Nevermind - fixed it

    ** Edit 2 **

    No..I guess I didn't. What causes my ship to vanish whenever I unclick "Follow Frame?"

Page 1 of 2 1 2 LastLast

Similar Threads

  1. iPhone 4 Slow Speed
    By tienny in forum iOS Export Module 2.5
    Replies: 2
    Last Post: 3rd August 2014, 12:19 AM
  2. F2.5 physics: speed up / slow down
    By willy in forum Fusion 2.5
    Replies: 6
    Last Post: 19th March 2014, 07:38 PM
  3. Slow down/Speed up audio
    By Petedevlin in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 11th August 2012, 03:13 PM
  4. SWF seems to run slow in FireFox - Speed problem
    By Sparckman in forum SWF/Flash Export Module Version 2.0
    Replies: 1
    Last Post: 20th February 2011, 09:09 AM
  5. Speed up, slow down & loop sections of midi files
    By Sarah in forum File Archive
    Replies: 0
    Last Post: 7th October 2006, 08:24 AM

Posting Permissions

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