Clickteam Fusion 2.5 – Android Runtime Distribution Agreement

This agreement replaces the standard Clickteam Fusion 2.5 Runtime Distribution Agreement in the case of Android applications. In order to distribute your Android application, your must agree to the Clickteam Fusion 2.5 – Android 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 – Android Runtime Distribution Agreement is a legal agreement that allows users who have created applications with Clickteam Fusion 2.5 and the Android 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 introduction, end or credits screen, the logo “Made with Clickteam Fusion 2.5”. You will find the logo in the MadeWithMMF2.png file in the Clickteam Fusion 2.5 Data/Runtime/Android 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 Android exporter. Clickteam Fusion 2.5 – Android Runtime Distribution Agreement WHEREAS Licensee has purchased a legal copy of “Clickteam Fusion 2.5” and its Android 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 Android 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 “Application” means any Android files built with Clickteam Fusion 2.5. 1.3 “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. 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 in the introduction, end or credits 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, Clickteam may terminate your right to use the trademarks. Clickteam will provide authorized users with artwork of the logo. This artwork may not be altered in any way. You may not display the logo in a manner which suggests that your product is a Clickteam product, or in a manner which suggests that Clickteam or the logo are a part of your product name. When displayed,

Android – FAQ

Debug certificate has expired From time to time you may get the following error message when you build Android applications : “The debug certificate has expired”. To fix it, just delete the debug.keystore file in your C:\Users\UserName\.android folder. A new debug certificate will be created.

Things to know when creating an Android application

This section contains some important things to know when you create an application for Android devices. Please read it carefully and keep it in mind when programming you application. Permissions Some features require special user permissions. If you use these features, you must select the corresponding permissions in the Android properties of the application, else the application won’t work. Here is the list of permissions to activate for the following features :   Object or feature Permissions to use Location object ACCESS_COARSE_LOCATION ACCESS_FINE_LOCATION Android object / Vibrate VIBRATE Android object / Network is connected ACCESS_NETWORK_STATE Android object / Is s bluetooth enabled BLUETOOTH Access to files on SD card WRITE_EXTERNAL_STORAGE   If you use other extension objects for Android, refer to their documentation to see what Android permissions you need to select.   Runnning the application on various devices Android devices use different resolutions. You can use the options in the properties of the application to adapt your window size to the size of the devices. Fonts PC fonts are replaced by the default Android font. HWA features The graphic engine of the Android runtime is hardware accelerated, it supports some of the HWA features of Clickteam Fusion 2.5, including the Blending and RGB coefficients. It doesn’t support shaders, layer effect or frame effects. Sounds OGG: the Android devices support OGG sound files. This is the preferred format. MP3: Android supports MP3 sounds. The Android exporter for Clickteam Fusion 2.5 adds an MP3 filter to allow you to insert MP3 sounds into your applications. Avoid playing several MP3 sounds, you should use MP3 sounds for background music. You can also use the 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). Other formats: the sound files that are not in OGG or MP3 format are converted to uncompressed WAV format. Storing data You can write files to the data folder of the application, you do not need special permissions for this, use the DataStorageDirectory$ expression of the Android object to retrieve the pathname of this directory. The Android object also contains an expression to retrieve the pathname of the external storage directory, typically the SD card. Note: if you want to write data to this external storage directory you need to enable the WRITE_EXTERNAL_STORAGE permission in the Android properties of your application. Embedded Files If you want to pass initialization files to objects like Active Picture, INI, List Box, etc, just add them to the Binary Data tab in the Data Elements editor. For example, if you want to display landscape.png with an Active Picture object, add this file to the Binary Data tab in the Data Element editor and load it as you would do it on PC in the Active Picture object.   Note 1: on Android the directory pathname of the files in the Binary Data tab is ignored. If 2 files have the sane name only the first one will be used. Note 2: in the Android runtime, if you initialize the INI object with a predefined INI file stored in the Binary Data tab, the INI file will be stored in the folder of the application on the Android device only if it doesn’t exist already. So, if you want to change the content of the INI file you pass in the Binary Data tab, don’t forget to erase the data of your application in the Android parameters of your device. Note 3: if you use the Unicode version of Clickteam Fusion 2.5 and want to use Unicode characters in text files you pass to the List Box, Combo Box or INI objects via the Binary Data tab, make sure these files are in UTF-8 format (if you are not sure, edit them with Notepad, select Save As and set the character set option in the file selector to UTF-8). Also the INI file should start with an empty line. Memory considerations Android 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. The conclusion is that if you want your application to work on an Android 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. 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 Android. 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

Android specific properties

Application properties These properties are located in the Android options tab on the right of the property explorer. Package name The package name serves as unique identifier for your application. By default it’s com.yourcompany.yourapplication. It can be also org.yourorganization.yourapplication. Replace yourcompany by the name of your company, and yourapplication by the name of your application. Minimum Android version This option allows you to set the minimum version number of Android required to run your application. Your application won’t be executed on devices with a lower version of Android. Target Android version This option allows you to set the target version number of Android. This target version is the main version your application has been tested with and developed for (see documentation of targetSdkVersion property in the Android SDK). Build & Run : install to … This option specifies where to install the .apk file to on the connected Android device or emulator when you use the Build and Run command. You can install it either to the internal storage or to the SD card. Emulator Click this button to open the Emulator dialog box. This dialog box allows you to run the Android emulator (use the Android SDK Manager to create virtual devices). When the Android emulator is running, the Build & Run command will install and execute your application in the emulator. Warning: the emulator may take a couple of minutes to display the Home screen, be patient. Sometimes Build & Run fails the first time after the emulator was launched; in this case just try again. The Build & Run command is also somewhat slower than the normal Build command, as the application has to be transfered to the emulator (or device). Your application will appear in the emulator as soon as the build progress bar disappears in Clickteam Fusion 2.5. Release mode If this option is not selected, the .apk file will be signed with a debug certificate, so that you can test it on a device. If you want to release your application you need to sign it with a valid certificate. In this case select the Release mode option and enter a key store pathname and key name. Certificate Keystore name Enter the pathname of the keystore that contains the key to sign your application. To generate a keystore you can use the Keytool tool provided in the bin directory of the JDK. This is a command line tool. For example, the following command line will generate the “d:\great-release-key.keystore” file that contains the “great_key_name” key:keytool -genkey -v -keystore d:\great-release-key.keystore -alias great_key_name -keyalg RSA -keysize 2048 -validity 10000Keytool asks you for your name, organization, country, the keystore password and key password. More info here. Keystore password Enter the password of the keystore that you have entered when you’ve created it. Key name Enter the name of the key that will be used to sign your application. See above for more info. Key password Enter the password of the key you have entered when creating the keystore. Display mode This option allows you to select either OpenGL ES 1.1 or OpenGL ES 2.0 as graphic renderer. OpenGL ES 2.0 is often slower (it depends on the application though). Note: quick backdrop objects with an ellipse shape require OpenGL ES 2.0. Screen rotation This option allows you to select the orientation of your application window on the device. 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. 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. Tip: You can resize your frame size at runtime at the start of the frame if needed. 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 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 game window will be expanded to fill the remaining of the screen so no black borders show. Note that this will show more of your frame. This requires that your frame is large enough to display the new area. Fit outside This will scale the game to fill the entire screen so that no black borders show. This will crop the remaining areas that go outside the screen away. Stretch Ignores any aspect ratio and just stretches the contents to fill the entire display. Graphics can look squashed if the aspect ratios of the game window and the device don’t match. Smooth resizing If this option is selected, graphics are anti-aliazed when the application window is resized. Display status bar If this option is selected, the Android status bar will be displayed above your application window. Options menu Click this option to edit the Options menu of your application, if any. The Options menu is displayed when the user clicks the Options button on the devices that have one. Each menu item consist of a text, an icon and an identifier. The identifier allows you to identify the menu item in the conditions and expressions of the Android object that allow you to receive notifications when the user selects a menu entry. The icon has a predefined size: the bitmap should be 48×48 in size and centered in the image whose size is 72×72. Disable default back button behavior

Building your Android Application

Building and testing Android applications When you want to build your Android application, just select the Build command. Clickteam Fusion 2.5 will create a .APK file that you can install on your Android device or in the emulator. If you want to build your application and test it directly to your Android device, connect your Android device to your computer and then select the Build and Run command. Clickteam Fusion 2.5 will build the .APK file and will install it on the device. Before that, you’ll need to turn on USB Debugging in the parameters of your Android device: Android 2.x and 3.x: this option is in Parameters / Applications / Development Android 4.0 and 4.1: this option is in Parameters / Developer Options Android 4.2: Developer Options is hidden by default. To display it, go to Parameters / About device and then click 7 times on the build number (http://developer.android.com/tools/device.html). Note: if that doesn’t work, you might need to install a special driver to your computer. Usually this driver is available from the support web site of your device manufacturer. If you want to test your application in the Android emulator, click the Emulator button in the Android properties of the application, select one of the virtual devices and click Run. This will open the Android emulator. If the list of virtual devices is empty, start the Android SDK Manager and create a new virtual device in Tools / Manage AVDs. When the emulator is launched it takes some time to initialize. Wait for the Home screen to appear and then click the Build & Run command in Clickteam Fusion 2.5. Your application will be automatically installed and executed in the emulator. Note: this command may fail the first time after the emulator was launched, in this case select the Build & Run command again. The Android emulator is very slow though, you might want to test on a real device instead. When development is over : When you want to get serious, and publish your application : Select the “Android options” tab in the properties of your application Select the “Release mode” option Enter a valid key store path and a valid key name to sign your application Build it To publish your application, you will need to follow specific procedures, that can be found in the Android developer documentation on http://developer.android.com

Android Applications and Games

Clickteam Fusion 2.5 allows you to build your application as an Android application. What do you need to create an Android application ? You need to install Android Studio. After Android Studio is installed, open Clickteam Fusion 2.5, open the Preferences, select the General tab, and then select the Android exporter in the exporter list. You need to indicate the pathname of the Java SDK and the pathname of the Android SDK. Both are installed by Android Studio. The Java SDK is usually installed in the jre sub-directory of Android Studio, by default C:\Program Files\Android\Android Studio\jre. Verify this directory exists on your machine and use it as “Pathname of the JDK directory” in the preferences of Clickteam Fusion 2.5. The Android SDK is usually installed in your local Application Data directory, by default in C:\Users\YourName\AppData\Local\Android\Sdk. Replace YourName by your Windows user name. Verify this directory exists on your machine and use it as “Pathname of the Android SDK directory” in the preferences of Clickteam Fusion 2.5. If you can’t find the mentioned folder, open Android Studio, open its Settings and select Android SDK in the list. The pathname of the Android SDK will be displayed in the Android SDK Location box. Note: when you build an Android application, the Android build tools may automatically download libraries and tools it needs, however they don’t ask you for accepting licenses. If you get an error message that says you have to accept licenses, open an explorer window, go to the Android SDK folder (usually C:\Users\YourName\AppData\Local\Android\Sdk), open the tools/bin sub-directory, open a command prompt window in this directory and type “sdkmanager –licenses” (or sdkmanager –update for old versions), this will allow you to review and accept the licenses of the downloaded files. You can also simply open the SDK Manager from Android Studio and update the build API/Tools, this may work. And later when you want to release applications: You will need a certificate to sign your applications before being able to release them. If you want to publish applications on the Android Market, you will need to register a developer account on https://market.android.com/publish/signup ($25).   Where to find documentation about Android development ? Although Clickteam Fusion 2.5 makes it simple to develop an Android application, you will still need to read Google’s documentation, especially and the sections that explain how to publish your application, test it, etc. The main page for Android development can be found at : https://developer.android.com/index.html Minimum requirements for Android applications created with Clickteam Fusion 2.5 Android applications created with Clickteam Fusion 2.5 require Android 4.0 or above.