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
0
Question by Benjames · Dec 11, 2017 at 07:15 PM · multiplayerpositionmultiplayer-networkinggoogle

Using firebase. How to get the most out of speed?

I can see position values update almost instantly in firebase but there seems to be a large a building delay when I get the values.

I use this in the void Start() for the object to be moved;

 void StartListenerX(){
         dat.Child("Vect_X").ValueChanged += (object sender, ValueChangedEventArgs args) => {
             if (args.DatabaseError != null) {
                 Debug.LogError (args.DatabaseError.Message);
                 return;
             }
             float xx = float.Parse (args.Snapshot.Value.ToString ());
             toPosition = new Vector3 (xx, transform.position.y, transform.position.z);
         };
     }
 
     void StartListenerZ(){
         dat.Child("Vect_Z").ValueChanged += (object sender, ValueChangedEventArgs args) => {
             if (args.DatabaseError != null) {
                 Debug.LogError (args.DatabaseError.Message);
                 return;
             }
             float zz = float.Parse (args.Snapshot.Value.ToString ());
             toPosition = new Vector3 (transform.position.x, transform.position.y, zz);
         };
     }


and I use this when writing / sending the position

 if ((lastpos - transform.position).magnitude > 2f) {
                 posUpTimer += Time.deltaTime;
                 if (posUpTimer > .25f) { 
                     posUpTimer = 0;
                     dat.Child ("Vect_X").SetValueAsync (transform.position.x);
                     dat.Child ("Vect_Y").SetValueAsync (transform.position.y);
                     dat.Child ("Vect_Z").SetValueAsync (transform.position.z);
                     lastpos = transform.position;
                 }
             }


even though I space out writing / sending the delay builds the longer the game is running.

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 raymondjohnsonjr01 · May 22, 2018 at 10:38 PM

Hi everyone! I was having a hard time choosing a good backend service for my apps, so just wanted to share my experience with you on that. Having some apps both at Google Play and Appstore, I used Parse until Facebook decided to shut it down. So, I was forced to search for alternatives and, to be honest, was not that happy as most of them didn't fit my requirements as nicely. Firstly, I checked Firebase, but it's very limited in querying and indexing working on a nonSQL ecosystem with the database being a giant JSON doc. Then, it was AWS and Appery, both are not user-friendly and become rather expensive in no time. My next try was Kinvey, and it's super expensive once you start doing something complex. I needed system to support social login, like Facebook, Twitter, Google, geolocation, and push notifications for both iOS and Android, so my final try was Backednless, I started for free and was able to figure out how to use it a lot faster than before, since support is pretty fast to answer. So far, it fits all of my needs and functionality is on point. Hope this helped.

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
avatar image
0

Answer by DavidSWu · Oct 23, 2018 at 03:27 AM

I am not sure if I understand. Are you comparing the Backednless SQL database offering to Firebase Realtime? They are designed to solve different problems.

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

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

Code Wont Work? 0 Answers

Questions about Multiplayer and Networking? 1 Answer

What do I need to implement web-server for multiplayer without Unity services? 2 Answers

Best method of multiplayer? 0 Answers

Unity Multiplayer Oyun Yapma 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