Hi, I heard about this game because of its unique networking solution, and I was wondering how it was accomplished.
I'm working on a multiplayer game, and I'm thinking of making it peer-to-peer as well (to keep server costs low), but I have very little experience with networking. If someone could give a general outline of how it's done in Stickman Warfare, I'd be really grateful!
I have a few questions in specific, though:
• Does every client maintain a connection to everyone else, or are there designated "hosts"?
• How many connections will a client generally have at a time?
• How is the latency and does it hold up well with 200 players? (I see on the statistics page that you reached that many)
Sorry if I'm asking for a lot, but I think this is really fascinating! I haven't seen too many games take this route. Thanks in advance!
Legutóbb szerkesztve McStan által
First, let me answer your questions.
"Does every client maintain a connection to everyone else, or are there designated "hosts"?"
No, every player is on the same level, everyone connects to everyone. Althought, there are tricks. If an another player is far from the other, it sends fewer packets. We also planned that the very far players may be not connected. This is possible because of the size of the map.
"How many connections will a client generally have at a time?"
Number of players on the server -1(yourself) + 1(main server).
The players are UDP connections, the server TCP.
"How is the latency and does it hold up well with 200 players? (I see on the statistics page that you reached that many)"
Well, quite bad. It was the servers fault, it was unoptimised so it lagged terribly. It could be observed, that the chat (managed by the server) has 1-3 second delays. But generally, it shouldn't be a problem, if you have a good network card.
But there is a much bigger problem with this: cheating. The server doesn't know what the players do or where they are. We solved this problem with encrypting the login, what is ok, until the key is unknown to the public. We also allowed to the players to log in with bad key, but they are on a different realm, and considered as modders, so the players can play together on the mods.
Ask again if you have more questions and good luck to your software!
Shuffeling Colors - A kis alkimista -
[18:41:13] Mark575: Sticket modolni olyan baszdmeg, mint amikor bombát hatástalanítasz
The source code is also available.
What you are looking for is in multiplayer.pas and Stickman.dpr.
If you also want to compile the code you will need the Directx 9 SDK for Delphi, found at http://clootie.ru/
Legutóbb szerkesztve kléni által