Sign in to follow this  

Database for persistent characters

This topic is 3860 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello DeLukse here (newbie game developer) I am in need of a database that i can easily handle all sorts of character information with, such as level, exp, name, equipment and more. HELP

Share this post


Link to post
Share on other sites
Yes, MySQL is capable of storing all those things.

As you state that you are a newbie, a tip would be to just start with plain text files for storing character data.
Search these forums for "ini files" or "xml files", and check out some simple file i/o functions.

A simple example file could look like this;
name="Lord DeLukSe"
Level=1337
Exp=1559
Helmet="Iron Helmet"
Weapon="Ultra Laser Sword"



or
<player name="Lord DeLukSe">
<stats>
<level>1337</level>
<exp value="1559"/>
</stats>
<equipment>
<equip type="helmet" name="Iron Helmet"/>
<equip type="weapon" name="Ultra Laser Sword"/>
</equipment>
</player>



Share this post


Link to post
Share on other sites
Quote:
Original post by blueapple
As you state that you are a newbie, a tip would be to just start with plain text files for storing character data.


I don't think accessing databases is any more complicated then XML parsers. INI files on the other hand could be quite a bit easier.

Share this post


Link to post
Share on other sites
So how would i make dynamic changes to an INI file and what editor do i use for those?? (I'm sorry and please tell me if my questions are stupid)

Share this post


Link to post
Share on other sites
Sorry if I misled you. An INI file really isn't the way to go with that sort of data. An XML file or relational database would work much better. What language are you trying to implement this in?

Share this post


Link to post
Share on other sites
Quote:
Original post by DeLukse
How does a database Interface with a server client or game client?


It depends on the database you use, and the thing you're interfacing it with. Some databases have a native library with a C/C++ API; others may use more general interface technologies like ODBC.

Share this post


Link to post
Share on other sites
So if i'm using mysql (which confuses the dung out of me) and i want it to interface with c-script would that be possible or am i misunderstanding something?
(i need to get values from this database to a character screen on a website and in a game clients)

Share this post


Link to post
Share on other sites

This topic is 3860 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this