Tasharen Entertainment Forum
Support => TNet 3 Support => Topic started by: rxmarcus on June 02, 2017, 02:26:04 PM
-
Sooo, I understand that one of the main things that TNet does is data saving / persistence (Which would make sense and be good for an MMO style game)
My game however is a simple 2D Arena shooter (Think towerfall)
As such, I don't need to save my game world between play sessions..... But I noticed that when I Create a server, I have to pass a string with a .dat file extension. Is there any way for me to avoid this? Should I just ignore it? The main reason I ask is that I was having trouble with some data being saved when I didn't want it to, so I Wondered if there is a way to just avoid it all together for my project?
Thanks
-
Yeah, you can pass null or an empty string.
Additionally:
1. Don't mark channels as persistent (so they will be destroyed when the last player leaves)
2. Don't use TNManager.SetPlayerSave
This should result in only a few files being saved: ban.txt, admin.txt, and world.config.
'world' is just the default name of the config file, in this case it would function more as a general server config as it doesn't store any world-specific data (unless you use TNManager.serverData or SetServerData).
It's worth noting that RFCs will still "save" on the channels during *runtime*, they just won't be saved to the filesystem on exit. So Target.AllSaved, Target.OthersSaved, etc will still work correctly if you need them.