Clickteam Fusion 2.5 – iOS Runtime Distribution Agreement
This agreement replaces the standard Clickteam Fusion 2.5 Runtime Distribution Agreement in the case of iOS applications. In order to distribute your iOS application, your must agree to the Clickteam Fusion 2.5 – iOS Runtime Distribution agreement. Some parts of this agreement depend on the version of Clickteam Fusion 2.5 you use, Standard or Developer. Please read the sections that correspond to your version. These sections are marked either “Standard version only” or “Developer version only”. The Clickteam Fusion 2.5 – iOS Runtime Distribution Agreement is a legal agreement that allows users who have created applications with Clickteam Fusion 2.5 and the iOS exporter to distribute their applications outside of their organizations. Standard version only: this agreement includes requirements that affect your application. Including the logo (Standard version only) In order to be able to distribute your application, you must include in the software, in the loading screen, the logo “Made with Clickteam Fusion 2.5”. You will find the logo in the MadeWithMMF2.png and MadeWithMMF2IPad.png files in the Clickteam Fusion 2.5 Data/Runtime/iPhone directory. If you use the Developer version of Clickteam Fusion 2.5 you do not need to include this logo. What standards must an application meet to distribute the Runtime player? None. Clickteam will not in any way restrict distribution of developers’ products. Standard version only: Clickteam may, however, deny the right to use the Made with Clickteam Fusion 2.5 logo in certain cases Does the new application have to be sent to Clickteam for approval? No, you do not need to send your application to Clickteam. After you have built your application with Clickteam Fusion 2.5 and included the logo (Standard version only), you can begin distributing your application. However we would like very much you to advise us when you release a new application/game created with the Clickteam Fusion 2.5 iOS exporter. Clickteam Fusion 2.5 – iOS Runtime Distribution Agreement WHEREAS Licensee has purchased a legal copy of “Clickteam Fusion 2.5” and its iOS exporter. PARTIES (1) The “Licensor“: Clickteam, 7 rue Ernest Renan, 92130 Issy-les-Moulineaux, FRANCE (and any of its subsidiaries, agents, successors and assigns). (2) The “Licensee“: the party executing this Agreement. RECITALS A. This license supplements and amends the Software license issued by the Licensor to the Licensee. B. The Licensee has developed an iOS Application that the Licensee desires to publish or utilize, commercially or as freeware application. C. The Licensor is willing to permit the Licensee to utilize the Application upon the terms set out in this Agreement. OPERATIVE TERMS 1. DEFINITIONS 1.1 “Runtime” means the portion of the Software required in order for the Application to operate on hardware on which the Software is not resident. 1.2 “Project” means any iOS files built with Clickteam Fusion 2.5. 1.3 “Application” means a Project compiled with X-code and the iOS SDK. 1.4 “Source Code” means the source code generated by Clickteam Fusion 2.5 in iOS Projects. 1.5 “Logo” means the Made With Clickteam Fusion 2.5 logo in the form specified by the Licensor. 2. GRANT 2.1 The Licensor grants to the Licensee a non-exclusive, non-transferable, perpetual, worldwide, royalty-free license to incorporate object code copies of the Runtime in to or with the Application and to copy, distribute, display and perform the Application subject to the terms and conditions of this Agreement. 2.2 The Licensee shall not copy, distribute, display or perform the Runtime (or part thereof) except as part of the Application. 2.3 The Licensor allows the Licensee to modify the Source Code of the Project before compiling the Application. 2.4 The Licensee shall not use the Source Code, in whole or in part, in programs other than the ones created with Clickteam Fusion 2.5. 3. LICENSEES COVENANTS AND INDEMNITY 3.1 The Licensee hereby indemnifies the Licensor against all costs, claims, actions or demands arising out of the marketing promotion or distribution of the Application. 4. LIMITS TO LICENSOR’S LIABILITY 4.1 The Licensor accepts no responsibility for the quality of the Application, that shall be the sole responsibility of the Licensee. 4.2 It is the responsibility of the Licensee to evaluate the Software and to apply the Software only for uses that the Licensee has evaluated and considered appropriate, and the Licensor accepts no responsibility for the efficiency of the Software in the production of the Application. 5. MARKINGS AND NOTICES (Standard version only) Ignore this section if you use the Developer version of Clickteam Fusion 2.5. 5.1 The Licensee agrees to include the Logo on the loading screen of the Application. 5.2 The Licensor hereby grants to the Licensee a non-exclusive, non-transferable, perpetual, worldwide, royalty-free license to use the Logo on any copy of the Application and all marketing materials used for the commercial exploitation of the Application. 6. TERMINATION 6.1 The Licensee may terminate this Agreement, at any time, by ceasing to distribute the Application that includes the Runtime. 6.2 The Licensor may terminate this Agreement in the event that the Licensee materially defaults in the performance of any material provisions of this Agreement and the Licensee fails to cure such default (whether remediable or not) within 30 days after notice of such default is given to the Licensee by the Licensor. 7. GENERAL 1. The licenses granted to the Licensee in this Agreement are personal to the Licensee, and the Licensee shall not assign, transfer or sublicense this Agreement (or any right granted herein) in any manner without the prior written consent of the Licensor. 2. French Law shall apply to this Agreement and the parties hereby submit to the exclusive jurisdiction of the French courts. SCHEDULE A Ignore this section if you use the Developer version of Clickteam Fusion 2.5. GUIDELINES FOR USING THE MADE WITH Clickteam Fusion 2.5 LOGO (Standard version only) Trademarks of Clickteam are valuable assets. In order to protect the value of these assets, Clickteam must maintain control over the manner in which its trademarks are used. These guidelines have been established to assist you. If these guidelines are not followed,
Things to know when creating an iOS application
This section contains some important things to know when you create an application for the iPhone or the iPad. Please read it carefully and keep it in mind when programming you application. Building for various devices Clickteam Fusion 2.5 allows you to build applications that can run on an iPhone, iPod Touch, or iPad. As a default, the Targeted Device property of the application are set to iPhone / iPad, meaning that your application will work on any of the available Apple devices at that date (March 2011). Modify this property if you want to restrict your application to iPhone only or to iPad only. Memory considerations iOS devices are portable devices. As such, the amount of usable memory (RAM, not to be confused with Flash memory where the files are stored) is limited. On a 2nd generation device, like the original iPhone and the iPod 2nd Gen, the size of RAM is 128 Mbytes. On 3rd Gen devices and over, the amount of RAM is 256 Mbytes. This might seem a lot, but if you know that iOS 4 consumes at least 80 Mbytes to function, you quickly realize that the amount of working memory on a 2nd Gen device can be evaluated to around 40 Mbytes. The code of an iOS application must be copied into RAM before being launched by iOS : this takes 2 Mbytes out of your previous RAM. The conclusion is that if you want your application to work on a 2nd Gen device, you have to be very careful about the size of your graphics and sounds. The next section will give you tips to reduce the memory imprint of your graphics. If your game cannot run on such a device, you should prevent it from being distributed in the app store for a 2nd Gen device. If you do so, save some memory by setting the build architecture of the application in the iOS properties to Arm7 only, avoiding the duplication of the compiled code. How to find out exactly how much memory your application takes? The amount of memory used by an application is shown in the debugger window (top left of the screen) when you launch your application in Clickteam Fusion 2.5. The memory displayed is evaluated for a PC application and does not reflect the amount of RAM really taken by your application under iOS. To find out exactly how much memory your application needs on the device, launch your application in XCode by choosing the menu option “Run / Run with performance tools / Allocations”. XCode will automatically open a window that keeps track of all the memory allocations of your application in real time. You will find the total amount of RAM used in the first line of the grid. Be sure to check every frame of your application, as the amount of memory used depends on the amount of graphics and sounds used in each frame. Also check that the number of allocations (not the tempory allocations, which keep growing normally) does not increase as your game runs (and might indicate undestroyed objects). How to save memory for your graphics? Alpha-channels Alpha-channels look awesome and give a visually pleasing effect but they will slow down your game if you overuse them, just as they do in the PC runtime (only more). An image with an alpha-channel takes 33% more memory and space than an image without and it takes more power and time to render them. Workaround: Does your graphic really need the alpha-channel? Does the background underneath it ever change? If not you could probably “bake” the alpha-channel effect into the image itself so that the shadow is just part of the picture. Huge pictures Many are often tempted to import really large pictures into the game where it will only show very little of that picture at one time. Some good advice is to break it up into smaller parts so that fewer of them are shown at one time. Remember that any image you have in your game has to fit inside their texture. In a sample game there was a 960×480 sized background image on a frame. This picture alone had to fit into a 1024×512 texture taking up a huge amount of memory. What was even worse was that it had an alpha-channel even though no pixel in it was transparent. Second, the same frame had two different huge animations sized 957×158 (each of them contained 17 frames). This already takes up 2*17 * 1024*256 * 3 = 26738688 bytes = 25.5 MB of RAM which is way above what the iOS likes. That was even without the rest of the graphics and the huge background image we talked about before. Workaround: Most graphics don’t need 100% crispness and quality. It will only take 1/4th of the previous memory usage if you cut your image size in half and then at runtime scale it to 2.0. It will also run much faster as it utilizes the graphics card RAM cache much better. Tip: Crop your images, remove any useless empty space around them. Some developers tend to use a single frame size for an entire animation with huge transparent parts in some images. It’s probably better at design time, but at runtime it results in a loss of time and space. Tip: Try to make your graphics of a size close a power-of-two. It will waste less precious memory. A power-of-two size is one of the following: 8,16,32,64,128,256,512,1024 Images less than 8×8 pixels will be stored in a 8×8 texture as they cannot be smaller than that. You can easily use different sizes for your width and height, they don’t have to be equal. Tip: Be sure to set the “Image compression” property to “Color reduction” either globally for all objects in the App iOS properties or per object, as often as you can. In many cases, it will consume half the memory it did before. Take for example the
Differences between iOS and Windows applications
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. Runnning 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 320×480 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 (768×1024) on a 3rd generation iPhone (320×480). 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 640×960 : 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 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. Old device limitations with 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.
Implementing iAd advertisement system in your application
Clickteam Fusion 2.5 makes it really simple to incorporate iAd messages in your application. You just need to set a couple of properties. The system will initially display a fake advertisement for testing purposes. To allow real advertisements to be displayed, you must enroll in the Apple iAd program (more information at: http://advertising.apple.com/). Note: this feature is available in MMF2 Developer only. The iAd properties are located in the application’s iOS property panel, and in the frame’s iOS property panel. Application properties Enable iAd Check this property to enable the iAd system in your application. Display ad on bottom of the screen If unchecked, the ad will be displayed on the top of the screen. If checked, the ad will be displayed on the bottom. Frame property Display Ad Check this property to allow the ad to be displayed on the frame. If the property is unchecked and an ad was displayed from a previous frame, it will disappear. This property allows you to decide which one of the frames of your application will contain advertisements. Ad dimensions A portrait-oriented iAd banner is 320 pixels wide and 50 pixels high. A landscape-oriented ad is 480 pixels wide and 32 pixels high. Whether you choose the ad to be on top or bottom it will cover the application. You must design the application so that no important data is displayed at the location of the banner. If your application uses the touch joystick as means of control, then you have no choice, you must put the banner on the top of the screen (we could have displayed the joystick higher, but we realized that it was very easy to make a mistake and touch the ad instead of the joystick, thus interrupting the game). Important The advertisement banner is only displayed when the application can connect to the ad server. If the ad cannot connect, it will simply disappear from the screen or not be initially displayed. Your application must cope with it and be ready to run with the extra space on the display. Also, do not be surprised if the banner disappears in the middle of an ad. This means that the connection is lost. When you test your application under XCode, a fake advertisement is displayed. To allow complete testing of the system, Apple sometimes simulates an interruption of the connection to the server. The fake ad can disappear, as a true ad would do. Further than that, you might run your application at the precise moment where the connection pretends to be interrupted. In this case, no ad will be displayed at the start of the application, but will appear after a moment.
iOS specific properties
When you choose one of the iOS build types in the Application properties, new properties appear. Here is a list of the new properties. Application properties These properties are located in an iOS folder on the right of the property explorer. Bundle identifier This property contains the bundle identifier of your application. It is usually in the form of “com.yourcompany.ApplicationName” if you follow Apple’s recommendation. When you create your provisioning profile, we strongly suggest that you enter a name like “com.yourcompany.*”. The ‘*’ at the end means the provisioning profile works for more than one application. The bundle identifier is required to test your application on the device connected to your Mac and to publish your application on the App Store. Please read Apple’s documentation. Bundle version This property contains the version number of your application. It should be in the form of “1.0”. You can also specify sub-version numbers like “1.1.2.3”. Please note that when publishing your application on iTunes, Apple just takes into account the short version number (“1.0”). Targeted device This property allows you to choose on which iOS device your application will run. “iPhone” allows it to run on iPhone and iPod Touch, “iPad” on iPad 1 and 2 (and future versions), and “iPhone / iPad” on all these devices. Architecture This property allows you to specify the devices Xcode will compile the code for. If your application is supposed to run on fourth generation devices or above only, or iPads, select “Default Architectures”. If your application should also run on older devices (second and third generation iPhones), select “All architectures”. Display status line Uncheck this property to hide the iOS status line. Note that keeping the status line will hide a portion of your application. Screen orientation This property allows you to fix the orientation of the screen when your application runs. Image compression The graphic memory on iOS device is limited. The image compression option allows you to reduce the size of the graphics of your application in memory. Two options are available : None and Color Compression. If you select “Color Compression”, the images are automatically converted to either 65536 colors (opaque images), 32768 colors (unique transparent color) or 4096 colors (alpha channel with multiple transparency levels).This option will divide the size of your images by two. This can reduce the quality of the images, but you can choose to ignore this option for specific objects; refer to the object properties below. Multitask iOS 4 is a multitasking environment. When you use an application and press the HOME button on the device, the application goes into sleep mode and is taken to the background. You can revive it by clicking on it in the application list. If you do not want your application to be multitask, uncheck this property and your application will be discarded when the user presses HOME. Note: Apple really prefers multitask applications! Application icon (iPhone) This property contains the icon of your application if it is built as an iPhone or iPhone/iPad application. It is a 114×144 image that will be used to display your application on the device. Click on EDIT to modify it. Please note that the device will automatically add the reflection effect, so you do not need to add such an effect (or your application will be rejected by Apple). Your icon must be “flat”. Application icon (iPad) This property contains the icon of your application if it is build as an iPad or iPhone/iPad application. It is a 72×72 image, that will be used to display your application on the device. Click on EDIT to modify it. Same remark about the reflection effect applies. Launch image (iPhone) This property contains the image to be displayed on the device while the application is loading if it is compiled for iPhone or iPhone/iPad. It should be a title picture or the representation of the first frame of your application. This is a 640×960 picture. Launch image (iPad) This property contains the image to be displayed on the device while the application is loading if it is compiled for iPad or iPhone/iPad. This is a 768×1004 picture. iTunes artwork This property contains the image to be used in iTunes. It is a 512×512 image and should be the same as the application icon (otherwise Apple will reject your application). Also, you should not add any reflection effect. Joystick images This property contains the images of the touch joystick. Refer to the Joystick property below for more information. Enable iAd (Developer version only) Allows the use of iAd banners in your application. Display ad on the bottom of the screen Positions the ad in the bottom of the screen instead of the top. Display This option allows you to choose the way your application is displayed on screen. 6 possibilities: Center No zooming will occur regardless of the device. The window will be centered in the screen. If you have an iPhone 3GS resolution app, it will look small on the iPad or iPhone with retina screens. Expand/Adjust window size No scaling will occur with this option, it will expand the window size to fill the remainder of the screen so no black areas show. Note that this will show more of your frame. The actual window size will be exactly the same as the device resolution and the frame must be large enough to support this: These are the minimum sizes for your frame: Device Minimum frame size iPhone 3 & 3GS 320 x 480 iPhone 4 & 4S 640 x 960 iPhone 5 1136 x 640 iPad 1 & 2 768 x 1024 iPad 3 2048 x 1536 Fit inside with borders This option will scale the game-contents to touch the inside of the screen while maintaining the aspect ratio. If your game window aspect ratio isn’t the same as the device aspect ratio, the contents will be centered and black borders will show. This is the default option. Fit inside and adjust window
Building your iOS Application
What to do you to get your application on the Mac for the first time ? Create your application or game on your PC, making sure that “iOS Xcode project” is selected in the Build types property of the application. Test the application on the PC. Choose “File / Build / Application”, and enter the name of your zipped Xcode project (should be the same name as the application plus the ZIP extension). Clickteam Fusion 2.5 saves a ZIP file containing a complete Xcode project ready to compile. Transfer the ZIP file to your Mac Unzip the ZIP file on your Mac by simply double clicking on it. You now have a complete Xcode project folder Start Xcode Open the “XXX.xcodeproj” file in Xcode, where XXX is the name of your application. For the first build, select “Simulator” in the top-left combo box. Note: if “Base SDK missing” is displayed in the combo box, open the project settings and change the Base SDK option. Click on “Build and run”. After a little time, the emulator should start and display your application. What to do during development : Now that you have a working Xcode project on your Mac, there is no need to transfer the entire project each time want to test your application. Clickteam Fusion 2.5 provides a much simpler method. Go in the Application properties on the PC, “Build type”, and select “iOS application (cci)” Build your application as usually, but enter “Application.cci” as file name. This will save a file called “Application.cci” Transfer “Application.cci” to the Mac On the Mac, copy this file to the root of your Xcode folder Then in Xcode, recompile the project. The new application is used. When development is over : When you want to get serious and publish your application, you will need a final version of your Xcode project. Go in the Application properties on the PC, “Build type” and select “iOS final Xcode project” Build your application, entering the name of an Xcode zipped folder Transfer the ZIP file to the Mac Double click on the ZIP Open the file “XXX.xcodeproj” in Xcode, where XXX is the name of your application Build and run To publish your application, you will need to follow Apple’s procedures, which can be found in the developer documentation Note : what is the difference between the “iOS Xcode project” and the “iOS final Xcode project”? The difference resides in the extensions. The development project contains all the available extensions, and therefore works if you add a new extension to your application, allowing you to copy the cci file directly to the folder of the Xcode project. The final project only contains the necessary extensions, making the file size smaller. It will not operate properly if you add a new extension without rebuilding the entire project.
iOS Applications and Games
Clickteam Fusion 2.5 allows you to build your application as an iOS application (iPhone, iPod or iPad) and distribute it on the App Store. What do you need to create an iOS application ? A Macintosh computer running at least OS X Lion. Being registered as an iOS developper with Apple ($99 per year). Note: you can register a simple Developer account (free) and test your applications in the iPhone simulator, then register as iOS Developer ($99 per year) when you want to test your applications on a real device or distribute them. Xcode and the latest version of iOS SDK installed on the Mac. Some kind of connection between your PC and your Mac, either a Network or FTP connection, so that you can transfer files between the two machines. If you do not have a network or a FTP connection, you can use services like Dropbox (www.dropbox.com). To test on a real device, you need an iPhone, iPod Touch or iPad. Complete the registration process so that you get a profile-provisionning file and install this provisionning profile on the device. Where to find documentation about iOS development ? Although Clickteam Fusion 2.5 makes it simple to develop an iOS application, you will still need to read Apple’s documentation, specially the sections on how to get a provisioning profile so that your application can work on your device, distribute it to your beta testers, submit your application to Apple and publish it. The main page for iOS development can be found at : https://developer.apple.com/library/archive/navigation/index.html