0 registered members (),
1,459
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Game_load, slowly increasing nexus usage
[Re: MasterQ32]
#468612
10/11/17 16:14
10/11/17 16:14
|
Joined: Apr 2002
Posts: 1,246 ny
jumpman
OP
Serious User
|
OP
Serious User
Joined: Apr 2002
Posts: 1,246
ny
|
I was creating alot of entities, throwing them up in the air, saving, and reloading. The game would load correctly, and the objects would load in the air and drop, but the nexus would slightly increase on every load. I have then tried loading a NULL level then game_load the save file, which kind of helped, but loading the save file increased the nexus usage anyway. After some testing, I have found 1 culprit, which was PSSM shadows. When i pssm_run(0); correctly, and waited 1 frame before reactivating them, the nexus nor the sys_memory increased. Nothing was being incremented However, my next questions pertain to what are good practices concerning where to perform game_save and game_load. Currently, I am doing game_save and load through panel buttons! Its not advised in the manual, without a wait before hand. Do you do game_save and load through startup_ loops? SV_VARS seems to balloon my sav file from just a couple kilobytes to 20 megs! What does SV_VARS save exactly?
|
|
|
Re: Game_load, slowly increasing nexus usage
[Re: jumpman]
#468661
10/12/17 13:55
10/12/17 13:55
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
I don't know how the engine decides what to save, so I can't help you with that. If I had to write my own function I'd start by deciding what data I want to save, in what order and so on. Storing it in a file is basically just binary writing / reading. You could add some level of encryption & file integrity checking to prevent people from easily fiddling around with savegames aswell.
POTATO-MAN saves the day! - Random
|
|
|
Re: Game_load, slowly increasing nexus usage
[Re: Kartoffel]
#468666
10/12/17 14:43
10/12/17 14:43
|
Joined: Apr 2002
Posts: 1,246 ny
jumpman
OP
Serious User
|
OP
Serious User
Joined: Apr 2002
Posts: 1,246
ny
|
Hi Kartoffel! Do you write them into txt files? I was able to do that once. Currently, I have the save and load working so far, but as you know, once you declare something working, it will crash soon after If you'd like to know how I got it working so far, I can let you know if you'd like, incase you want to use the native save/load system.
|
|
|
|