User Tag List

Page 1 of 5 1 2 3 ... LastLast
Results 1 to 10 of 48

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

  1. #1
    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,272
    Mentioned
    90 Post(s)
    Tagged
    0 Thread(s)

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

    I just noticed that

    Code:
    * Always
    	Active: Set X position to X( "Active" ) - 0.3
    will move the active 1 pixel each frame, while

    Code:
    * Always
    	Active: Set X position to X( "Active" ) + 0.3
    will not move it at all. Is this expected behaviour? I personally would have expected neither to move the active.

  2. #2
    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)
    sub pixel movement explained by Almighty zen taco https://www.youtube.com/watch?v=4isI09Naa70

  3. #3
    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,272
    Mentioned
    90 Post(s)
    Tagged
    0 Thread(s)
    I think you misunderstood my post. I know what subpixel movement is and how to achieve it, but it's irrelevant to the question being asked here, which is about whole pixel movement.

    When Fusion moves something using the Set X position to.... action it uses whole pixels. The question is, why does Fusion convert 0.3 to a whole pixel value of 0, while it converts -0.3 to a whole pixel value of -1.0? If almightyzentaco happens to explain this somewhere in the video then please offer a timestamp. Forgive me if this sounds rude - that's not my intention - but I'm not watching a 30 minute video just to find out that it's got nothing to do with my question because you misunderstood it.

  4. #4
    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)
    maybe i did misunderstand , i thought 0.3 is less that one pixel. . He explains it within the first 5 mins why fusion is moving things at 1pixel per frame. He calls it Flawing as Fusion rounds down to whole pixels. so 0.3 rounds down to 0 .. 2 mins 50 .. if that does not help sorry for wasting your time ..

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator Pro
    Julian82's Avatar
    Join Date
    May 2012
    Location
    outbuddies.com
    Posts
    943
    Mentioned
    47 Post(s)
    Tagged
    0 Thread(s)
    I would consider this a bug. Maybe the inconsistency only occurs in the 0 to -1 range. Would be interesting to see what -1.3 does.

  6. #6
    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)
    The question is, why does Fusion convert 0.3 to a whole pixel value of 0, while it converts -0.3 to a whole pixel value of -1.0?
    To me it makes sense that 0.3 gets rounded down to 0 and it also makes sense that -0.3 gets rounded down to -1 Because Fusion flawing is rounding down to whole numbers.

  7. #7
    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,272
    Mentioned
    90 Post(s)
    Tagged
    0 Thread(s)
    Well if Fusion floors things automatically, then at least there's a logic to it, and it's not technically a bug. But in that case it seems like a design flaw in my opinion, though maybe there's a reason for it, like flooring numbers being cheaper on the cpu than truncating them, or something.

    But in game development, negative values are used all the time, and usually there needs to be a perfect symmetry with how they're treated versus positive numbers.

    For example, the reason I stumbled upon this in the first place was because I'd just spent a frustrating hour bug hunting trying to figure out why some of my objects were moving when they shouldn't be. Turns out it's because the objects had little remainder amounts (less than 0.5 or more than - 0.5) in their movement variables which I wrongly assumed Fusion would unilaterally ignore. So those objects travelling right or down would slow to a full stop while those moving left or up would move forever.

  8. #8
    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)
    Yes that was the point i was trying to get across. That Fusion Floors automatically . I realized spelling was floors not flawing after i searched a few math sites.
    After what i thought was logic was questioned.
    I made an example to test it again and it still worked like i thought. . I am no math wiz but have a keen memory and what the Almighty Zen Taco said stuck in my brain.
    heres my small test Mfa . for any one that wants to see it in action . Hold D and the counters show the values are whole numbers.

    subpixel_test1.mfa

  9. #9
    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)

    Join Date
    Feb 2017
    Posts
    340
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    I think the last comment on that thread by Jacob explains it very clear, what happens is "flooring" as said already above.

    https://community.clickteam.com/threads/72240-Value-greater-lower-than-X-5?highlight=flooring

    "Flooring the values is logical, actually. The coordinates on the field are not the pixels, but actually the vertices on the top left of each pixel. Single points, rather than 2D areas. If you are at ordinate 24.7, you still fall within the pixel that corresponds to 24, not 25. For this reason, I never use Round() when I pass my float values to MMF's integral positions."

  10. #10
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)
    elvisish's Avatar
    Join Date
    Oct 2014
    Posts
    677
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    What would the workaround be for consistency in a situation such as this?

Page 1 of 5 1 2 3 ... 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
  •