• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM Saving instances in room

Z

zendraw

Guest
Hi, i was wondering what mehtods can you guys reccomend for saving objects in a room, but only for the current gaming sesion, if you start a new game or load a saved game the room to be renewed, somthing like Diablo 2, so overall theyr kept only while you play, if you leave the game the world is renewed, the instances wuld be like 50-100 at the most not counting objects that dont change during gameplay.
 

TheouAegis

Member
The amount of data Diablo 2 kept track of during sessions boggled my mind.

You could just store it all in an ever-expanding data structure. Destroy the data structure in the Game End event. Or you could make all your rooms persistent and use your own saving system so that you're not actually saving the persistence of the rooms between plays.
 
Z

zendraw

Guest
i was thinking on saving it in an ini file cus it wont use memory but i dont know how to expand on an ini file like you can expand on an array. can you do that with an ini file? expanding.
 

YanBG

Member
I'm using persistent rooms for that and it works as described. Does it use more memory than storing them(chests/loot need to be persistent too) in ini?
 
Z

zendraw

Guest
yes, but perhaps it can be overlooked if you dont have meny persistent rooms. but ive found a solution that suits me perfectly, it stores the files in a ini file and you can load it at any time you want. ini files dont use memory, theyr just a file on your hard drive.

here is a link
 

TheouAegis

Member
Well they use memory, and when you open them to read them they use memory as well. Unopened it just takes up space on the drive. Opened, it takes up Ram. In addition to that, reading the init file takes CPU time. Also, the reason I did not suggest using init file is because the user would be able to edit it at any time.
 

TheouAegis

Member
Persistent would be faster, but the issue with persistence is the RAM load would be pretty big. The ds will be fast and may take up less memory or may take up more memory; but I think they'd be more flexible. The INI files I would expect to be the slowest, but with the lowest impact on RAM because you'd only read the INI file on room startup and write the INI file on room end and keep the INI closed the rest of the time - do not write to the INI while the room runs, as that would defeat the purpose.

I should add - if the game is for Android/iOS, then INI would be safe, since the player may not be able to access it.
 
Z

zendraw

Guest
well if the player modifies the ini file its his problem. and i dont think that is a good reason either, for every game there are cheats and it all ends up to choise, wether you want to play the game or just win it. for instance in diablo 2 theres this tool where you can do w/e with your character, equip him with w/e gear or set the skills to w/e number. unless the game dynamic is a grind to win, the player cheating doesnt matter.
 

TheouAegis

Member
The Diablo 2 tool required you to exit the game completely to cheat. And again, that only affected whatever the player owned. We're talking about drops, NPC states, enemy states, and whatnot. That's completely different from the player simply modding whatever crafts onto himself he wants (which can be hindered by not making your object codes so easy to figure out) and clearing whatever quests he wants. If you go the INI route to, say, keep track of when enemies are dead - including bosses - then the player can very easily hack the INI so that the bosses are dead and just roll through the rest of the game.

I mean, if you want to go the route of making your game easy for even a complete noob to hack, then knock yourself out.
 
Z

zendraw

Guest
i dont see what your point is, if you want to cheat, no matter what game your playing, you will be able to, even if its a AAA game you dont need to be a genius to google 'Game' trainer/cheats etc. its all about the player`s choise. have you played Mount&Blade? the save file is a txt file and you can modify it in any way you want, yet on youtube people are playng it legit and its a very famous and praised game. you cant prevent people from 'hacking' your game.
 

TheouAegis

Member
I'm not saying no one would hack your game, I'm saying you're making it so easy to hack that even a 10-year-old with Down's Syndrome could figure out how to cheat on his/her own.
 
Top