User Tag List

Results 1 to 6 of 6

Thread: Saving and recovering INI info as binary data (Windows)

  1. #1
    Clicker Fusion 2.5iOS Export ModuleXNA Export Module

    Join Date
    Oct 2009
    Location
    Jacksonville, TX
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool Saving and recovering INI info as binary data (Windows)

    Hi everyone,

    I have been working through the guide document on using Binary data, and reading a lot of the forum posts, and I think I have it halfway working... I am trying to use an INI file that contains all the level unlocks and scores for my game, and include it as a Binary Data element. As far as reading/writing to the temporary binary file, so far so good--everything is cool until I exit and restart the application. Upon exiting and restarting, the game is no longer able to locate the save data from the previous session! I am using these actions:

    Extract Binary File: Apppath$ + "SaveGame01.ini"

    Set current file to: BinFileTempName$(Apppath$ + "SaveGame01.ini" )

    (Saving to/Loading from INI...)

    Release binary File: BinFileTempName$(Apppath$ + "SaveGame01.ini" )


    The actual path where the file exists is [C:\Disastr_Blastr\SaveGame01.ini]... I tried using this in the Extract and Release actions (as Danny does in the .pdf guide) and it did not work, nothing was saved or loaded unless I created the directory C:\Disastr_Blastr--in this case the game would generate a normal INI.

    Does anyone know what the problem is? How can I get my .exe to recover existing Binary Data after exiting and restarting the application? Thanks!

  2. #2
    Clicker Fusion 2.5 Developer
    PBarwick's Avatar
    Join Date
    Jul 2014
    Posts
    390
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Binary data is data that is embedded within your EXE. When you open it, it is saved to a temporary location on your hard drive, which is why you need to access it through the binfiletempname function. When the application is closed, these temporary files are deleted. These files are also deleted when you 'release' the binary file. You cannot resave binary data back into the application.

    If you want to store player data that is persistent I would recommend saving the data somewhere else. Binary files would be useful to help create an initial or blank save file, which you could then copy somewhere else to save if that was needed.

    ---

  3. #3
    Clicker Fusion 2.5iOS Export ModuleXNA Export Module

    Join Date
    Oct 2009
    Location
    Jacksonville, TX
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, so maybe Binary Data isn't the best solution for what I am trying to do... The way I originally had this set up was an INI object that would create and update the file "SaveGame01.ini" in the directory C:\Disastr_Blastr. This works perfectly (as long as C:\Disastr_Blastr exists) but I would like to avoid forcing the user to create this specific directory. As a side benefit of converting to binary, it would also be nice if the save data were not easy to modify with a text editor... But the main point of what I am trying to accomplish with binary data is to allow players to simply double click the .exe and play the game without having to worry about where their save data is getting stored. Is this achievable?

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    May 2012
    Location
    NSW, Australia
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm on my mobile and not near a computer with fusion, so may not be exact., But you don't need to use binary files to accomplish that.

    Just use the INI object and have an event:
    start of frame: (INI)Set current file to : "Appdir$+"myfile.INI" "

    Now I can't remember if Appdir$ returns the path and a closing slash "\" (e.g C:\Disastr_Blastr\) or if you need to include it yourself e.g "Appdir$+"\myfile.INI""

    Appdir$ is an expression built into fusion which returns the directory in which the application is being run from.

  5. #5
    Clicker Fusion 2.5iOS Export ModuleXNA Export Module

    Join Date
    Oct 2009
    Location
    Jacksonville, TX
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cool, I will give that a try! I think that should work just fine for my purposes. Much appreciated macca02.

  6. #6
    No Products Registered

    Join Date
    Jun 2015
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey guys, I'm having trouble finding out where to post questions concerning the audio engine without being a registered user. I am not a ClickTeam user, I am working with Joel here to get audio in his game, but we have some issues with the levels. My question is this, what are the limitations of the audio engine and what workarounds to people normally employ to ensure that the audio levels for music and and sound effects are able to work in tandem without issue?

Similar Threads

  1. Data Elements , Binary Data simply not working?
    By Gibbon in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 29th January 2014, 11:59 AM
  2. A Guide to using Binary Data (Windows / Exporters)
    By Danny in forum Clickteam Guides, Tutorials and Examples
    Replies: 0
    Last Post: 7th January 2014, 09:18 PM
  3. Saving Group info to Global Values
    By matt_barr in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 22nd October 2009, 04:37 PM
  4. using binary data at data elements
    By Chokito in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 5th August 2008, 05:22 AM
  5. Some info about saving a game
    By JoOCoGames in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 9th January 2008, 07:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •