Jump to content

  • Log In with Google      Sign In   
  • Create Account


Database Design for Strategy/RPG


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
10 replies to this topic

#1 DAEvo   Members   -  Reputation: 100

Like
0Likes
Like

Posted 25 January 2012 - 07:40 AM

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

Sponsor:

#2 smasherprog   Members   -  Reputation: 428

Like
0Likes
Like

Posted 25 January 2012 - 08:21 AM

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.

#3 DAEvo   Members   -  Reputation: 100

Like
0Likes
Like

Posted 25 January 2012 - 08:34 AM

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.

Edited by DAEvo, 25 January 2012 - 08:37 AM.


#4 vleugel   Members   -  Reputation: 252

Like
0Likes
Like

Posted 25 January 2012 - 04:03 PM

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.

#5 DAEvo   Members   -  Reputation: 100

Like
0Likes
Like

Posted 25 January 2012 - 05:11 PM

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!

#6 TheTroll   Members   -  Reputation: 882

Like
1Likes
Like

Posted 25 January 2012 - 05:25 PM

In this case I think I would just you XML data files. Should do everything you want it to.

j.

#7 Madhed   Crossbones+   -  Reputation: 2496

Like
0Likes
Like

Posted 25 January 2012 - 05:28 PM

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?

#8 DAEvo   Members   -  Reputation: 100

Like
0Likes
Like

Posted 25 January 2012 - 05:32 PM

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.

#9 lTyl   Members   -  Reputation: 135

Like
1Likes
Like

Posted 25 January 2012 - 06:19 PM

@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

#10 lmbarns   Members   -  Reputation: 459

Like
1Likes
Like

Posted 25 January 2012 - 07:21 PM

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.

#11 DAEvo   Members   -  Reputation: 100

Like
0Likes
Like

Posted 26 January 2012 - 07:35 AM

SQLite does seem to be the "path of least resistance" for me -- it is more like what I'm used to and less like a process I will have to learn from scratch.

@Imbarns -- Yes, there are multiple large tables. The real problem is that there will be a table the defines the overall ruleset for the stategy rules and RPG attributes, so there will can be multiple selections made that can draw from any, most, or just a few of the tables. That's why a prefab M-16 can't work.

@Madhed -- your reply snuck up on me. Yes, pre launch tweaks, post-launch mods by players. Remember how Total Annihilation allowed easy modification to every game element? The designers published enhancements and encouraged user modifications.

Edited by DAEvo, 26 January 2012 - 07:46 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS