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 jjobby · Jun 09, 2013 at 12:32 PM · serverdatabaseclientonline

Need suggestion about connection flow between client, server and database for online game

Hi, I'm developing an online game for iOS. It's not an MMORPG. It's just that player data and progress has to be saved to server database. I don't have experience developing an online game. So, I want to ask what's the appropriate way to design communication between client, server and database. These are my current ideas. I'm not sure if they are suitable or not or which is better. I use uLink in this project.

  1. When client login to the server, server will create new gameobject to handle that player data. Server will read data for that player from database and copy it to that gameobject. This way, the server will have to handle important data (some data is saved on the client side) for each online player and write those data to database periodically.

  2. Server doesn't create gameobject to handle each player data. When client has sent request about data changing, server will read/write those data from/to database directly. In this case, server is acting like a relay message between client and database. Server will , of course, have method to check the validity of data before writing it to database and response accordingly but I will not mention it.

I really need a suggestion from experienced developer about this. Thank you very much.

Comment
Add comment · Show 2
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 RalphTrickey · Jun 09, 2013 at 01:28 PM 0
Share

I haven't used uLink, so I can't talk about the best way to use it.

Is this a multiplayer game, or are you talking about cloud saves?

Here's some general info. The safest (and most expensive in development/servers) way is to pass nothing but inputs (and verify them) the cheapest way is a simple pass-through. The problem with a simple pass-though is how easy it is to hack.

Where you want to fall on this spectrum is up to you.

http://www.pepwuper.com/unity3d-multiplayer-game-development-unity-networking-photon-and-ulink-comparison/

avatar image jjobby · Jun 09, 2013 at 02:28 PM 0
Share

It's not a multiplayer game (for now). I'm talking about how to save/load player data in online game. So, I think that you are correct about cloud saves.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by RalphTrickey · Jun 09, 2013 at 05:14 PM

Caveat:I'm not a unity or ulink expert.

For this problem, as a first cut, I'd follow the KISS principle and just pass the object data through to be saved as an atomic chunk.

Multi-player is going to be more complex. Everything I've seen says that you should be doing message passing of input events to do it right. It's possible that a small team on Unity may be able to take some shortcuts, but I don't know what those might be.

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

15 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

Related Questions

MMORPG Server, Database, Client 1 Answer

mystery MYSQL error .. 2 Answers

Login System Using XML Server/Client 1 Answer

Compiler Errors on client server login database 1 Answer

Im not being able to fill up variables with RPCs 1 Answer


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