Clickteam Fusion 2.5

Clickteam Fusion 2.5

Not enough ratings
Differences Between iOS and PC applications
By kisguri
Here is a small guide to help explain some of the differences between iOS and PC app development within CF2.5/MMF2
   
Award
Favorite
Favorited
Unfavorite
Sounds
Clickteam Fusion 2.5 offers you two ways of playing sounds.

  • The first one, called "AudioPlayer", is suitable for long sounds, like background music. Its main
    advantage is that it does not store the entire sound in memory prior to playing, thus taking less
    space. Its disavantage is that it takes some processing power when the sound is started, slowing
    down the application. This time lag makes it a bad choice for playing in-game sounds.
  • The second one, called "OpenAL", is suitable for short sounds. The sound must be stored in
    memory prior to playing, but it does not take any processing power when the sound is started.
    OpenAL is a good choice for short sounds in the middle of the game.

When you use a "Play sample" action in iOS mode, there is a new check box at your disposal, named "Play with AudioPlayer". This check box has three states :

  • Unchecked : the sound will be played using OpenAL
  • Checked : the sound will be played using AudioPlayer
  • Undetermined : Clickteam Fusion 2.5 looks at the duration of the sound. If it is less than 15
    seconds, then it is played with OpenAL. If it is more than 15 seconds, it is played with
    AudioLayer. This is the automatic mode.

The default setting is automatic mode. Basically, you should check the box only for background music, or leave it undetermined. Please note that the Set Sample Position action and the Get Sample Position expression work with AudioPlayer, but not with OpenAL, and that the Set Sample Frequency action works only with OpenAL.

MP3: iOS supports MP3 sounds. The iPhone exporter for Clickteam Fusion 2.5 adds an MP3 filter to allow you to insert MP3 sounds into your applications. Be careful though as the iPhone/iPad/iPod have a single MP3 hardware decoder, so you should use MP3 sounds only for background music and not play several MP3 sounds at the same time. You can also use the new MP3 filter to play MP3 sounds in your Windows applications, however this filter just calls the decoding API of Windows, so it depends on codecs that are installed on the user's machine (Windows is usually provided with a MP3 codec though). Note: if you redistribute an application that contains MP3 sounds you may need to get a MP3 license (at the date this documentation was written, a license was not required for any entity with a MP3-related gross revenue less than $100,000, but the terms of this license may change, check them from time to time on mp3licensing.com).
Edit Object
The iOS runtime supports the EDIT object, but you must be aware that only a few properties of the
object are supported under iOS :

  • Multiple-lines
  • Border only for single line objects
  • Editable, only for single line objects
  • Vertical scroll-bar only for multiple line objects
  • Text and background color
  • Object font

The object also uses the standard iOS keyboards, and is automatically positioned in the center of the screen above the keyboard when editing. If you want a finer control on the objects, just use the iOS Single Line Edit object, or the iOS Multiple Lines Edit Object.
Running the application on various devices
Clickteam Fusion 2.5 does its best to allow your application to run on various screen sizes.

  • The window size of the application is smaller than the device screen size
    The application is zoomed and centered in the display. You do not need to worry about anything,
    the process is completely transparent to you (screen and touch coordinates are zoomed etc). For example, it's possible to run a 320x480 application on an iPad.
  • The window size of the application is bigger than the device screen size
    The application is reduced and centered on the device screen. Here too the process is completely transparent to you. It is possible to run an iPad application (768x1024) on a 3rd generation iPhone (320x480).
  • The application is the same size than the device screen
    The application is displayed without zoom.

The auto-zooming feature of Clickteam Fusion 2.5 allows you to create applications in the best possible resolution without having to worry about which device it will run on. For an iPhone application, we suggest that you choose a window size of 640x960 : it will be displayed in high resolution on a iPhone 4th Gen and over, and will work fine too on a 3rd and 2nd gen iPhone.
Fonts & Strings
PC fonts are replaced by their iOS equivalent when running on the device. Some things to know :

  • Some of the fonts do not contain Italic or Bold, or both at the same time.
  • The Helvetica font is mapped to the system font on iOS (which is a Helvetica font by the way). So
    if you prefer to use the system font, choose Helvetica on the PC. The system font can be bold or
    italic but not at the same time.
  • If a font does not exist on iOS, the system font replaces it.

String objects

The fonts on iOS do not have exactly the same size as their PC equivalent. You might have to enlarge the string objects so that the text is displayed properly.
Older devices and the HWA exporter
3G and 2G iPhone and iPod (3GS and up aren't affected) have some limitations when it comes to the HWA blending modes.

  • Blending coefficients are applied after the ink effect is applied. This means that using the 'invert'
    ink effect does not give the same results.
  • Drawing gradient or solid color quick backdrops does not draw if you give them a blending color
    or transparency.
2 Comments
kisguri  [author] Mar 26, 2015 @ 8:37am 
What I do for iOS is work in 1136x640 currently, then I right routines that will reposition items at start depending on if the device is using the older res (like on ipad 960x640) or the current new one, I do this based on if I am making a portrait or landscape app, which determines if I adjust based on X right edge of screen ot Y right edge of screen. This helpful especially for items that are HUD and are relatable to the viewable area of the screen.
soup Mar 26, 2015 @ 1:07am 
About the resolution thing, if I do what it suggested, will it work well for phones after 4thgen iphone?