Cookies in TGB?
by Isaac Barbosa · in Torque Game Builder · 02/01/2007 (10:36 am) · 26 replies
I want to save some cookies into the player computer to keep tracking of some variable to use when a game is restarted, but for know I don't know how to do that... the approach I want to take now is use and object and its variables as the cookie itself, saving and loading, but I'm sure that this is not the best approach. Would somebody point me in the right direction?
Thanks
Thanks
#22
02/03/2007 (3:54 pm)
It works if I use .sav extension... I have no compiled yet, but inside development ambient it works... but you can open the .sav file using wordpad or any editor, so that's the same thing :(
#23
Nic.
03/06/2007 (2:33 pm)
This thread has been super super super useful! Just one thing. How do you force Torque to compile the .cs files to .cs.dso at runtime?Nic.
#24
http://tdn.garagegames.com/wiki/TGB/MiniTuturials/GUIOptionsMenu
Nic.
03/06/2007 (2:36 pm)
Oooopppppssss I did it again... found it 1 minute after I posted this...http://tdn.garagegames.com/wiki/TGB/MiniTuturials/GUIOptionsMenu
Nic.
#25
The DSO is a binary version of the CS file, and is still 'hackable', but then -- every binary file, especially when there 'SAV' files are 'hackable' (just look the NES/SNES/N64 Emulator Scene ... )
03/06/2007 (2:42 pm)
To have the file 'compiled' you'd have to exec it, which causes the engine to do a run-time compilation, which then generates a DSO file -- you can then safely delete the .cs file and be left with the DSO --The DSO is a binary version of the CS file, and is still 'hackable', but then -- every binary file, especially when there 'SAV' files are 'hackable' (just look the NES/SNES/N64 Emulator Scene ... )
#26
SaveData.save("savedata.cs");
compile("savedata.cs");
fileDelete("savedata.cs");
Nic.
03/06/2007 (11:24 pm)
You can also use the 'compile' command. Something like this:SaveData.save("savedata.cs");
compile("savedata.cs");
fileDelete("savedata.cs");
Nic.
Torque 3D Owner Marc Dreamora Schaerer
Gayasoft
during that time anyone could "grab" it, but the only way around that would be save it encrypted or "binary mixed" directly, so a lot more work and a real cheater won't be stopped by that extra work.