User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14

Thread: Worlds- html game graphics jittering and pc version movement issues

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS 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)

    Join Date
    Dec 2010
    Posts
    174
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    Worlds- html game graphics jittering and pc version movement issues

    I've just started work on a new game and there is a discrepancy between the html5 and pc versions.

    http://www.johnhenderson.com.au/Worlds

    Basically you click on the trees to move your character to new locations and explore. The pc version is smooth as with all of the rotations and translations that make of the parallax working with floats(by the simple expediency of multiplying formulas by 1.0.

    The pc version has a different issue, instead of jumping between the locations, the character teleports, ignoring the easing between locations.
    Any ideas?

  2. #2
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,373
    Mentioned
    219 Post(s)
    Tagged
    4 Thread(s)
    can you post a small mfa that do the same without using your graphics, for me to test here (different graphics with same size)
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS 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)

    Join Date
    Dec 2010
    Posts
    174
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    graphics jitter - mfa posted

    Quote Originally Posted by Fernando View Post
    can you post a small mfa that do the same without using your graphics, for me to test here (different graphics with same size)
    Hi Fernando, thanks for the quick reply. Here's the mfa with non essential functions stripped out, and the graphics replaced(alpha channels reduced to 1 bit masks).

    WorldsMinimal.mfa
    I'd also like to really know why the player graphics disappears instead of moving in the pc runtime.

  4. #4
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,373
    Mentioned
    219 Post(s)
    Tagged
    4 Thread(s)
    Please extract the file inside data/runtime/Html5 make a backup of the original just in case

    build using the build menu as you usually do the first time and test. let me know your results


    you player appears in windows when you set: create at start, sorry I did no see where you create this object during runtime

    but seems Ok here
    Attached files Attached files
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS 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)

    Join Date
    Dec 2010
    Posts
    174
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Thanks Fernando for the awesome support! Compiled with the new actions file and tested in firefox chrome edge and explorer. Jitter is gone and it works perfectly.

  6. #6
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS 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)

    Join Date
    Dec 2010
    Posts
    174
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    @Yves I've just got off support from Fernando. There's an issue with the pc runtime where the character teleports around the screen rather than flying smoothly from place to place.
    The relevant event line is global 48.
    to replicate simply load the file and run the application. click on the trees and the character will fly(or teleport) to the clicked on tree. run it as a html file and the difference becomes obvious.
    Thanks in advance.

  7. #7
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    13,459
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    I'll check.

    PS: I'm not sure if I agree with the fix Fernando made, the code he removed was probably added for a reason, positions in Fusion are integers and not floating point values and there is a chance this code had been added to fix something else that must be now broken. I'll check it too.

  8. #8
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    13,459
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    The error in the line #48 is that you do:

    JumpTimer( "Player" ) / JumpDuration( "Player" ) * 1.0

    What happens is that you divide an integer value by another value, which gives an integer value (you lose the decimal part in this operation), and then multiply by 1.0 to convert it to a floating point value. As JumpTimer is always less than JumpDuration the result will be always 0.0.

    This works in HTML5 probably because in HTML5 there are only floating point values and probably for some reason (bug?) in this case the result of the integer division is not rounded to the nearest integer.

    The correct way of getting a floating point value from an integer division is this:

    (JumpTimer( "Player" ) * 1.0) / JumpDuration( "Player" )

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall CreatorInstall 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
    Aug 2006
    Location
    France
    Posts
    1,218
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

  10. #10
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS 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)

    Join Date
    Dec 2010
    Posts
    174
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Yves View Post
    The error in the line #48 is that you do:

    JumpTimer( "Player" ) / JumpDuration( "Player" ) * 1.0

    What happens is that you divide an integer value by another value, which gives an integer value (you lose the decimal part in this operation), and then multiply by 1.0 to convert it to a floating point value. As JumpTimer is always less than JumpDuration the result will be always 0.0.

    This works in HTML5 probably because in HTML5 there are only floating point values and probably for some reason (bug?) in this case the result of the integer division is not rounded to the nearest integer.

    The correct way of getting a floating point value from an integer division is this:

    (JumpTimer( "Player" ) * 1.0) / JumpDuration( "Player" )
    Thanks @Yves , makes perfect sense. Based on your answer I went back and corrected/added *1.0 to my parallax setup, which removed the jitter in the initial version without the need for @Fernando 's modification.
    Just so I understand , I should add the 1.0* at the beginning of any float equation, or at the beginning of any multiplication/division eg
    1.0*(12+(5/7)) or 12+(1.0*5/7)

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Problems with jittering when using float movement!
    By Storsorgen in forum Fusion 2.5
    Replies: 0
    Last Post: 23rd June 2019, 02:24 PM
  2. fusion 2.5 free version build html 5 problem
    By farhad in forum HTML5 Export Module 2.5
    Replies: 16
    Last Post: 17th October 2014, 10:01 PM
  3. do we get a lite version of HTML exporter?
    By rubes in forum HTML5 Export Module 2.5
    Replies: 3
    Last Post: 26th August 2014, 04:54 PM
  4. Clickteam 2.5 graphics card issues?
    By sheppard1 in forum Fusion 2.5
    Replies: 2
    Last Post: 6th June 2014, 02:35 PM
  5. Movement and game Board Issues
    By RobTheBuilder in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 22nd June 2007, 03:29 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
  •