Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Ah, I misunderstood. I have one of the players act as a server. In that case it needs to be redundant so the rest can keep playing after the server player leaves due to a loss/connection problem. If you are interested, I will give you a bump on here if the new network system is in place.
Can't figure out how to DM you here but I checked out the game linked on your profile page. VERY cool! As a fellow developer I appreciate the hard work you must have put into this. Keep it up! I also added my project to my profile if you want to check it out. The current version is quite old. Planning on uploading a new one in the coming month.
The only problem I have is hole punching. I think I need to initialize with all holes "punched" and keep the NAT "awake" using keep alive messages between the clients. Although this might be a bit overkill. :) I am curious if you solved this, and if so, how.
Related to the server topology: Dropping a client is very easy. The server just tells the other clients that the client is gone and the game continues. But have you also implemented a case for dropping the server? In my current implementation, if a client cannot reach the server anymore, it will simply turn into the server or poll the successor server in the topology (the same order for all clients of course) until someone accepts him. This works great (network can even split in half).
Thank you for your answer @Kromster. Actually I already went for the host/server solution you mentioned. I was merely curious how one would solve the issue I posted above :)
@DMGregory As Hobbamok also pointed out, my case refers to one that happens after initialization. It is unlikely, but I am still curious if it is possible.
@Hobbamok This is the reason I write not "naturally". It could occur if someone added a specific rule to a firewall for example. I wouldn't want one client to be able to ruin the whole game. But even if this were not the case the question is not whether it will occur, but rather how such a network would handle it. In my opinion it should.