Jump to content
  • Advertisement
Sign in to follow this  
DAEvo

Unity Database Design for Strategy/RPG

This topic is 2516 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

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

Share this post


Link to post
Share on other sites
Advertisement
http://unity3d.com/support/documentation/ScriptReference/WWWForm.html

Basically, use unity scripting to access web sites to gather the information that you need.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
@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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!