Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Is saving a thing?

    Beginners
    5
    10
    540
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Zypher
      Zypher last edited by

      Is it possible to save an array to a file of sorts to have a way to save dada, wich can be loaded when starting the game later, allowing progress to be saved? Or did you guys opt out of that?

      1 Reply Last reply Reply Quote 0
      • Dave
        Dave Fuze Team last edited by

        It's possible using the file handling commands. There is some processing which has to take place, depending on how you want to use the data. Take a look at the following help page links for info on the relevant commands:

        https://fuzearena.com/help/view/open
        https://fuzearena.com/help/view/write
        https://fuzearena.com/help/view/read
        https://fuzearena.com/help/view/seek

        I'm not all too experienced with these functions myself so I might get @pianofire, @Martin or @MikeDX to weigh in on this one!

        1 Reply Last reply Reply Quote 3
        • Zypher
          Zypher last edited by

          Thank you @Dave ! I just only like games where you can have progress. I'll check the links, and see if I can put my ideas into action!

          pianofire 1 Reply Last reply Reply Quote 0
          • Zypher
            Zypher last edited by

            @pianofire @Martin @MikeDX I'm sorry to ping you all but I'm very currious on this. Am I limited to saving a single string of text using "write()"? Is it possible to save an array into that command or any other way to save larger bits of information?

            Spacemario 1 Reply Last reply Reply Quote 1
            • pianofire
              pianofire Fuze Team @Zypher last edited by

              @Zypher You might want to take a look at this: https://fuzearena.com/forum/topic/70/hints-and-tips/19

              Dave 1 Reply Last reply Reply Quote 1
              • Zypher
                Zypher last edited by

                @pianofire thank you, I think that will work! As long as things don't crash while saving large numbers... I'll have to experiment until I have it suited to my code. Thanks man!

                1 Reply Last reply Reply Quote 1
                • Dave
                  Dave Fuze Team @pianofire last edited by

                  @pianofire Thanks dude!

                  1 Reply Last reply Reply Quote 1
                  • Spacemario
                    Spacemario F @Zypher last edited by

                    @Zypher I used saving in a program I wrote recently, and from what I could discern via the docs, you are limited to one big string.

                    In my case, I wanted to store sets of dates and numeric data-- so my solution was to simply run all of the data together in the file like this:

                    [MM][dd][YYYY][Number][MM][dd][YYYY][Number][MM][dd][YYYY][Number] ...

                    So actual data looked like this:

                    100120192100220193100320191...

                    Then what my "load" code would do is put the file's contents into a big string, loop every 9 characters, "slice" the string (Fuze's way of doing "substring", works kind of like Python), and populate an array of structs with the four elements (month, day, year, number).

                    My "save" code just looped over the array of structs, re-constructed the big string with the very latest user-modified data, and overwrote the file. Worked perfectly!

                    You could do this with totally non-numeric data too.

                    I'm not by the Switch right now, but I can edit this post with my friend code and line numbers in the program-- you could just look at my code directly that way. Let me know if that'd be helpful!

                    1 Reply Last reply Reply Quote 0
                    • Zypher
                      Zypher last edited by

                      Yeah absolutely... But the friends menu softlocks the game every time. Maybe because I dont have any friends with fuze

                      1 Reply Last reply Reply Quote 1
                      • Martin
                        Martin Fuze Team last edited by

                        Please see this announcement:
                        https://fuzearena.com/forum/topic/442/issue-with-shares

                        Unfortunately this is still an ongoing issue.If you leave it long enough it will timeout and say "No Connection" but it's quicker to go to the home screen and close Fuze.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post