I take the opportunity of this post to summarize what to do about multiplayer fix. In most of the cases, I will say what I'm planning to do for the next patch and what should be done in a next release.
Most of the things that I will say are in my opinion and are there to be discussed so if you think something is wrong/can be improved, please don't hesitate to say
Moreover, If you think that something that I have planned in the next release is important and should be done sooner, it is the good place to say it
1 - How should the player enter his nicknames ?
Currently : I added an Editbox in a new multiplayer menu
Later : When the player first launches the game, it could be nice to have a screen asking for his configuration : language, nickname, ...
2 - In the current code, for multiplayer, the players are identified within the code by their nicknames. That means that when Paul drops a creature, a message is sent to every connected player saying that Paul dropped a creature. The problem is that it supposes that every nickname is unique, which is very unlikely. It will probably cause crashes or at least strange behaviours if it happens.
Identify each player through a unique number given by the server when they connect (would allow to switch player's color before launching game)
3 - How to handle 2 identical nicknames ?
Currently : Ignore
Later : ?
4 - Should the server send the whole map to every client as it does now ?
Currently : No, it should just check that the map name is the same as the one he opened
Later : No, it should just check that the map name is the same as the one he opened and maybe use a md5 ?
5 - How to handle empty player seats ?
Currently : every player seat as to be filled to start the game.
Later : Add a GUI screen to allow adding AI instead of player ?
6 - Shall we use SFML network now ?
Yes. As I said, the changes for making multiplayer work are heavier as I thought and will require many debug time. So I guess it would be a good thing to use SFML now instead of debugging standard sockets and have untested side effects when we integrate SFML network.
7 - Shall I make dedicated classes for Server and Client network ?
Yes. In fact, it's almost already done so I will upload it when I'm back
Concerning the git commits, I think I will commit the SFML network integration and server/client dedicated class first firstly so that it is easier to see which changes concerns what.
Then, I will try to make multiplayer work regarding what we have decided about the previous points