User Tag List

Results 1 to 9 of 9

Thread: Another way to make player move up/down slanted hills?

  1. #1
    No Products Registered

    Join Date
    May 2012
    Posts
    134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Another way to make player move up/down slanted hills?

    I'm really stuck on this and i need another way to make a player move up/down slanted hills. I'm currently making the player move by adding/subtracting to his X posistion.
    https://dl.dropboxusercontent.com/u/97046746/xymove.png
    And I came up with adding to his Y horizontal movement to make him move upwards/uphill, But its not really working well for me.
    https://dl.dropboxusercontent.com/u/97046746/uphill.png
    Any suggestions?

  2. #2
    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)
    There should be an open source platform engine here somewhere which does this and more.
    Try searching for it maybe.

  3. #3
    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,303
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by OldLongDragon View Post
    This is one I have surely struggled with, like how to make an object such as a homing missile that would hug the ground and follow an irregular floor. However, if you tell it to stop if it collides with the background while increasing or decreasing the X-coordinate, this can seem almost contradictory. But for me, if this feature is not doable, I will not do it and I will find something else. Things do get cut from the finished product.
    You would not believe how many things get cut from finished products. I know about a whole wiki dedicated to things that exist in games' code/graphics/etc. that aren't used. However, what you are asking for is certainly do-able (the home-on missile that follows an irregular floor). Also, the "moving up and down slopes" is also possible, and is actually a feature of the Platform Movement object. If you want me to give you a link to the wiki, please PM me.

  4. #4
    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,303
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by OldLongDragon View Post
    To make a simple movement, all there would have to be is a slanted hill, and a platform movement with an assignment to stop when it collides with the background. But I assume you'd want it to be able to slide down like seen in some games.
    The platform movement wouldn't be ideal for that, as it would be really buggy. However, the platform movement OBJECT isn't nearly so bad, though I don't know how well it handles multiple objects (maybe combining it with ForEach loops could pull it off).

  5. #5
    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,303
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by OldLongDragon View Post
    I don't quite grasp what's so big about this "for each" stuff that everybody seems to extol the virtues of. There really wouldn't have to be that many objects on the hill at any given time. Otherwise the end user would get pretty overwhelmed pretty quickly. I wouldn't know where to access this "for each" stuff, and it strikes me as plumb useless. What if the end user's computer wasn't compatible with this, or didn't have the memory. Would it not cause your game to crash? And I do know how frustrating that can be.
    You really don't know what a ForEach loop is, do you? It isn't something that a computer supports, it's an extension for MMF2, though it really should have been a built-in feature. Also, the Platform Movement Object doesn't support more than one object at a time, which is why one would use a ForEach loop to make it support multiple objects. Also, if a computer can't handle a ForEach loop, it probably can't handle a Fastloop, either, as ForEach loops are faster. It also probably couldn't run most modern-day games if it couldn't run a ForEach loop, even things like Bit.Trip Runner. It wouldn't cause your game to crash, nowhere near. The real things that cause games to crash are 100+ Fastloops being run every frame, or having 3000+ objects existing at a time without any Fastloops. ForEach loops aren't anywhere near as slow as Fastloops. Replacing Fastloops with ForEach loops actually greatly improves performance.

  6. #6
    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,303
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by OldLongDragon View Post
    Even if was an extension for MMF2 (which is what I know it to be), still, you can hardly expect the end user's computer to be top of the line, and maybe it improves performance on computers that are already high performance. And for me, it's about simplicity in its design. Why would you need a hundred anything loops? And why would you need 3000 objects or more? This does cause a computer to crash, but it can also seem rather cluttered for the person playing it. Even somebody qualified for the upper echelon of MENSA would get confused and overwhelmed here. And why would the platform movement object need to support more than one at a time? It's impossible for a human player to control more than one object at a time, and anything else would be too confusing.
    What if you need enemies to use the platform movement object? My computer is what you would call low-end, by the way. It hardly has a graphics card at all, only mid-level RAM (I think it was 2 GB), and it doesn't exactly have a state-of-the-art processor, either, or anything near one. It also runs Windows Vista, which is known for hogging up RAM. ForEach loops give me a significant performance boost. It really, really, really, REALLY, REALLY boosts performance. A lot. Especially when compared to Fastloops. I have replaced maybe two or three Fastloops with ForEach loops in one example, and turned on HWA. Without replacing the Fastloops with ForEach loops, it only improves performance so much. With the replacement, it runs lightning fast.

    Anyway, let's stop arguing, shall we?

  7. #7
    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,303
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by OldLongDragon View Post
    I thought the platform movement object was created for player controlled objects. I would assign the bouncing ball or pinball movement to an enemy character and then use the event editor to assign behaviors and AI and things like that.
    The platform movement is. The Platform Movement OBJECT isn't. Look at this example/tutorial to see what I mean. The frame with the enemy in particular.

  8. #8
    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)
    To clarify the merits of ForEach:

    Normally when you are looping through objects, you need to give each one a unique ID value and run a fastloop that compares against the ID value.

    Start of Frame
    --> Spread Value 0 in ID

    Start of Frame
    --> Start Loop "Search" NObjects times

    On Loop "Search"
    If ID == loopindex("Search")
    --> Do Action

    This is a basic loop that will perform an action on each object. The problem comes in the last event, where you compare ID to the loopindex. For MMF2 to isolate the object, it needs to compare the loop index against every object EVERY iteration of the loop. If you have 12 objects, MMF2 will perform 144 value checks. If you have 100, it will perform 10 000. This is why people extol the virtues of ForEach. ForEach will run X comparisons where X is the number of objects, while the standard loop method will run X▓ comparisons.

  9. #9
    No Products Registered

    Join Date
    Jan 2013
    Location
    UK
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by path View Post
    I'm really stuck on this and i need another way to make a player move up/down slanted hills. I'm currently making the player move by adding/subtracting to his X posistion.
    https://dl.dropboxusercontent.com/u/97046746/xymove.png
    And I came up with adding to his Y horizontal movement to make him move upwards/uphill, But its not really working well for me.
    https://dl.dropboxusercontent.com/u/97046746/uphill.png
    Any suggestions?
    here you go me and salamanderpants wrote this between us, it will do what you asked slopes its using the platform movement object and also to get round the limits of that someone ells mentioned of only being able to control one active with the PMO then just place two platform movement objects in and just rename them , you can have as many as you want then and each can control different things like enemy Ai witch is what i used the second platform movement object for, download the PMO engine version 2.3 as that got the buds fixed http://community.clickteam.com/threads/79240-Platform-Movement-Object-%28PMO%29-base-engine it open sorce use as you want iv moved on to more complex things that im stuck with LOL but il figure out in the end damm box2d animations but iv done a few thing with box2d that iv not seen anyone ells achieve yet so il get there and may release the sorce as well anyway download that PMO engine should do what you need

Similar Threads

  1. Move player while he's on a moving platform?
    By BartekB in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 19th November 2013, 04:25 PM
  2. Able to randomly make a character move towards player one?
    By koltzc in forum Multimedia Fusion 2 - Technical Support
    Replies: 17
    Last Post: 7th February 2013, 12:52 AM
  3. How do I make My player move as if it were snapped onto a grid?
    By Daniel_M in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 24th January 2013, 10:27 AM
  4. How to get player to move an object
    By samdaman719 in forum The Games Factory 2 - Technical Support
    Replies: 1
    Last Post: 18th August 2008, 09:38 PM
  5. Want to select a player then make him move.
    By GameDesigner in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 27th February 2007, 10:00 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
  •