OK so I am crusing along running the game, making things work, bells ring, horns blow, then its time to ask, How the hell do I save all this data for the next time I play ....gulp!
All the peeks and pokes make me soooo confused, so I ask someone to make my writefile101 class a little easier
Example of the data to read out to file and the program code creating it.
All I need is save out the data (it changes as the game progresses) so when the game starts again the data continues from where I left off not starting from scatch (Maybe also an option to choose not to read from the file, but use the initial data in the program, would be nice too)
All the peeks and pokes make me soooo confused, so I ask someone to make my writefile101 class a little easier
Example of the data to read out to file and the program code creating it.
type BG Field bgname$ Field bgStrength Field bgX Field bgY End Type Restore ShipData bData = True While bData Read bgname$ If bgName$ = "STOP" bdata = false Else Read bgStrength Read bgX Read bgY instBG.BG = New BG If instBG.BG <> Null instBG\bgname$=bgname$ instBG\bgStrength=bgStrength instBG\bgX=bgX instBG\bgY=bgY Else bData = False EndIf EndIf Wend .ShipData Data "Eagle", 150, 260, 120 Data "Hawk", 145, 210, 150 Data "Falcon", 200, 400, 300 Data "Stop"
All I need is save out the data (it changes as the game progresses) so when the game starts again the data continues from where I left off not starting from scatch (Maybe also an option to choose not to read from the file, but use the initial data in the program, would be nice too)