User Tag List

Results 1 to 8 of 8

Thread: Save Binary file

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    MOBii's Avatar
    Join Date
    Dec 2013
    Location
    Tacloban
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Save Binary file

    How can I save/read binary file?
    at the moment I save map into multiple CNC ARRAY files
    My data is in byte format: 0-255
    I want to save my mapdata in 8bits, not 32bits as CNC ARRAY

    I was trying to send my mapdata to a Rich Edit Object:
    IndexToChar( "ASCii", ValueAtXY( "World", XX( "OPaint" ), YY( "OPaint" ) ) )
    and save data from there, but some of the low ASCii number don't show in the Rich Edit Object.
    I can store map in a Action String but how can I save data to a file from the string?

    I don't know if its possible to convert a float and save it in the number CNC ARRAY?
    I want to save my map file to 1 file, I don't know if CNC ARRAY can save both INT and STRINGS?

    Is there an other way for me to save 0-255 binary char data to a file?

  2. #2
    Clickteam Clickteam
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,615
    Mentioned
    56 Post(s)
    Tagged
    3 Thread(s)
    There are a couple of objects, binary data object, and I think binary array... have you tried these?

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    MOBii's Avatar
    Join Date
    Dec 2013
    Location
    Tacloban
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank thee very much!
    Somehow they where not installed

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    MOBii's Avatar
    Join Date
    Dec 2013
    Location
    Tacloban
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How I get unsigned char?

    What I do wrong?
    the byte is signed: -128 to 127

    In helpfile say:
    Description nByte integer A single byte ranging from 0 to 255.
    Attached files Attached files

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    MOBii's Avatar
    Join Date
    Dec 2013
    Location
    Tacloban
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Today I test Binary Array that in my first impression look less impressive than the Binary Object, BUT

    Only in Binary Array:
    Read -> Byte -> Unsigned SignedByte(-128 to 127)/Byte(0 to 255)


    Only in Binary Object:
    Append
    Blowfish
    MD5 signature


    I am crying here
    I want Append, but need Unsigned Byte

    How can I make the Binary Object to read unsigned char?
    if the Binary Object can't read unsigned char then I can only chose the Binary Array that don't do Append
    I can live without Append but life would be so much better with Append

  6. #6
    Clicker Fusion 2.5 DeveloperInstall Creator Pro

    Join Date
    Sep 2006
    Posts
    516
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi MOBii,
    To convert signed char to unsigned char, you can just use the following expression: char and 255
    With Binary Object: byte( "Binary object", > position <) and 255

    ouly

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    MOBii's Avatar
    Join Date
    Dec 2013
    Location
    Tacloban
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank the. thank thee very much ouly
    I was almost giving up and go away
    I was thinking it could be solved like this but didn't know how
    When I save 255 to file it was FF so I know the number was right.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    MOBii's Avatar
    Join Date
    Dec 2013
    Location
    Tacloban
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I manage to save Binary Object data:
    AAA.blx 24.0 KB
    From the old map save files:
    a Platform 01.BLm 88.0 KB
    a Platform 01.BLo 80.0 KB
    168 KB on disk

    168-24=144

    With the Binary Object I can make 144 KB (147456 bytes) smaller Map file
    100 * 100 * 2 layer = 20000 bytes

    Little strange that Array Object save the 2 map array:
    100 * 100 * 2 (layer/files) * 4 (32bit) this should be 80KB not 144KB

    Anyway I am happy I actually manage to put all the data in 1 mapfile and make it significant smaller

Similar Threads

  1. LOAD/SAVE clone file in ARRAY FILE
    By daniele in forum Multimedia Fusion 2 - Technical Support
    Replies: 20
    Last Post: 24th July 2015, 01:47 AM
  2. IOS and Binary save frame?
    By GameMaker2019 in forum iOS Export Module Version 2.0
    Replies: 10
    Last Post: 29th January 2013, 07:08 AM
  3. Sound file as binary file
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 22nd March 2010, 09:56 PM
  4. Binary Array Save/Load File gets it Wrong
    By dragonguy in forum Multimedia Fusion 2 - Technical Support
    Replies: 24
    Last Post: 6th November 2008, 11:11 PM
  5. Binary file? doesnt save workspace?
    By Gibbon in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 7th January 2007, 01:01 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
  •