Game Development Community

Saving Character Question

by none · in Torque Game Engine · 04/17/2010 (4:49 pm) · 4 replies

Hey everyone! I'm about to go into a project and wanted some input and tips/advice on completing the following:

1. Menu where player can create character not like rpg style, just insert a name and save a character database.
2. Have a store in the main menu, not for real money but like points the character earns in the game.
3. When the player buys one of these items, save it to their database.
4. Before a game, give them a menu allowing them to choose some of the items they have purchased (example they buy some guns at the store and several types of magazines but they can only choose one gun and one magazine.)

I do not know how to make a database so any help would be great. The game is only gonna be single player so I dont need like stats and stuff just basically a character they can use each time they play with their own equipment.

#1
04/19/2010 (2:28 pm)

*bump*
#2
04/19/2010 (4:26 pm)
If you're only doing this for single-player, and you're not storing huge amounts of data, I'd say a database would be overkill, unless you're going all-out and doing something like replacing datablocks with a database. Loop up the file IO script commands (should be easy to find on TDN) and write the information you need to a file, then read it out again. Also, have a look at the way preferences are saved - you could store all your stuff in global variables and 'export' them like preferences, then load them just by execing your exported file.
#3
04/19/2010 (5:11 pm)
I'm a mega noob to scripting hahaha, anything beyond weapons is mostly beyond me hahaha. Could you put into simpler terms for me? I'll check out the TDN and I looked up and understand why database would be overkill. Is what you described above able to keep track of a player's inventory even while in the menu for example: I get 5 outs in a game and earn 5 points. Then the player goes to the main menu and to the store gui and buys a gun for 5 points. Would this be able to save player's unlocks or store purchases?
#4
04/20/2010 (7:05 am)
This might be a good place to start,

It wont work for everything right out of the box, you will have to do a lot of work on it yourself though.

http://www.torquepowered.com/community/resources/view/11552