Tag Info

New answers tagged

1

I guess the reason why you were choosing this architecture was to keep the computation costs and computation effort low on the server, allowing it to be lightweight. (Another advantage of this approach is that the usually low upstream of the clients are relieved by a server acting as a broadcasting intermediator.) Of course the downfall is that it now ...


0

It's usually not a good idea to couple the framerate to the update rate of the network. The internet is just too unreliable for this. Your clients will feel every single lag and jitter. A better method is to have the server only send changes and have the clients interpolate with them. So when an object is moving from position A to position B over the ...


1

When you say "Javascript" you certainly mean "running in the web browser". In that case, peer-to-peer networking isn't possible because there is no browser-independent standard for this. But what you can do is having a server. One technology which is quite well-suited for real-time games are websockets. You can prevent most kinds of cheating by having an ...


0

Based solely on the instructions and my reading comprehension, the following is a more easy to follow guide on how to accomplish those tasks. Open the command prompt. This can be done many different ways based on your version of windows. The easiest way would be by clicking: "Windows Key + R", then typing "cmd.exe", then clicking "OK". ...


2

Even if there's no host or server, one of the players needs to be in control, be the "host". Assume there's host A and any number of players B (in your case just 1). A pings B and records the average delay. When the game is about to start, A sends to B that it needs to start within N msec (delay value obtained above) after that message arrives. Now when ...


0

I will keep it short and sweet. There are two "servers" running. One locally and one remotely online. The user simply operates the mouse and keyboard to control the game. Input is parsed by the client and converted to commands (e.g. move forward / turn left / jump). The client sends these commands to the local server and remote server. They both process ...


0

The server should be authoritative on this matter, the client should never be trusted and each action should be checked by the server. The typical movement scenario would be: player wants to move, so it sends a move message (actual position, direction), and immediately starts the move animation. the server receives the message, it tests if the move was ...


2

Your client never moves you. The server moves you. Think about it this way: A client sends a movement request packet to the server to start moving. The server says sure you can start moving, there's nothing in the way. The server begins moving the player in x direction. The same client ask the server to start moving again. The server says, you're ...


3

You need to have a future command queue that will only be acted upon once all parties will have confirmed reception of the command. This queue will include no-operation null commands if no new command is to be executed. The delay for each command can be dependent on the ping/lag. The simulation on every peer only executes to the point (call it frame ...


2

With a multiplayer >2 game like StarCraft you can do a best out of X to figure out who's lagging. With a 2 player game there is no way to know who's at fault as it's a single connection, its that one connection that is having issue. Again, there is no such thing as player B being disconnected as the one single connection gets broken, both A and B gets ...


0

This may not be relevant anymore but I found some useful information about this subject. The gist of it is that you need to program a server (in a programming language) in order to allow multiplayer for users of your game client (the game your users are running locally). The server allows users to to connect with one another (indirectly) and is required to ...


1

Welcome to the beautiful world of thread safety and race conditions. The problem you see is very real and a nasty source of impossible to reproduce bugs. A solution I am using is to not process received network messages immediately. Instead, I have the network system add all received input events into a synchronized list. One step of the general update ...



Top 50 recent answers are included