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 Teapot_Gargarya · Oct 03, 2014 at 07:30 PM · multiplayerserversql

Multiplayer, Browser, SQL?

Is it possible to make a multiplayer browser based game that interacts with a SQL database? It would need to be secure. Meaning I can't have people stealing any code or viewing the SQL database details. I would need to have the code compiled or encrypted or something. The SQL database is off-server but on the same network.

The SQL is a SQLi database running on a windows 7 desktop with xampp

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Landern · Oct 03, 2014 at 07:35 PM

Is it possible to make a multiplayer browser based game that interacts with a SQL database?

Sure, but if it's real time, it will probably have nasty lag, but that depends on how you read/write the data and whether you use a connection pool(max connections can run out quickly).

It would need to be secure. Meaning I can't have people stealing any code or viewing the SQL database details.

Good luck, nothing is truly secure, your .Unity3d can be decompiled and reflected, get over it, it happens all the time(see mobile games). The SQL server security is dependent on implementation and accessibility to your server.

I would need to have the code compiled or encrypted or something.

You can obfuscate your code which will make it harder to understand the decompiled(unity) code.

The SQL database is off-server but on the same network.

Fantastic, a middle tier and no direct access to the database is a smart move.

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 Teapot_Gargarya · Oct 03, 2014 at 08:49 PM 0
Share

Thanks for the help! Are you aware of any tutorials that would show me how to make a SQL dependent multiplayer game and how to make it as secure as possible? I understand anything can be decompiled with enough force but to make it as difficult as possible?

avatar image
0

Answer by tanoshimi · Oct 03, 2014 at 07:38 PM

There is no such thing as perfect security (well, unless you don't ever let anyone play your game) - every application on the internet can potentially be hacked, reverse-engineered, packet-sniffed... if you're not happy with this, then stop now.

But yes, of course published Unity applications are compiled, and it is possible to add encryption to the code as well (although, IMHO, this is largely redundant). And, assuming you follow best programming practice (i.e. don't use dynamic SQL statements that can easily be subject to SQL injection attacks, only run sprocs that are stored on the server, don't store your connection credentials in plaintext etc etc...), then your application and SQL database are just as secure as the millions of other SQL databases that are accessed by various applications on the internet.

The most straightforward model is to create a RESTful interface to your DB and then interact with that through Unity's WWW class.

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 Teapot_Gargarya · Oct 03, 2014 at 08:49 PM 0
Share

Thanks for the help! Are you aware of any tutorials that would show me how to make a SQL dependent multiplayer game and how to make it as secure as possible? I understand anything can be decompiled with enough force but to make it as difficult as possible?

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Unity networking tutorial? 6 Answers

Save and Load JSON Data to and from Webserver, Performance Question 0 Answers

Hosted Database for Mobile Game 0 Answers

Networking RPC calls never sent to other clients 1 Answer

Photon is not works on 2dSprite animation synchronization on multiplayer 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