Gunfight FPS Mini Game, may I ask how to achieve frame synchronization, and the problem of data transmission of bullet firing?

write Mini Game for the first time.

ask:

  1. frame synchronization:
    the server broadcasts to the user at a frequency of 60 seconds. Or broadcast to other users as soon as you receive a user message?
  2. does bullet launch broadcast information about each bullet, or only user launch actions?

look at your problem, is this still an online game? PVP's? That won't be easy, at least it's not "Mini Game".

similar problems have been considered when we played the H5 fishing game before, but we didn't do it later, so the concrete didn't come true.
FPS A lot of data needs to be uploaded after local computing. Tell the server message when you fire the bullet, and the server broadcast allows other people's game side to display the animation of your bullet. The collision of the bullet can only tell the server the result after the initiator has calculated it.
some of the delays in this can cause the other person to see something different from what you see. For example, if you hit (and upload the server), the other party sees that your bullet has not been hit, but the server still says that you have hit it. Or maybe you saw someone else's bullet hit, but it didn't.

there should also be some algorithms for delayed synchronization. I have little talent and learning, so that's all I can say.
beside the point: this kind of computing requires stronger anti-cheating technology.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bc9cd2-30994.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bc9cd2-30994.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?