• 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
Question by benk0913 · Jun 01, 2013 at 04:16 PM · multiplayerpositionnetworkphotondatabase

info to the databse and rollback preventing.

Well, I have got a question, I'm working on an MMORPG and I'm in a goal to make sure that the position which is sent to the database wont make any rollbacks. The client send the last position of the player when the application quits, but in case of any unexpected shutdowns of the connection / client itself the last position should be still saved, so it wont rollback to the last time the player has quitted.

I thought about sending the last position in time periods, like 5 minutes for example, but im not sure how it will affect the server, and still people might have rollbacks if they had "an accident" 4 minutes after the last position saving. the position sending is being sent as a url. and I'm working with photon for the realtime multiplayer.

Please help me, is there a better way to make sure the last correct position is safe at the database?

Comment

People who like this

0 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 ByteSheep · Jun 01, 2013 at 05:13 PM 1
Share

Well either saving the position in the database at a regular interval or alternatively locally on the clients machine would both work.
If this is a multiplayer game, one thing you may have to think about is that players could be able to send/save incorrect positions and thereby cheat.
Without getting into too much detail, you would probably want an Authoritative Server.
So if the connection to the database fails, you could still save the position locally and then add it to the database next time you have a connection, but if the entire application force quits then you won't be able to run any extra code to make sure the position gets saved.
Saving a single position every couple minutes to the database shouldn't harm the server.

avatar image benk0913 · Jun 03, 2013 at 10:15 AM 0
Share

Thank you... merry :) I'll use that. But still, id love to hear some more advice :)

0 Replies

  • Sort: 

Unity Answers is in Read-Only mode

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta on June 13. Please note, Unity Answers is now in read-only so we can prepare for the final data migration.

For more information and updates, please read our full announcement thread in the Unity Forum.

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

how can i set multiplayer online in my ludo game as i have many objects for a player like dice and 4 players for each player but i can only add one player . What i make my player 0 Answers

Host unity game with photon 0 Answers

How can I instantiate different prefabs for owner and proxy using photon? 2 Answers

Photon players' usernames not syncing properly 0 Answers

Player position in individual device in photon multiplayer 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