Writing to a text file
by Jonathon Bowers · in Torque Game Engine · 11/04/2008 (8:16 am) · 4 replies
I'm trying to set up a saving system so that I can record various variables, and then read them and pull them out when I load the game in a different instance of playing. I should be able to do everything else once I'm able to write to and read from a text file.
About the author
I'm a programmer at a video game studio in saint paul, my website has some flash and torque games that I have worked on. www.jonathonbowers.com
#2
if the variables in question are globals such as program settings or preferences,
just name the "$pref::myVariable", and they will be magically stored and loaded.
check out the function "export()".
11/04/2008 (9:18 am)
Brown College #0093 - you might want to check out how user preferences are stored and loaded.if the variables in question are globals such as program settings or preferences,
just name the "$pref::myVariable", and they will be magically stored and loaded.
check out the function "export()".
#3
11/04/2008 (9:22 am)
Thank you very much, this looks like it will work.
#4
One ignorance bug example is a game written and tested on Windows Vista that "strangely" doesn't work on Windows XP under a Limited User Access (LUA) account, because the program writes output files to the installation heirarchy. (Vista covers for the error, but WinXP LUA doesn't.)
11/04/2008 (6:05 pm)
The Windows platform has conventions for where you can write files that Torque doesn't take much notice of. It may be a good idea to study the conventions of your platform even if you don't end up following them. That way, you will have an idea about the causes of any strange bugs that may crop up later.One ignorance bug example is a game written and tested on Windows Vista that "strangely" doesn't work on Windows XP under a Limited User Access (LUA) account, because the program writes output files to the installation heirarchy. (Vista covers for the error, but WinXP LUA doesn't.)
Torque Owner Ivan Mandzhukov
Liman3D