I Need Help to make a Multiplayer Car Game

Hello, I'm working on a car game. Whenever someone touchdown the button I have to move my all device car. it means where I press the move button then my mobile car is moving but at the same time other devices are should be move
I'm using a firebase to update the car speed value. please find the attachemnt


Thank You

????????
Screenshot 2020-09-23 at 5.13.16 PM
What is that for????

to call for data change in firebase...
i think this should be like this.. still doesn't work

Why is the tag "0"?

for nothing... i'm just updating the data so this will call to datachanged function on firebase

But this isn't the most productive way... Let me create a sample aia and send it to you.

thanks a lot

A multiplayer game needs a more complex tag structure than you have.

Your tags need to account for

  • races
  • cars and their owners
  • enrollment of cars in races
  • progress of cars in races
  • referee signals to start and end races
  • lane changes by cars during races
  • collisions between cars during races
1 Like

Finally! Here it is:
sample_firebase_project.aia (35.0 KB)

I got busy doing homework last night. Sorry.
Make sure to change the Firebase API key and URL so it connects with your database.
This isn't the best example as this has many problems:

  1. The cars will not be in the same place if one phone starts before another.
  2. There are no levels, winning, or upgrades and there is only one car.
  3. The database is not used to the fullest. We should add more info about the cars like there position and stuff.