User Tag List

Results 1 to 7 of 7

Thread: Platform game Elevator problem

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Matriax's Avatar
    Join Date
    Dec 2012
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Platform game Elevator problem

    I have a char moving always in 2 directions. The char and the box have a "platform movement" and the elevator is made with a Elipse movement. The character and box have a condition that stop when collide.

    Video with the elevator problem

    As you can see the problem with the box is more obviously but also happens with the char. In the flash version when the elevator goes up is practicaly imposible to jump.

    How can i fix that?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Matriax's Avatar
    Join Date
    Dec 2012
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by OldLongDragon View Post
    It seems as though the bouncing object which follows up and down the shaft can be distracting, but wouldn't it be easy to just say that if the box or player object collides with the elevator, to stop movement?
    The box and the char stop when collide with the elevator(if not the char and the box will continue to down..). In the case of the char is always moving because is part of the gameplay.

    I put the box to see better the problem. When the elevator goes up the box overlap down and when the elevator goes down the box do that :S .

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Matriax's Avatar
    Join Date
    Dec 2012
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I see this thread: http://community.clickteam.com/threads/48929-Elevators and a coment by DavidN:

    Yes - even though I didn't include it in my own tutorial because my method was too insane, Random came up with a much better way.

    http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=97773
    But the forum is closed :S . Can somebody say how its made?

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleXNA Export Module
    DistantJ's Avatar
    Join Date
    Jan 2008
    Location
    Gloucester, UK
    Posts
    2,144
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Hi Matriax. What I do is have an invisible object which always stays under the player's feet, if that's overlapping a moving platform and the player isn't jumping (not sure how to detect if jumping or not if you're using the default platform movement, I guess just check the jump button isn't being pressed...), then set the player's Y co-ordinate to the Y co-ordinate of the top of the elevator platform (or the top of it minus however many pixels, depending on the position of your hot spot). This works a charm with a self-coded platform movement but I'm not so sure how it would work with the built in one. Worth a try though.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Matriax's Avatar
    Join Date
    Dec 2012
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DistantJ View Post
    Hi Matriax. What I do is have an invisible object which always stays under the player's feet, if that's overlapping a moving platform and the player isn't jumping (not sure how to detect if jumping or not if you're using the default platform movement, I guess just check the jump button isn't being pressed...), then set the player's Y co-ordinate to the Y co-ordinate of the top of the elevator platform (or the top of it minus however many pixels, depending on the position of your hot spot). This works a charm with a self-coded platform movement but I'm not so sure how it would work with the built in one. Worth a try though.
    Yes i had a similar idea yesterday.

    If player touch elevator, Player Y is -48 (Player size) from elevator Y = set flag ON.
    If flag 1 is ON -> set Player Y = Elevator Y - 48.
    When press Jump -> Set Flag 1 Off
    (And the same for the box)

    This is the result: https://vine.co/v/bVmW9i7vKD1

    Now the box and the player are always above the elevator and no overlap when goes up or down.

    But.... still fails when jump: https://vine.co/v/bVmKDF9QMtg

    As you can see the box(quiet) jumps when the button is pressed but not the player(moving). This is the FLash version. In the Desktop version the player jumps when the box jumps all correct. I hate in the very depth when something works in the desktop version but fails in the flash version :P but also knows that when something is well coded works in all the versions

    Now i go to try your solution DistantJ and hope works correctly in desktop and flash (fingers crossed).

  6. #6
    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)
    Matriax
    The core of the problem you are experiencing ( obviously ) is the the infamous "Collision Mask Lag" problem.

    - Behind the sceenes, MMF2 uses Collision Masks for Active Objects.
    - When you do a 'Object A collideswith Object B' condition, Object Bs Collision Mask lags by 1 Frame

    ...
    There are 2 solutions to this problem.

    1
    This require you to use only square Objects as collision masks.
    To use this method you do a custom 'box collision' check ( instead of the built in collision check ) by compairing the Interacting Objects X and Y edge coordinateds against eachother.
    Objects X Y coordinates are allway up to date, hench no collision mask lag.

    2
    Set up the movement logic in the Event Editor like this:
    1 - Move Objects
    2 - Destroy Objects, and create new Objects at their place ( this will update the Collision Masks to the Objects correct current position )
    3 - Now do the regular built in Collision Checks

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Matriax's Avatar
    Join Date
    Dec 2012
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well finally using a mix of the DistantJ idea with me other one i fix it all the possible and seems that now works, thanks to all

Similar Threads

  1. Elevator issues?
    By toastersburnthings in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 23rd July 2012, 12:21 PM
  2. Draging "elevator" object with mouse?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 17th April 2012, 11:41 AM
  3. Platform Game Problem
    By Captain_Harris in forum iOS Export Module Version 2.0
    Replies: 9
    Last Post: 25th December 2011, 09:36 AM
  4. Platform game Help: Jump through platform slopes
    By Atherton in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 10th December 2009, 04:15 AM
  5. Vista 64 problem with platform game (pathnames?)
    By JoKa in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 15th October 2009, 03:39 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
  •