What technologies to use for a browser game?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
6 views
The most primitive preacher: multiple players(2+) on their computers run in a browser app, in which everyone controls the ball. Can manage the arrows. Ie when someone moves the ball, other players are also watching this process.

Here I think how to implement it. While comes to mind only Flash and RTFMP? Are there more appropriate options?

Also along the way of ideologick technical question regarding the transfer of movement of the ball? If I move your ball, pass to other players? the new coordinates of the ball? position + direction? what to do if you want to make the balls each player had a different speed? etc.
by | 6 views

3 Answers

0 like 0 dislike
Also along the way of ideologick technical question regarding the transfer of movement of the ball? If I move your ball, pass to other players? the new coordinates of the ball? position + direction? what to do if you want to make the balls each player had a different speed? etc.
From the client to the server to transmit the direction of movement and speed.
From the server to the clients sending new coordinates, the direction of movement of all (!) moving objects and their speed.
\r
While from the server it will not come updated data about the positions on the playing field, the client tries to calculate them independently on the previously transmitted from the server data speeds and directions.
On the arrival of data on the new positions calculated by the client coordinates are corrected in case of discrepancies.
\r
It is worth considering that in some cases this can lead to sharp "spikes" moving objects on the map
because the network transmission possible delays.
\r
The advantages of this approach:
\r
    \r
  • the complication of life of unscrupulous players trying to change a situation to bypass the rules. For example, to be transferred in the opposite corner of the playing field by sending the server a specially formed team. Quite common, by the way.
  • \r
  • the fight against desync display the playing field among different players.
  • \r

Cons:
\r
    \r
  • network latency can lead to beautiful visuals
  • \r
  • the algorithm calculate the movement will have to implement on both the client and the server. And they should return identical results for identical input data.
  • \r
by
0 like 0 dislike
The Flash frontend, which connects to the server, written for example in Java, which exchanges information between the players.
\r
In the absence of information about the rules of the game and the gameplay will tell you about.
\r
To convey the old and new coordinates of the ball, so the client does not remember the old coordinates of the ball each player.
\r
To convey the speed of movement of the ball, if necessary.
by
0 like 0 dislike
WebSocket will help You. And the realization, though, flash, even Java script.
by

Related questions

0 like 0 dislike
7 answers
asked Mar 25, 2019 by oliver_queen
0 like 0 dislike
1 answer
asked May 21, 2019 by Mesuti
0 like 0 dislike
5 answers
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
27,972 users