User Tag List

Results 1 to 2 of 2

Thread: saving advanced game board object?

  1. #1
    No Products Registered

    Join Date
    Nov 2009
    Posts
    327
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    saving advanced game board object?

    is there a simple way to save the layout/contents of the grid, and load it back later on?

    i need more than just the "undo" once feature, if that makes sense

    i want the user to be able to resume to how they had the puzzle from five mins ago.

  2. #2
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: saving advanced game board object?

    You could easily start a fastloop to store all the brick values and fixed values stored in AGBO into a regular array object.

    AGBO is in itself just a simple 2D array that allows you to perform operations on this array.

    save:
    --> start loop "y" BoardHeight("AGBO") number of times

    on loop "y":
    --> start loop "x" BoardWidth("AGBO") number of times

    on loop "x":
    --> write BrickAt("ABGO", loopindex("x"), loopindex("y")) into array at loopindex("x"), loopindex("y")

    You can do the same with the fixed values into another array for example.
    Same technique can be used to restore the data again.

    If you use a 3D array you can even save multiple states which can be restored. The z-index could be the time axis.

    The first time you save the board state, you save to z-index 0, the second time z-index 2 and so on.

Similar Threads

  1. Need Advanced game board object help
    By PandaExplosion in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 16th July 2011, 11:14 PM
  2. Advanced Game Board object example please
    By PandaExplosion in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 15th July 2011, 03:35 AM
  3. Need help with Advanced Game Board object
    By jellytot in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 16th September 2008, 07:20 PM
  4. Advanced Game Board Object
    By Surmulot in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 22nd April 2007, 10:56 AM
  5. Advanced Game Board Object
    By Olivier in forum Extension Development
    Replies: 4
    Last Post: 22nd November 2006, 02:24 PM

Posting Permissions

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