Search the Community
Showing results for tags 'Saving'.
-
Hi Leadwerkers , Currently I am figuring out what would be the best way to save my game. What options there are for saving a table or varibles in general, and what options have you come up with? What I am working on at the moment was, to write a savedata table into a file like this and call it back with "dofile": return { someData = "Test"; someOtherData = "Tes2t"; } But this method is pretty tricky, not only have do you have to convert the variables into strings to save them, but it also is complicated and I think its no clean and fast solution because you have to work with the stream and filesystem command and "manually" write your data into a lua file. There is the System:SetProperty() command, but there you only can save strings as well. Are there any other commands Leadwerks offers? Another engine I worked before had a save command, where you can save any lua variable in (tables, strings, numbers everything) and then call it back. So tell me your attempt, what have you come up with? I want a system, where I just say: Save that variable and load that variable back on demand. If leadwerks does not offer such function itself I would be very thankful if you can link me tutorials, ideas or anything else which helps me building my own savesystem. Sorry if the english is not perfect Phoenix
-
Hi Leadwerks fellows, I run into some trouble creating an save system. I noticed that when I saved I couldnt immediatly reload my save, to load it I had to restart the "game". I will make it simple. To exclude other errors, I wrote this short line of code: if window:KeyHit(Key.F1) then self.test = FileSystem:WriteFile("test.lua") self.test:WriteLine("Test") System:Print("executing") end And again I noticed that while I am executing the programm and hit F1 (put a print function there to double check) and alt+tab the game and check the file, its empty. I use notepad++ to watch the file, and if I hit F1 it detectes a change and after reloading the file still nothing. Even if I close the application now, still empty. I need to close the whole file and open it again then I can see the text, but its not only a matter of visibility, I also tried to read the written text after saving it in the same session, doesnt work. So I guess the stream:WriteLine() operation gets executed on exit? Is there any way of how to work around this or am I missing something. Maybe its possible to refresh the scene/word/app etc? I dont know, but I remember loading and saving in the same session was possible once... However I would be very glad if someone would help me out P.S.: Lua sandbox is DISABLED!
- 2 replies
-
- Stream
- FileSystem
-
(and 2 more)
Tagged with:
-
I loaded up my demo map to add some decals, and I found out that my models with bones have shrunk down. Might be similar to this http://www.leadwerks.com/werkspace/topic/12680-models-and-their-bones-slowly-rotate-with-each-saveload/ However, the rotation stayed the same indicating that fix is still working. As you can see, the scale is suppose to be 1.0, but here, it's 0.993 for X,Y, and Z. It also seems to be the root node that does this, the children don't scale down separately, only with the root. Oh, it's also not selected red because of a shader gotcha that I've made, that's something I did.
-
3.2 Unable to save/overwrite updated maps
CrazyVulcan posted a topic in Leadwerks Engine Bug Reports
Howdy, Yesterday I purchased Leadwerks form steam and this afternoon I was able to drive it for the first time. I want to say that I like the practicality of the editor though I am having trouble with finding what dose what and to see about using advanced features. That I know will come with time and experience. However the first thing I would do is create a new project I can play with, break and reassemble. I am able to make the new project fine but when I go to save the new map I will get a error message that says "Unable to overwright file filepath/Leadwerks/Project File/Test Project/Maps/Test.map" I have verified the game file in Steam and have reinstalled to no avail. This error will also appear when saving a tutorial file. So I doubt it is something Project related from my new file. Thank you for your time Gateway DX4860 WIn7 x64 Service Pack 1 Intel Core i3-2120 CPU @3.3GHz 6GB RAM NvidaGeForceGTX 550 Ti