User Tag List

Page 4 of 5 FirstFirst ... 2 3 4 5 LastLast
Results 31 to 40 of 48

Thread: set X to X -0.3 moves by -1.0 : bug or feature?

  1. #31
    Clicker 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)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,306
    Mentioned
    94 Post(s)
    Tagged
    0 Thread(s)
    Well you've been super useful. It was you who pointed us all to the source of the issue, which was Fusion's automatic flooring. Thanks

  2. #32
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCiOS 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)
    fnkycoldmadeanr's Avatar
    Join Date
    Jul 2017
    Location
    Melbourne, Australia
    Posts
    112
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Doing some tests for myself and it seems to me it is rounding towards the 0,0 position/co-ordinate
    so if the object is in the minus it rounds toward 0 position
    and if the object is in the plus it rounds toward 0 position

  3. #33
    Clicker 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)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,306
    Mentioned
    94 Post(s)
    Tagged
    0 Thread(s)
    Can you post an mfa? And what happens when you replicate the actions I screenshotted earlier? Do you not get one active moving and one stationary?

  4. #34
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export Module
    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)

    Join Date
    Aug 2018
    Posts
    36
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    i made an mfa with the actions you posted Vol and its the same. I thought it would round down if it was -0.5 or below. That made sense to me.

    I added in -0.6 and +0.6 and that broke my brain a little. I expected +0.6 to become +1 and move the active also but it also rounds down to 0.

    i made it so press space and the actives move and chucked in some counters to show the positions. This is getting very interesting.

    edited this and added in +1.9 and - 1.9

    So any thing below 1 gets rounded down not anything below 0.5 .

    More decimal places test2.mfa

  5. #35
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export Module
    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)

    Join Date
    Aug 2018
    Posts
    36
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    cant stop thinking about this for last hour. Only way it makes sense to me is this.

    The always event and repeat while pressing key is tied to the game loop or game frame rate. If that's the case then it will not be able to handle anything less than a whole number.
    Because you can not have less than a complete game loop or a complete frame. This must be why we need to use alt values or other ways to go around the game loop or frame limit.

  6. #36
    Clicker 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)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,306
    Mentioned
    94 Post(s)
    Tagged
    0 Thread(s)
    @c4t : I think everything gets rounded down, including the 1.9 in your example. If you look carefully you'll notice that the green 1.9 in your example moves twice as slow as the red -1.9, because 1.9 has been rounded down to 1, but -1.9 has been rounded down to -2.

    @fnkycoldmadeanr I re-read your post and I understand what you mean now. Yes, you're right! So, if you set up an MFA like this, both arrows keep moving until they hit the X=0 coordinate:

    the 0.0001 rounds UP to 1 until the object hits x=0, and then rounds DOWN to 0. Meanwhile:
    the -0.0001 rounds DOWN to -1 until the object hits x=0, and then it rounds UP to 0!



    This makes it very counter-intuitive indeed, as not only do positive and negative numbers get treated differently, but even the same exact number gets treated two different ways depending on where the object's X hotspot is. I'd be very curious to see what @Yves has to say about this, though my guess is that there's some under-the-hood technical or performance reason for this. So we probably just need to accept it, and be vigilant about converting XY positions to integers ourselves before passing them over to Fusion. Though if this behaviour does indeed stem from a performance-related reason, I wonder whether the user manually forcing numbers to int() every frame might end up being more costly in the long run.

  7. #37
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export Module
    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)

    Join Date
    Aug 2018
    Posts
    36
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I did some more tests and it looks like its linked to the frame rate or game loop speed. If you change your frame rate to 10 or any other speed in the application run time settings, it slows or speeds up everything. It makes sense that the loop is dictating the speed of always event or repeat while a key is pressed. Effectively controlling it with a whole number. We can not have half a frame or half a game loop.

  8. #38
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCiOS 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)
    fnkycoldmadeanr's Avatar
    Join Date
    Jul 2017
    Location
    Melbourne, Australia
    Posts
    112
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    I didn’t save it Vol but your image is pretty much what I done except I used buttons to move the active
    I will remake it and do some more tests to try and change the behaviour

  9. #39
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCiOS 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)
    fnkycoldmadeanr's Avatar
    Join Date
    Jul 2017
    Location
    Melbourne, Australia
    Posts
    112
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    FusionFloattoInt.mfa

    Profiler has some head scratching results manually converting seems faster in some cases for me

    Maybe try with VolProfiler @Volnaiskra

    I split the events/actions up to try and get more accurate results

    I guess another thing will be integer values other than Position which don't go negative pretty much = floor(value)

  10. #40
    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)
    Fusion's position actions use int() on the final result.
    So:
    50 + 0.1 = 50.1
    int(50.1) = 50

    50 - 0.1 = 49.9
    int(49.9) = 49

    Even if you use 0.00001 you'll get 49:
    50 - 0.00001 = 49.99999
    int(49.99999) = 49

    With a negative example:
    -1 - 0.01 = -1.01
    int(-1.01) = -1

    Here's an example showing that Fusion does in fact use int() and not floor():
    PositionInt.mfa

    @Manuel You can do * 1.0 or + 0.0 to turn the value you're multiplying or adding to into a float
    But that doesn't matter either way, because if you do turn it into a float, Fusion will int() it regardless within the Position action expressions
    - BartekB, a.k.a Uppernate
    Join the Click Converse Discord! - https://discord.gg/7RNXFrC
    Dungeon Raiders! - Link soon™

Page 4 of 5 FirstFirst ... 2 3 4 5 LastLast

Similar Threads

  1. Grass that moves when the player walks over it.
    By BrianK in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 12th July 2017, 08:25 PM
  2. Replies: 1
    Last Post: 28th May 2015, 08:12 PM
  3. Advanced Special Moves Example
    By N64Mario in forum Guides, Tutorials, Examples, Widgets
    Replies: 1
    Last Post: 4th March 2014, 01:58 PM
  4. Moves left more than right
    By Holden in forum File Archive
    Replies: 8
    Last Post: 28th March 2008, 03:47 AM
  5. space bar moves it
    By delusan in forum The Games Factory 2 - Technical Support
    Replies: 4
    Last Post: 27th May 2007, 06:35 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
  •