For P2P architecture to work flawlessly the users will need more information on conenctions than just the pings.
Currently lags in Demigod are basically caused by:
- An unusual high ping between any two players
- Simspeed (computer speed)
- Upload bandwidth
- Download bandwidth
We need to know:
- Longest information route time (ping) between any two hosts, if so which two.
- Average sim speed statistics of all players
- Upload bandwidth
- Download bandwidth
While it may be a hassle to shown all that information, a connectivity index which combines all of the above would be preferable.
Calculation may be as follows:
MAX(ping to player 1, ping to p2, ping to p3, ping to p4, ...) - ((10 + simspeed) * 100)
*If simspeed is negative the score increases.
*If upload bandwidth is less than (number of clients * threshold) then add say 200 to the connectivity index
*Same for download bandwidth.
The higher the score, the worst the connection is.
The upload bandwidth or download bandwidth testing may be a problem. But it can be implemented by only testing for random 512kbyte packets throughout the P2P setup (Say I send 512kbyte to all other 5 players) and record the lowest speed of doing so, and maybe repeat 3 times and take the median.
If such information is known, and some testing will reveal what level of the connection index is acceptable. Color code the index number so people know what is good what is bad. Having such elaborate network test may increase lobby setup time, but I'd rather wait longer in lobby than having a laggy game that drags on half an hour.