Is saving a thing?
-
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?
-
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/seekI'm not all too experienced with these functions myself so I might get @pianofire, @Martin or @MikeDX to weigh in on this one!
-
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 @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?
-
@Zypher You might want to take a look at this: https://fuzearena.com/forum/topic/70/hints-and-tips/19
-
@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!
-
@pianofire Thanks dude!
-
@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!
-
Yeah absolutely... But the friends menu softlocks the game every time. Maybe because I dont have any friends with fuze
-
Please see this announcement:
https://fuzearena.com/forum/topic/442/issue-with-sharesUnfortunately 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.