User Tag List

Results 1 to 7 of 7

Thread: BUG with center screen to an object

  1. #1
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    Sphax's Avatar
    Join Date
    Jun 2006
    Location
    Paris, France
    Posts
    4,454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    BUG with center screen to an object

    When the screen is centered on an object, depending on the device, the screen is not centered well.

    How to reproduce the bug:
    Set the application size to "640x960" (iPhone4 size)
    Always center screen at 0,0 of an object which move (like a bouncing ball)
    Set application iOS option to "fit inside and resize frame"
    Run the application on an iPhone5 or iPad =>
    > on iPhone5 you'll have a mis-alignment on Y (the difference between height of iPhone5 and height of iPhone4)
    > on iPad you'll have a mis-alignment on X (the difference between width*ratio of iPad and width of iPhone4)

    The workaround is to use the object "Window control" to get the window frame size and to compare with the frame size (which is still the original value). However, it's a strange behaviour I think.

  2. #2
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, ┼rhus
    Posts
    3,455
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    I cannot reproduce this even with extreme window sizes:
    http://www.andersriggelsen.dk/clickt...CenterTest.mfa

    Are you sure your hotspot in the object is set correctly? If you center at 0,0 at an object and then center at that position it will appear to be offset from the center.

  3. #3
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    Sphax's Avatar
    Join Date
    Jun 2006
    Location
    Paris, France
    Posts
    4,454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Anders,
    I'll check your example and reproduce the bug in a testable MFA and I'll post it here.

  4. #4
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    Sphax's Avatar
    Join Date
    Jun 2006
    Location
    Paris, France
    Posts
    4,454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anders, please, can you have a look at this MFA example which reproduces the bug?

    Also, notice the other bug about the "Wrap" options of the layers.

    The bug is reproduceable on iPhone5 and iPad because the main screen size doesn't have same ratio as the app. In this particular case, it seems that the frame size doesn't have the right values.

    ScrollCenterBug.mfa

  5. #5
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, ┼rhus
    Posts
    3,455
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Thanks for the file. I'm looking into it.
    The reason why my example file worked and this didn't was because of the frame size. Your example uses the virtual width and height.

  6. #6
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, ┼rhus
    Posts
    3,455
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    I have fixed the scroll center bug but the layer wrapping bug is much more difficult to fix.

    The problem arises from resizing the window size to a different size than the actual frame size.
    Basically this gives you a larger window size than the frame size - but the iOS runtime isn't supposed to center the frame inside the window in this case.

    I'm not sure how to fix this to work as expected for everybody.

    One solution is to resize the frame-size to the window-size if the virtual width and height is -1. This has the problem that your backdrop (original sized) will not repeat perfectly. You would have to make some sort of intelligent background that sized itself perfectly to the new frame size for it to repeat seamlessly. I don't think this will work out for all users since some might just expect the original old frame size to repeat itself.

    Is it possible for you in your case to expand the frame size to be larger than the maximum possible size the window will be resized to (taking the ipad/iphone5 aspect ratios into account) and do runtime checks? Generally having a smaller frame size than the largest possible window size is a bad idea.

  7. #7
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    Sphax's Avatar
    Join Date
    Jun 2006
    Location
    Paris, France
    Posts
    4,454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Anders. The main bug was the center screen feature which was bugged for me. I seen the repeat layer option bugged while making the example which reproduce the bug (I don't use this feature myself).

    Currently I saize my applications with the iPhone4 screen size and then I scale the rendering with the option of MMF2. However, I don't know if it would not be better to scale the application to the iPad3 (the maximum screen size) and scale it down. But I expect a big performance drop if I do so (because of bigs graphics and because of the big overall downsizing)... :s

Similar Threads

  1. Screen moves like in Mountain Lion Notification center
    By iOSC in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 23rd January 2013, 04:25 PM
  2. main character is always the center of the screen
    By mnovoa in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 29th May 2012, 01:11 PM
  3. Game Center Object?
    By Xeeko in forum iOS Export Module Version 2.0
    Replies: 9
    Last Post: 22nd November 2011, 12:13 AM
  4. Center the screen
    By Rabagast in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 20th May 2009, 03:25 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
  •