BoxSymbol Clock.png
This is an archive.
See the new ClickWiki at https://clickwiki.github.io. This version is just an archive for the purposes of migrating content to the new structure.


Jump to: navigation, search

Binary Data

Binary Data is the inclusion of other files with your Fusion project. These files are referenced by their actual file name on the developer's computer. It allows the developer to include additional files along with their final export, such as templates for configuration files (such as an INI) or graphical assets for a game. Some Clickteam objects are also capable of reading directly from the executable, removing the need to extract it first.

Binary files cannot be used alongside the "Include external files" option in the Windows Runtime.

Support by Platform

These are the platforms that allow the inclusion and extraction of binary data. This feature may behave differently depending on the target platform.

Platform Can include Can extract
This product is compatible with Microsoft Windows Windows Yes Yes
This product is compatible with Mac OS X Mac ? ?
Flash Runtime Flash ? ?
iOS Runtime iOS ? ?
Android Runtime Android Yes Yes
HTML5 Runtime HTML5 ? ?
XNA Runtime (now deprecated) XNA ? ?
Java Runtime (now deprecated) Java ? ?


Example

This product is compatible with Microsoft Windows Applies to the Windows Runtime only.

Let's suppose you have level data saved to an INI file, you can include the file from your computer's hard drive and extract it when it's needed by the game.

1. First, you'll need to include it as binary data. This can be done by choosing "Add" under the Binary Data tab from the Data Elements dialog. In this example, the file's path is C:\games\mylevel.ini

2. Next, you will need to extract the file, this involves the System object.

3. Follow the events below to extract the binary file and set the INI object to use the extracted file at the start of a frame.

  • Line 1 uses the action Binary files → Extract binary files and uses the same file name as listed in Data Elements. In this example, it's "C:\games\mylevel.ini"
  • Line 2 uses the "Set current file" action on the INI object. Make use to use the following expression and not the full path itself (as this would look on the user's computer for the file, which wouldn't exist) = Special Object→ Filenames → Binary file temporary filename.


The resulting expression will look like this:

 BinFileTempName$("C:\myfile.txt" )


What it would look like in the event editor:


System Object INI
1 • Start of Frame
2 • Start of Frame
3 • New condition


Consequently, the "Release" action for Binary Data will delete the temporally extracted file.


Contributors to this page

Lh37 (100.0%)