User Tag List

Results 1 to 4 of 4

Thread: Konidias 8 direction fast loop collision example - fixing diagonal speed

  1. #1
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Location
    USA
    Posts
    2,970
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Konidias 8 direction fast loop collision example - fixing diagonal speed

    This example works perfect but the diagonal speed is faster than horizontal or vertical and I'm trying to overhaul this to get it to work. The speed difference isn't huge but I can notice it. I tried doing my own custom movement a long time ago using Sin and Cos expressions but I ultimately scrapped it because of various problems I was encountering.

    http://community.clickteam.com/threads/62097-8-direction-fastloop-movement-collision-example

    I reproduced the example on my own which might be easier to quickly parse since it's barebones (see attached)
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    marius's Avatar
    Join Date
    Dec 2015
    Location
    Oslo, Norway
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you dont do anything with the vertical and horizontal speed when you press for 2 directions, it will move too fast. What first comes to mind is that you must divide the movement speed by 2, but Im not sure if this is correct.. Could be you must multiply it by cos(45).
    Either way, you must make some new events on the top (or at least somewhere before the events you have now). Since you are using the same alterable value for both directions, I guess you can make an Always event to set the movement speed to original speed (save this in another alterable value). Then make another event to check for up+right OR up+left OR down+right OR down+left. If true, set movement speed to movement speed * X (try X as 0,5 or cos(45) and see which makes the most sense). Geometry is not my strongest skill, but I know from before that leaving this untouched will make a wrong output

    Hope you get what I try to say :P

    Edit:

    Working with decimals is a bit tricky in Fusion 2.5, but here is a demo to demonstrate what I mean, using a little tweak in how the movement works. The red object does not have any changes to movement speed, and the green object have applied what I mentioned above.
    DiagonalSpeed.mfa

  3. #3
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleInstall Creator Pro
    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)
    BartekB's Avatar
    Join Date
    Aug 2013
    Posts
    622
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Here are two ways of doing it, with fastloops and with physics.
    8Directions-Fastloops-and-physics.mfa
    - BartekB, a.k.a Uppernate
    Join the Click Converse Discord! - https://discord.gg/7RNXFrC
    Dungeon Raiders! - Link soon™

  4. #4
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Location
    USA
    Posts
    2,970
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys! This is a life saver. I was banging my head on my keyboard trying to solve this on my own lol. Marius, I tried adding fastloop collision to your example but couldn't get it working properly (my fault). BartekB, your fastloop example is exactly what I needed it to do.

Similar Threads

  1. 8-Direction movement diagonal speed
    By PaulFoster in forum Fusion 2.5
    Replies: 4
    Last Post: 7th April 2016, 12:24 PM
  2. Replies: 2
    Last Post: 27th May 2015, 02:00 PM
  3. compensation the diagonal movement speed
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 27th April 2013, 10:38 PM
  4. Fast loop within fast loop - platform game
    By Safe in forum The Games Factory 2 - Technical Support
    Replies: 1
    Last Post: 16th April 2010, 07:38 AM
  5. Method of correcting speed when diagonal moving
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 19th March 2010, 02: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
  •