User Tag List

Results 1 to 5 of 5

Thread: Help with fitting my game to all iOS Devices ? (resolution , object position)

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)iOS Export Module (Steam)

    Join Date
    Jan 2015
    Posts
    262
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Help with fitting my game to all iOS Devices ? (resolution , object position)

    Hey,

    I need help with resolution in my game. I’m creating game for iOS and before iPhone X was released everything was good. Now I have to filled all frame space.

    I use on my project – portrait - resolution 320 x 480. My frame resolution is 360 x 693. I use on my project „Display properties” for iOS – Fit inside and adjust window size, so my game should be fitted to all Apple devices (iPhone X, iPhone , iPad).

    1. How Can I identify the type of device ? I would like to events like -> If this device is iPhoneX (Condition -> Set object „Player” position on X or Y coordinate). Is it possible ?
    2. Does anyone have an idea how Can I Set Camera on the centrer of the screen (x coordinate) and on the bottom (Y Coordinate) without using Center Display at …. ? (When I'm not using Center Display at.... then I can't see right part of the display.
    3. How to properly arrange active objects depends on the type of device or display ? ( I use Set X Coordinate to X Right Frame / 2 but it is not working when my width resolution is 320 px. It is working only when width resolution is 360 px.
    4. I prepared example with my problem. You have to change project resolution to 320 x 693 or 320 x 569 or 360 x 693 and then you’ll see what I mean. You have to click on the black Player object then green object sholud be set on the center of the screen. ->>>> https://www.dropbox.com/s/0zzewb23bz...oject.mfa?dl=0 <<<<-
    5. Is it possible to determine the position of the camera without events ?






  2. #2
    Clickteam Clickteam
    Olivier's Avatar
    Join Date
    Jun 2006
    Posts
    2,995
    Mentioned
    9 Post(s)
    Tagged
    1 Thread(s)
    To position the display window in the horizontal center and bottom of the frame, the easiest way is to position a dummy active object at the desired location in the frame, and then center the display at 0,0 from that active object.

    To center an object horizontally in the display window, you need to know the position in the frame of the left and right edges of the display window, and do some basic maths.

    Formula to get the horizontal center of the display window in the frame:
    Code:
    X Left Frame + ( X Right Frame - X Left Frame ) / 2
    Formula to get the vertical center of the display window in the frame:
    Code:
    Y Top Frame + ( Y Bottom Frame - Y Top Frame ) / 2
    X Left Frame, X Right Frame, Y Top Frame and Y Bottom Frame are expressions of the Storyboard Controls object (a system object). They return respectively the horizontal position in the frame of the left and right edges of the display window, and the vertical position in the frame of the top and bottom edges of the display window.

  3. #3
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)iOS Export Module (Steam)

    Join Date
    Jan 2015
    Posts
    262
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    -> Olivier

    Thank you for your help. I tried you idea with Active Object and Center Frame for this object before I posted on forum but it did not solve my problems.

    I deleted conditions " Center Display at ... " and use for all objects conditions:
    X Left Frame
    X Right Frame
    X Bottom Frame
    X Top Frame

    When I don't use "Center Display at..." form Storyboard Controls everything works great. I tried my app on iOS Simulator and Real Device with my resolutions and I found good solution for it ( I set counter to Y Bottom Frame and X Right Frame. Then I tested this small app on all iOS Devices - simulator - and checked real resolutions).

    Below I show you my solution. Using these events I can fit everything in my game. About resolution (portrait):
    360 x 480 - for all iPads
    320 x 567 - for iPhone SE and 5S
    320 x 567 - for iPhone 6,7,8
    320 x 568 - for iPhone 6 Plus, 7 Plus , 8 Plus
    320 x 692 - for iPhone X
    320 x 693 - for iPhone X



  4. #4
    Clicker Fusion 2.5 Developer

    Join Date
    Feb 2014
    Posts
    959
    Mentioned
    16 Post(s)
    Tagged
    1 Thread(s)
    the solution is simple, u forget about that piece of garbage called the iphone x

  5. #5
    Clicker

    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)

    Join Date
    Sep 2015
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually not sure you should bother with the iPhone5 and below. Apple doesn't support them any longer.

Similar Threads

  1. Replies: 6
    Last Post: 12th April 2018, 12:23 AM
  2. Replies: 6
    Last Post: 19th April 2016, 02:23 AM
  3. Resolution downscaling on mobile devices
    By Ninjadoodle in forum Fusion 2.5
    Replies: 2
    Last Post: 29th April 2014, 04:13 PM
  4. Virtual joystick position incorrect location on various devices
    By jfohl3r in forum Android Export Module Version 2.0
    Replies: 3
    Last Post: 11th March 2014, 03:09 AM
  5. Fitting text into a string object.
    By Filip in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 25th November 2013, 02:57 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
  •