Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Benifir · Jan 05, 2014 at 10:16 AM · c#databasemysqlwwwform

What Method is better for Creating a Guild

I'm developing a MMORPG based on the popular anime Sword Art Online. I'm programming the functionality of creating a guild and don't know what method would be best to store the information in a MySQL database. The values I need to store are as follows:

 public string guildName = "";
 public string guildDescription = "";
 public int guildFunds;
 public List<string> membersInGuild = new List<string> {"Bill, Bob"};
 public Color emblemColor;
 public Texture2D guildEmblem;
 public List<string> guildInventoryItems = new List<string> {""};
 public List<string> guildInventoryItemStats = new List<string> {""};

I'm thinking of storing the guild name, description, funds, and emblem color in one database that holds this information for every guild in the game, may just name this database "Guilds".

For the members in guild, should I just use the database that holds all the users of the game and add another variable holding what guild they are in or if they are not in one? Or should I create a seperate database with a list of all players in a guild and what guild they belong to and then determine they are not in a guild if they are not in the list?

And what of the emblem? Players are able to upload there own emblem, which is a much larger file size than a string so should I create a seperate database stating each guild then a variable (or cell) holding the emblem information?

Lastly the inventory items and stats in a guild. Should I create yet another database holding every item currently in a guild and then add variables for its stats and what guild it belongs to?

Thanks for the advice, and if you think of a method I have not stated that may be easier than any of the other I'd love to heat it.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Bunny83 · Jan 05, 2014 at 02:39 PM

I'm pretty sure this question is some kind of follow-up question of your other question.

In general you have to seperate two things:

  • How an object is represented at runtime in your game

  • and how it is stored in a database

There's usually a big difference. Any data stored in a database is stored in a way you can easily access and search for any parts of the stored information. In game you usually structure the data in way it's easy to use (for whatever you need it). Since MMOGs are usually mainly developed on the server, the client just displays information. Most actions a user can do are executed on the server and change / affect data in the database. The clients just get informed or they update themself by reading the new information from the server.

All your sub-questions can't be answered in a clear way since it all depends on the usage (how often is certain data read, what's the relation between certain data, the average size of the data).

It seams you have only little or no experience in database design and server programming. May i ask why you decided to make an MMOG? MMOGs require a lot specific technologies / knowledge about databases, bandwidth, traffic, server load, security, data validation, ...

If you start with no experience in those fields it's probably going to fail.

ps: What is "much larger than a string"? A string in .NET / Mono can store up to 2GB of data. In a mysql database the type "LONGTEXT" can store up to 4GB. So i don't think your image is much larger than a string can possibly be ;)

I would suggest to read a lot about relational databases, how they work and how they are used. Look at different examples and try to understand why they designed it that way.

  • mysql examples for beginners

  • database design

  • web security

As final "hint" ;)

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Benifir · Jan 05, 2014 at 04:08 PM 0
Share

Thanks for the reply Bunny83, you've been a big help.

I've been using unity for a couple years and just built a server and pair of data-gloves from scratch not to long ago and decided it would be a good learning experience to tie them all together on a little VR project starting with the server. By no means do I plan making some enterprise class server system running a huge environment with thousands of players, just a personal "proof of concept" project.

Did I say larger than a string? Opps, I meant combining each separate string in the list into a single "longer" string in order to store it all in the same row. I just decided to go with using multiple tables as that seems the simplest, and it's working just fine now. As your "hint" states about the "top down RPG", I've already got a prototype functioning so I'm working on expanding it (:

Again, I'm just going for proof on concept and thanks for the advice!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

19 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

WWWForm Question 2 Answers

Not allowed to connect to my database. 1 Answer

MySQL Funktionen Hilfe 1 Answer

Downloading data from MySql database not working on Android. 1 Answer

MySql C# compiler error 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges