User Tag List

Results 1 to 8 of 8

Thread: Top down view game. Scaling ?

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    KLiK-iT's Avatar
    Join Date
    Sep 2011
    Location
    New Jersey
    Posts
    2,852
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Top down view game. Scaling ?

    I have a question about scaling. I'm making a boat game where if you hit a ramp I want the boat to look like it's jumping out of the water. This is a top down view game, so it would only be a scaling thing I would need for this effect. Just a touch of it. How would I control this so that when you hit a ramp the boat scales up a little then back to normal size. What events would be necessary for this and what calculations would I need to pull this off. I tried to do this and failed bad.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    You could just use a animation. There is a built-in zoom function for stretching and shrinking a animation frame as a full animation.

  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Jaffob's Avatar
    Join Date
    May 2008
    Location
    USA
    Posts
    1,833
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, an animation would be the easiest way to do scaling, provided you only needed to choose from one or a few different heights. If the maximum scale of the boat would need to vary to give the appearance of different heights of jumping, a different technique would be needed.

    If you want a much nicer looking effect (although somewhat more complicated), you could use a shadow object that would define the boat's actual position, and have a boat sprite displayed above it. For a jump, the boat could move upwards away from the shadow to give a 3D appearance. This may be a bit too advanced for what you are looking for, however.

  4. #4
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    + Boat overlaps Ramp
    + Boat: Jump = 0
    -> Boat: Set Jump to 180

    + Boat: Jump > 0
    -> Boat: Set scale to: Sin(Jump("Boat")) * 0.5 + 1.0
    -> Boat: Set Jump to max( 0, Jump - 3 )

    Change "0.5" to adjust how extreme the scaling effect is.
    Change "3" to adjust how quickly the boat goes up and down (ie. gravity).
    You can also ignore player control while the boat is in the air (while Jump>0).

    A slightly more complicated alternative would be to use the same maths as in a custom platform engine, instead of the sin() function. That way you could have the boat jump higher if it's going faster when it hits the ramp.

    Shadows are good if the view is more like 3/4 perspective, but might look weird if the view is true top-down (it's worth trying though).

  5. #5
    Clicker Multimedia Fusion 2 DeveloperiOS 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is an example of how to do it with scaling:
    Attached files Attached files

  6. #6
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Jaffob's Avatar
    Join Date
    May 2008
    Location
    USA
    Posts
    1,833
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also keep in mind that the jump height should be a product of the boat's current speed and ramp "height". That way you don't fly 100 feet in the air when you hit a ramp going 5 mph.

  7. #7
    Clicker Multimedia Fusion 2 DeveloperiOS 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jaffob View Post
    Also keep in mind that the jump height should be a product of the boat's current speed and ramp "height". That way you don't fly 100 feet in the air when you hit a ramp going 5 mph.
    This would be funny to see in real life

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    KLiK-iT's Avatar
    Join Date
    Sep 2011
    Location
    New Jersey
    Posts
    2,852
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thank guys!

    King_Cool, perfect as always!!

Similar Threads

  1. Selected Class before Game & view of peer
    By ptiseigneur in forum Lacewing
    Replies: 5
    Last Post: 11th April 2013, 11:37 AM
  2. scaling
    By Skyhunter in forum SWF/Flash Export Module Version 2.0
    Replies: 9
    Last Post: 20th March 2013, 07:31 AM
  3. Scaling app down
    By Keith in forum SWF/Flash Export Module Version 2.0
    Replies: 8
    Last Post: 25th February 2012, 06:40 PM
  4. Flash Game Scaling Example
    By Clubsoft in forum SWF/Flash Export Module Version 2.0
    Replies: 32
    Last Post: 14th June 2010, 02:20 AM
  5. List View and Icon View
    By LIJI in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 4th July 2007, 03:45 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
  •