+ 3
How would you use data stored on a savefile?
In an RPG you would have your data saved and written to a text file but my question is how would you properly reopen that text file, read it's data and use it so that you can continue where you left off in the RPG
7 Antworten
+ 1
you can write one option per one line (like HP -- the 1st line, AP -- the second etc) and then read it line by line getting the values. Not sure if you can do this in a loop, but if you have 10--12 variables it's not difficult to write 10--12 lines of code to get all the lines from the file and assign them to variables
+ 5
@Gleb I could just use encapsulation plus file encryption after I study file IO to make it tougher to mess with
+ 2
@Gleb I actually believe a loop would work for that maybe I'll look more into file IO in Java thanks for the advice
+ 2
@Gleb true but I'm just going to try to program this for fun at some point so I'm not overly concerned with that
+ 1
but you should understand that player can just open this file and get himself 1000000hp or just break the game. can't really advise something here
+ 1
yeah, I got that) but trying to find a way to make good protection may be a good challenge. good luck
0
As it is saved on your program, open up is wired fairly just configure in the other platform you want to reprogram and send it entirely.