GSoC project: Netplay for Hedgeroid - First update
Hi everyone.
It has been a while since I introduced my project, and I hear that some people are keen to find out what I have been up to so far. Unfortunately, I was very busy during the community bonding period before the official start of the GSoC this week, finishing my university work and moving out of the shared student apartment. This is now all wrapped up though, and I have started working on netplay for Android.
As the first step, I am working on a change that is completely invisible to the player, but will make it easier to implement netplay for iOS and other platforms.
In order to support netplay, the frontend of Hedgewars needs code to communicate with both the server and the game engine, and to pass messages between the two. This code needs to do the same on any platform, but right now the frontend is developed separately for PC, iOS and Android. So, to avoid duplicate work for every frontend, I am working on a portable library that can handle the low-level networking and parsing of messages for all frontends.
So far, I have discussed options for the implementation of this library, tried to find the best networking library that works on all platforms, and decided to use C/C++ combined with SDL_net unless I hit serious problems with it. The big upsides of SDL_net are that it is easy to use, very portable, and we already use it in the game engine, so it does not add a new depencency. On the downside it does not support IPv6, but I hope that this will be added once IPv6 becomes more widely used.
Next, I will look through the existing source code to understand and document the current protocols used between frontend and engine, and between frontend and server. This will be the basis for the API of the new library, which will provide a function for each type of message that can be sent from the frontend, and a callback mechanism for all messages that the frontend may receive.
While developing the library, the PC frontend will be adapted to use it, to ensure that the library actually offers everything that is required. Once this is working well, I will start building the new netplay features of Hedgeroid. I will keep you informed of the progress.
- Medo42's blog
- Login or register to post comments
Dark Spyro
Wow a First Update for Netplay for Hedgeroid? Awsome