User Tag List

Results 1 to 10 of 10

Thread: [RC5] Saving and/or loading array files

  1. #1
    Clicker Multimedia Fusion 2 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleMac Export Module
    colej_uk's Avatar
    Join Date
    Nov 2006
    Location
    UK
    Posts
    739
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    [RC5] Saving and/or loading array files

    I'm using a save game system in my game that uses the array object to save and load files.

    It's working fine on the pc runtime but on android it won't save and/or load at runtime... I haven't worked out whether the saving or loading is the problem yet, I'll continue to test this. Just figured I'd post about it in case it's a known issue or am I missing some special permission or something?

    Anybody had any luck with this?

  2. #2
    Clicker Multimedia Fusion 2 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleMac Export Module
    colej_uk's Avatar
    Join Date
    Nov 2006
    Location
    UK
    Posts
    739
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I made a simple test app to demonstrate the problem:
    android_array_test.mfa

  3. #3
    Clicker Multimedia Fusion 2 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleMac Export Module
    colej_uk's Avatar
    Join Date
    Nov 2006
    Location
    UK
    Posts
    739
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I'm still having problems with this is RC6. Can anyone confirm?

  4. #4
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You'll need the WRITE_EXTERNAL_STORAGE permission, but I think that's about it. I did test array saving/loading before posting this build, but I'll double check your example shortly.

  5. #5
    Clicker Multimedia Fusion 2 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleMac Export Module
    colej_uk's Avatar
    Join Date
    Nov 2006
    Location
    UK
    Posts
    739
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Still no luck here with WRITE_EXTERNAL_STORAGE enabled I'm afraid James.

    I've also noticed that if you load an array file at the start of a frame it crashes the app. It could be to do with trying to load an array file that doesn't exist yet.

  6. #6
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yep, looks like trying to load a non-existent file will cause a crash, which I'll fix for the first release build.

    In your example, you're currently trying to save/load without an absolute path. Can you try saving to somewhere like "/sdcard/test_save.arr" or using one of the Android object expressions?

    Obviously it would be better if it would default to a suitable location, so I'll put that on the TODO list.

  7. #7
    Clicker Multimedia Fusion 2 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleMac Export Module
    colej_uk's Avatar
    Join Date
    Nov 2006
    Location
    UK
    Posts
    739
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    It works with the suggested path, thanks James

    I've realised both my test devices don't allow writing to the SD card when plugged into USB, so when I was testing on ADB, the save wasn't being written. Not sure if that's a standard thing which I've only just noticed or just true of Sony phones.

    I'm also thinking about devices with no external storage- a good default would perhaps be either internal memory or relative to where the game is installed?

  8. #8
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    There's an expression in the Android object to retrieve the data storage directory, which should be on the internal storage. I'll probably make that the default.

  9. #9
    Clicker Multimedia Fusion 2 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleMac Export Module
    colej_uk's Avatar
    Join Date
    Nov 2006
    Location
    UK
    Posts
    739
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks James.

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module

    Join Date
    Aug 2011
    Location
    Beverly Hills, CA USA
    Posts
    506
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just a little note:

    I worked around not being able to load INIs by dropping my text INIs into listboxes hidden and offscreen and searching for values. It works very fast. These containers can hold larger than 1024kb of data.

Similar Threads

  1. INI Files Saving and Loading
    By Power2r in forum XNA Export Module Version 2.0
    Replies: 3
    Last Post: 1st August 2011, 08:14 AM
  2. Problem with array loading/saving with INI++
    By timcclayton in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 21st November 2010, 07:21 PM
  3. Saving/Loading files
    By Namo in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 26th July 2009, 08:21 AM
  4. array object : saving loading
    By jpcr in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 15th February 2008, 03:31 PM
  5. Saving and loading Unicode from files
    By Stereotype in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 30th April 2007, 02:03 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
  •