Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
1
Question by Salmjak · Feb 25, 2016 at 10:49 PM · networkingdatabasemysqlserver-hosting

[Unet] A dedicated server. Database? Security? Speed?

So I've been thinking about how to make my project of an online multiplayer game secure. I've come to the conclusion that the best way to design it is a SQL Database with a connection to a dedicated server and clients connected to the server, and then run all logic on the dedicated server. Only retrieving and setting values on the database from the dedicated server.

But then I realised, wouldn't this just be the same as saving all progression (for all players) at the client-host in the built in NetworkManager LAN multiplayer? What would be the benefit of using a SQL database compared to loading data from a file server-side and/or using a lot of [SyncVar]?

As I see it, no matter how I design it as long as a player have access to the "server.exe" they have access to the database (if not through editing what is sent, then through decompiling the code and look for the password, I guess this can be worked around by having a PHP intermediate but wouldn't that make it too slow?) and if not using a database they can just edit the memory. So I feel that there is no real security gain by implementing a SQL Database. But is there atleast performance?

Am I going about this the wrong way?

My project is a Diablo-style hack and slash. So what I'm looking for is hosting a game of 3-6 players per "match" and I need the dedicated server to be able to run several matches (I suppose NetworkMatch.CreateMatch() could handle that for one server? But that's a bit off-topic). So I'm not looking for a way for the server to handle 100+ players at once. Just to give an idea of what I'm working with.

Comment
Add comment · Show 1
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 nt314p · Feb 25, 2016 at 11:21 PM 0
Share

Have you tried any servers first?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Megaphone_ · Jun 30, 2016 at 05:20 PM

If your matches only have 3 to 6 players I dont think PHP is going to cause you any speed issues, depending on what is being sent and how often. Im using php to store player AND world information via UnityWebRequest and it is generally fast enough for what I am using it for. I would definitely recommend that approach

Edit-phone pressed enter

The plus side to this method as opposed to keeping it on the Unity Server is maintaining that information if something happens to the server. Imagine if your server crashed and everyone lost progression, you would have a lot of angry players.

Not to say there aren't ways around that eventuality but PHP is easy and friendly.

Comment
Add comment · 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

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

55 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 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 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

Unity MySQL database? Saving data to a database available to any player. 0 Answers

PUN and mysql database 1 Answer

Workflow Question with Unity and online Database 0 Answers

MonoDevelop problem with 4.1.4 1 Answer

Database solution networking 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