Database Design for Strategy/RPG

Started by
9 comments, last by DAEvo 12 years, 2 months ago
Greetings all. I'm hoping to find a bit of advice. I find myself in the role of Project Manager for an upcoming Strategy/RPG hybrid. This is a single-player game without any MMO features.

My experience with programming is limited to scripting (JS and C#) and some basic Visual C++. Through both work and academic experience I have worked with and designed relational databases.

My question is how to go about designing a database the can be queried in the Unity3D engine using scripting. The database will need to keep track of things like characters, NPCs, attributes, skills, gear, other items, etc. While I can manage to create the various tables and relationships, I am looking for good advice on the design and, frankly, what to use (CSV, MySQL, whatever that database is that came with OpenOffice, [insert name of something expensive here]) that will cooperate with Unity and keep me from writing repetitive scripts.

Please don't be harsh on a "newb" type question like this. I have used the search function here on this very forum, but the majority of the questions seem to be about making MMOs and online user accounts, while I need my databse embedded into the very heart of the game itself.

Best wishes to all.

DAEvo
Advertisement
http://unity3d.com/support/documentation/ScriptReference/WWWForm.html

Basically, use unity scripting to access web sites to gather the information that you need.
Wisdom is knowing when to shut up, so try it.
--Game Development http://nolimitsdesigns.com: Reliable UDP library, Threading library, Math Library, UI Library. Take a look, its all free.
But... I don't want to access Web sites. I need the information to be all in-game. I don't intend on requiring players to access the Internet to play, and I certainly don't intend on maintaining a server to host the information.

I did ready the Unity Scripting guide pertaining to WWW, and it is possible I am missing something, but accessing Web sites is NOT part of the design.

Smasherprog -- is there some reason that Web access adds benefit over some sort of embedded dataset?

Thank you for the reply, though!

ETA: If this question is too broad, please let me know and I can ask to have it moved to Beginner Forum.
Can you be a little bit more specific about what you want to achieve?
Using a database like SQL for a non-multiplayer game is generally not a good idea, this will require the user to install a local SQL server.
Although I know some examples of programs that do this I don't think the avarage person is happy with it.

You should probably just stick to datafiles.
What I want to achieve is to have tables of data stored in some format -- CSV, text file, spreadsheet, whatever -- that can be easily modified. I want to use either C# or Javascript to let Unity access this data.

For example, PFC VLeugel picks up an AK-47 on the battlefield. The AK is linked to a ranged weapon database that dictates its range, accuracy, damage, weight, ammo capacity, etc. After some testing it is decided that the accuracy and damage need adjusted. I want to only make changes in the data table, start the game, and see those changes in effect across the board.

Things to note: There are more than 50 types of ranged weapons, hence my desire to have all of this data stored somewhere that I can play around with.

Does that seem clearer? If not, please indicate where I am being ambiguous. And thanks for your input!
In this case I think I would just you XML data files. Should do everything you want it to.

j.
IMO the general workflow in Unity3d would be to create a prefab for each weapon where you can adjust the parameters.

Edit: or are you talking about post-launch updates?
Thanks, J. -- that is something I can handle. I'm having difficultly forcing OpenOffice to export XML and schema, so I just need to bite the bullet and buy Microsoft Office and get the XML addon for Excel.

I'll post again with tales of success or failure.
@DAEvo --- It sounds like you would benefit from using something like SQLite. It is a self-contained SQL database that does not require a server installation, and is public domain
Are these tables bigger than playerprefs or localstorage can hold? Those and xml are probably the easiest option. Sqlite probably allows a lot more room.

This topic is closed to new replies.

Advertisement