Sign in to follow this  
tsoap

Seek advice on a multiplayer text finding game

Recommended Posts

tsoap    104

I have developed http://bugwars.xyz/ , a multiplayer word finding game.

The players have snake like structure, who fight each other in a grid based arena. Basically they find words in the grid and grow.
Both snakes move 1 cell in grid every 300 ms. The movement of both snakes is broadcasted to both the players in one message, so that both of them move one cell at a time in a player's screen.

I feel its very important that both the players have knowledge of true position of each other.
What happen is sometimes, player presses a key to turn the snake just before wall/other snake and before it reaches the server, The server marks the player dead.
So player pressed the key before he was dead according to him, but he died the time his message reached the server. Its classic problem of lag compensation.

It seems very complicated to solve this, with providing true position of both the players to each other all the time. Or shall I just ignore it, as snake moves a block every 300 ms, and thats a lot of time.

The server is hosted in Eurpope,  please try it on your deskop browser and let me know
 

Share this post


Link to post
Share on other sites
hplus0603    11356
If the player snake can collide with the other player snake, there is no way to 100% solve this problem.
However, you should be able to let the player pre-simulate their own snake, and have the server verify the move; this means the local player runs "ahead" of the remote player.
There is still player/player collision problems in this model, especially with the remote player's "head" as opposed to "tail," that you will have to solve somehow.
Typically, this is done through gameplay design, or through re-simulation and letting a player die even when initially it seems like they would live.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this