Game Development Community

Saving data

by gamer · in General Discussion · 03/13/2006 (3:46 pm) · 5 replies

How do people usually store players' data and the state of the game? Do you use a database or other format?
thanks

#1
03/13/2006 (3:50 pm)
Do you mean in Torque or general in particular?
#2
03/13/2006 (3:54 pm)
I mean in torque.
#3
03/13/2006 (5:55 pm)
I just use prefs for most of those things.

ie

$pref::autoReload = "1";
$pref::friendlyFire = "1";
$pref::Player::Armor = "Test Guy";
$pref::Player::Team = "Defence";
$pref::Mission::GameType = "Vehicle Convoy";

...and so on
#4
03/13/2006 (11:11 pm)
Are prefs written to some file to be stored permanantly?
#5
03/14/2006 (7:21 am)
The prefs will vary according to user taste.

The data you want to be able to save (assuming single-player) is game-dependent. As you work, you will know what data the players need and what they do not. Inventory and stats for a RPG, for example. High score list for an arcade game, etc. If you are planning for multiplayer, then the save-state system gets more complex if you wish to weight cheating mechanisms and such. Or, you could, like in the limited multiplayer in Baldur's Gate, not worry about such things, or include a user-based ban system so that clients who cheat are not allowed to connect, etc.