User Tag List

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

Thread: How to make a "scrolling camera"?

  1. #1
    Clicker Fusion 2.5Android Export ModuleiOS 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)

    Join Date
    May 2013
    Posts
    86
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    How to make a "scrolling camera"?

    I've made a lot of games (casually) since MMF1, so I have a lot of experience with MMF, completely self-taught. Because of that, I have some basic holes in my understanding of the program, the most annoying being the inability to make a scrolling camera. Try as I might, I can't guess how to do it on my own.

    I just want to make your basic platformer, where the playing field is larger than the visible field (Think Super Mario Bros, Sonic...basically any 2D side-scrolling game ever.) How how do I make the playing field larger than what the player can see at the start of the game? And then do I set the "camera" so it follows the player character?

    Do you see what I'm asking? Incredibly basic. But its finally irked me enough to swallow my pride and ask the forums

  2. #2
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleXNA Export Module
    ProdigyX's Avatar
    Join Date
    Jan 2011
    Posts
    1,197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    The "Frame size" is how big a level is.
    The "Window size" is how big the camera is.

    So if you make the frame size bigger than the window size, you will create a playing field larger than the visible field.

    To change the placement of the camera. Note that you cannot change the dimensions of the camera, just the X/Y Position

  3. #3
    Clicker Fusion 2.5Android Export ModuleiOS 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)

    Join Date
    May 2013
    Posts
    86
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

  4. #4
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleXNA Export Module
    ProdigyX's Avatar
    Join Date
    Jan 2011
    Posts
    1,197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Red events happen only once. Here is a little info on red events.

    http://www.xable.us/fastloops.php

    Replace the timer condition with an "Always" condition and you should be fine.

  5. #5
    Clicker Fusion 2.5Android Export ModuleiOS 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)

    Join Date
    May 2013
    Posts
    86
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Here's a second screenshot:

    http://img9.imageshack.us/img9/9163/tw8a.png

  6. #6
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Protip: Instead of making the camera stay at 0,0 on your player, make a new active called Camera and make the camera stay at 0,0 of that active. Then set that active's position to

    X = (9*X( "Camera" ) + X( "Player" ))/10.0
    Y = (9*Y( "Camera" ) + Y( "Player" ))/10.0

    Replacing "Player" with the name of your player active.

    This will make your camera smoothly follow the player with a sort of easing effect. Just try it out, it looks nicer.

  7. #7
    Clicker Fusion 2.5 DeveloperiOS Export ModuleMac Export Module
    Enchantainment's Avatar
    Join Date
    Sep 2012
    Location
    West Yorkshire
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's a really good method of camera control Jacob! If however, you wanted the camera to move in front of the player, rather than behind the player, how would you alter that expression to do that? Changing the + to - only breaks the entire thing

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS 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)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,363
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    Enchaintainement, that is quit simple. After you have the camera working behind the player, instead of using the Center Window position in frame action, set the Horizontal and Vertical Window Position individually and use the following expressions:

    Center Display at X = X( "Player" ) + X( "Player" ) - X( "Camera" )
    Center Display at Y = Y( "Player" ) + Y( "Player" ) - Y( "Camera" )

  9. #9
    Clicker Fusion 2.5 DeveloperiOS Export ModuleMac Export Module
    Enchantainment's Avatar
    Join Date
    Sep 2012
    Location
    West Yorkshire
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for for the response Popcorn. That example works very nicely! Much appreciated

  10. #10
    No Products Registered

    Join Date
    Dec 2014
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Um, whenever I want to scroll in Fusion 2.5, the scrolling never works, and my character ends up going out of frame, even though I follow everything down to the last detail.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. I'm trying to make enemies react "accurately" when I attack them (like Terraria).
    By edman3d in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 2nd March 2013, 06:41 AM
  2. Why does "Create Object" make multiples instead of one item
    By rubes in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 5th May 2012, 11:01 PM
  3. Make install file/package for complete "clean" WinXP PC...?
    By Mads Aggerholm in forum Install Creator and Patch Maker
    Replies: 6
    Last Post: 22nd November 2011, 07:23 AM
  4. Object "camera"
    By wesleyd in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 13th September 2011, 03:13 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
  •