4
\$\begingroup\$

enter image description here

In a 2D game where the user moves with the keyboard arrows, should the user send all the time he moves his position (x, y)?. If the user has some speed, the user would send (x, y) like 50 times pixel by pixel in just a second.

\$\endgroup\$
  • \$\begingroup\$ Depends on various things, including game type. Among other things, it's usually better to avoid binding everything to the client display (if player one is using a 4K display, and somebody else 320x240, which values do you use?). \$\endgroup\$ – Clockwork-Muse Dec 27 '15 at 9:31
0
\$\begingroup\$

Probably you are using sockets. If so, then there is no issue in it. One thing, if your game has physics Angry Bird is type then you should pass relevant info. Like before shooting send positions per frame, after player shoots, then send force, angle, altitude and simulate through this information on other side. If this is not the case then no harm to send info per frame. If data is not very big.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Any reason for down vote?? It is my personal experience \$\endgroup\$ – Hamza Hasan Dec 26 '15 at 17:37
  • 1
    \$\begingroup\$ Haha, reason?! It's SO, drive-by downvotes are the norm. I just brought your -1 back to 0. \$\endgroup\$ – NetOperator Wibby Dec 28 '15 at 20:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.