Hot answers tagged multiplayer
8
You are on the right track.
Consider Minecraft. Minecraft only loads the areas (also called chunks) immediately surrounding players. This is how the server is able to run without running out of memory, and why clients don't get bogged down from network traffic.
If it is a very low amount of information being sent between Client/Server, would it make ...
3
It is generally a good idea to only send the information to the client which is supposed to be shown to the player. Following this principle reduces network traffic and prevents cheating.
But keep in mind that when the player moves their character, you certainly want to start the move on the client-side before receiving the confirmation from the server to ...
2
Thats how we did it in Dungeons:
Client sends the target-tile to the server.
Server distributes the target tile to all clients
Server and all clients run the same deterministic pathfinding and path walking algorithm.
As a fail-guard, every now and then (like once every 3 seconds) the server sends his current position to all clients.
The clients check ...
1
I think a few games have done something similar (Warhammer online is the first that comes to mind). I believe how it has been done in the past is that players are put on a world server like any other MMO (or play locally, or with P2P) but when they enter a certain zone they are all transferred to the same server temporarily (or a specialised server) and put ...
1
I would recommend to run the pathfinding on the server. That's the best way to avoid any asynchronity between clients. It also prevents cheating in form of speed hacks or walk-through-wall hacks, because the server has full authority over the movement of the players.
But there is no reason to send the pathfinding information every x milliseconds again and ...
1
When creating multiplayer games with the client-server model, the server should keep the "master copy" of the simulation. That's what makes a server authoritative.
When a player clicks on a tile to move:
Send that tile position to the server.
Make the server determine if that tile position is valid to move to. This is where you can make sure the tile is ...
1
You could try to recalculate and broadcast the path every time the character changes tile. It won't be as intensive as the per pixel approach but still have the benefit of calculating the actual current position of possible obstacles. You could also calculate the straight path to the end target, save this path on the moving character and on each tile moved ...
1
You could probably benefit of a data driven approach.
I'm assuming the premisse that every card might have one or more associated effects, or it can just have some stats and no special effect, something like M:tG.
You can create the effects each on it own class and probably use a factory to generate them as the cards are instantiated. The more generic the ...
Only top voted, non community-wiki answers of a minimum length are eligible