Zaroth Multiplayer Improvements
From The Battle for Wesnoth Wiki
This page is related to Summer of Code 2011 |
See the list of Summer of Code 2011 Ideas |
Contents
Introduction
This is a page containing details on implementation of Multiplayer engine improvements by Zaroth.
Issues
Get to know the current code and its problems
Discussion from IRC:
<zaroth> which of the pre-gsoc ideas of the page would you recommend as the first task? <Crab_> compile wesnoth, find code which deals with multiplayer game creation, and add MULTIPLE debug statements to it so you will be able to see what is going on when the game is created. <Crab_> I suggest using quite heavy logging, involving some new log domains, like "mp/create/foo", "mp/create/bar" <Crab_> so, you'll be able to use --log-debug='mp/create/*' to get all them running at debug level <fendrin> And learn about your goal. Have a look how difficult levels are handled in singleplayer and see the dirty hack that LoW uses to emulate it. <Crab_> then, launch 2+ wesnothes (can be on same host, can be on different hosts), and see how they interact and what they do send to each other when a game is created and sides are selected <Crab_> basically, I want you to understand the code and add a lot of log info to it, so we'll be able to change it and find issues without having to debug <Crab_> then, submit the logging as a patch <Crab_> and by 'heavy' logging I mean really verbose things, including logging the entire scenario configs to stdout, if explicitly asked for in the command-line switches. <zaroth> thanks for the advice/assignment! it certainly doesn't sound too hard right now :-) <Crab_> that's just the beginning, but the code will be familiar afterwards <Crab_> just to make sure, we're interested in things that start after someone selects a 'create game' button and that end when the game is started and everyone receives the scenario config.
Already done in this direction:
- got some knowledge of MP code workflow as well as adding some debugging there and discovering some redundant code
- read Mordante's GUI2 design document (in progress)
Planned functionality
In random order:
- improve the MP create game dialog as stated in main idea topic
- possibly allow categorization of the scenarios to allow easier finding and selection? As in "Official MP scenarios" > "2 players" > "Caves of the basilisk". This would allow easier browsing among maps when a user has many add-ons installed.
- possibility to randomize players assignment to sides as in this feature request and make it work over the network
- possibility to "properly" resign/surrender a game and make it work over network
- possibility to change a difficulty mid-campaign as described in this topic (and make it work over the network ;-) )
- improve hotseat gaming as in this feature request (prevent unwilling cheating by seeing each other fogs of war cleared areas)