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.
\$\begingroup\$ \$\endgroup\$
1 - \$\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– Clockwork-Muse2015-12-27 09:31:00 +00:00Commented Dec 27, 2015 at 9:31
Add a comment |
1 Answer
\$\begingroup\$ \$\endgroup\$
2 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.
- \$\begingroup\$ Any reason for down vote?? It is my personal experience \$\endgroup\$Hamza Hasan– Hamza Hasan2015-12-26 17:37:58 +00:00Commented Dec 26, 2015 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– NetOperator Wibby2015-12-28 20:11:06 +00:00Commented Dec 28, 2015 at 20:11
