SoC2011 Xenmen

From The Battle for Wesnoth Wiki
Revision as of 15:28, 11 April 2011 by Xenmen (talk | contribs)


This page is related to Summer of Code 2011
See the list of Summer of Code 2011 Ideas



This is a Summer of Code 2011 student page
Project: SoC_Ideas_Multiplayer_Improvements_2011



Description

Daniel Tadeuszow - Practical Multiplayer

In singleplayer and multiplayer (prior to opening a lobby) a difficulty level is chosen and passed to the parser, which then runs through the WML. Depending on the difficulty level, certain values are chosen for various variables. HOWEVER, there is no limit on what can be specified. Many map-specific values (like unit starting positions and in-game text) can even be changed.

(It should be noted that even the available difficulty levels are specified IN the WML code for each campaign.)


My general solution is to have the parser cache all values regardless of difficulty level. In singleplayer, this will be done in the background after selecting a campaign (while displaying the 'difficulty select' screen), and in multiplayer the parsing will be done upon joining a lobby.

Strategy

1.) Familiarize myself with Wesnoth codebase

  • Fix bug #4293, one that has been a minor personal annoyance for years... I will start as soon as I'm done my finals.

(3 weeks-ish; will mainly be reading ALL the code, or as much as I can, to wrap my head around it all)

  • (additional bug-fixing)


2.) Upgrading the Preprocessing


  • Modify WML parser to pre-cache game state for each difficulty level (This involves much code I haven't inspected yet). Simultaneously, modify the 'Difficulty selection' screen code so that a temporary 'Difficulty' string is kept. Upon game start, the game state corresponding to that difficulty is loaded. This is where the bulk of work lies.

(a month or so)

  • Have parsing occur immediately in singleplayer mode upon campaign selection, and run in the background while displaying the 'difficulty selection' screen. The parsing thread should also be killable in the event that the user cancels.

(a week)

  • Extensive bug-testing with the community!

(one or two weeks, hopefully no more)


3.) Multiplayer 'Toggle-able Difficutly'

  • Add 'Toggle Difficulty' drop-down menu to the MP lobby! (It won't do anything yet)

(maybe a day)

  • Modify network code so that changes are propagated. This will either be an update to the existing protocol, or maybe I'll add an extra TCP socket for each client; depends on the versatility of the current protocol.

(a week or less; networking is EASY  :D )

  • More bug-testing with the community!

(one week; small step from singleplayer)

4.) Above and Beyond!

I'm sure there'll be lots more to do besides this. I'd like to contribute more to improving how changes are propagated in multiplayer, but these will only become clear as I become familiar as I become familiar with the code.

IRC

Xenmen

SoC Application

SoC Application

Questionnaire

1) Basics

1.1) An introduction to Daniel Jan Joseph Tadeuszow:

I'm a programmer, and Burnaby B.C. (Canada) is my home. I dislike sweets but like salty things, especially pickles. There was a time when I called myself a gamer, but that got boring once I got my hands on some development tools. When I was young I played an absurd amount of "The Incredible Machine" and "The Logical Journey of the Zoombinies", among other edutainment/puzzle software. KLOTSKI *cough*cough*...

After grade 6 it became clear that I had no social future with my classmates, so I began homeschooling. I graduated as co-valedictorian (the other was the principal's granddaughter) with honours. Next I went to TWU as a COMM major for one year, and right now I'm finishing up a year at SFU where I focused on Computer Science (though still listed as a COMM major). I like DOING things!

  • completed the Duke of Edinburgh program (bronze, silver, and gold)
  • volunteered at FreeGeek Vancouver for several years
  • created several hundred 'pinball' levels in TIM before an unfortunate hard-drive crash
  • did a summer of 'Daily Derps' in 2010; one piece of art and/or audio(music/recording) every day
  • worked on several small Python and Java games to experiment with AI, (G)UIs, and efficient coding techniques
  • designed and built a backend server-suite for Offload Studios, teaching myself networking and multi-threading (among other things) in the process

I was a big Halo PC fan back-in-the-day, and ThatWeasel was (and is) my hero. Generosity to the community should never be forgotten, and neither will he.

I am obsessed with A.I. and understanding how minds operate. I'm equally obsessed with making sure that things work.  :]


For religious reasons I don't do anything work-related between sundown Friday and sundown on Saturday, so I won't be on IRC (or responding to e-mails quickly) during that period.

1.2) Preferred email address:

dtadeuszow@gmail.com

1.3) Forum Nick:

Xenmen

1.4) SoC Motivation:

I want to try coding collaboratively with a large community, and take a break from being the lone coder-of-everything on projects. Being a one-man team is very draining, as I work best focusing on a single problem at a time. When I'm responsible for ALL the code, and its structure and strategy... well, I just need a breather. Originally I was looking at Blender and Haiku, since I'd like to learn the Blender API to make it more accessible for Python scripting (the API is currently very confusing), and I'd also like to work on a large project in assembly. In both cases, I decided my skillset was best utilized elsewhere.

1.5) Subject of study; education level; school:

Formerly Communication, presently Computer Science; second-year completed (I can provide a list of completed courses and their subjects); Simon Fraser University

1.6) Country of residence and IRC availability:

I live on Canada's west coast, Pacific time. During the summer I can be active anytime during the day between 08:00 am and 20:00 pm, preferably for a two or three-hour slot. I COULD be available much more often depending on how I arrange my coding time and if I run into any problems. The plan is to remain logged-in all day, and check periodically (every 15-60 minutes) for updates.

1.7) Summer commitments and non-availability:

I'm still presently finishing up some backend server software for Offload Studios, though this should be completed in the month between school's end and the SoC's beginning. There is a possibility that I will have some part-time work expanding on this system during the summer. If the SoC work progresses quickly, I plan to work on a Unity-based flight-simulator with my best friend, and to create several patches for my two experimental projects "jTravenus" and "Jet Pacman". My AI Director in the former needs some tweaking, and I want to create an efficient real-time AI for Jet Pacman (which is based in Pygame, not known for high-speeds...). My father and I are considering taking a two-week trip to Poland at some point. If it happens, it will most likely be right after finals, which will be before SoC begins. I will still be responsive, though not productive; I can only guarantee end-of-day responses.


  • IN-PROGRESS; WILL RETURN TO* (I filled out the entire questionnaire, but everything below here was lost somehow...)


2) Experience

2.1) What programs/software have you worked on before?

2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)

2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?

2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.

2.5) Gaming experience - Are you a gamer?

2.5.1) What type of gamer are you?

2.5.2) What type of games?

2.5.3) What type of opponents do you prefer?

2.5.4) Are you more interested in story or gameplay?

2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.

We do not plan to favor Wesnoth players as such, but some particular projects require a good feeling for the game which is hard to get without having played intensively.

2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.

3) Communication skills

3.1) Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.

3.2) What spoken languages are you fluent in?

3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.

3.4) Do you give constructive advice?

3.5) Do you receive advice well?

3.6) Are you good at sorting useful criticisms from useless ones?

3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to "see how it turn out", taking the risk of having it thrown away if it doesn't match what the project want

4) Project

4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?

4.2) If you have invented your own project, please describe the project and the scope.

4.3) Why did you choose this project?

4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like "I booked holidays between A and B" and "I got an exam at ABC and won't be doing much then".

4.5) Include as much technical detail about your implementation as you can

4.6) What do you expect to gain from this project?

4.7) What would make you stay in the Wesnoth community after the conclusion of SOC?


5) Practical considerations

5.1) Are you familiar with any of the following tools or languages? Subversion (used for all commits) Yes C++ (language used for all the normal source code) Yes STL, Boost, Sdl (C++ libraries used by Wesnoth) Very lightly; SDL more than the others Python (optional, mainly used for tools) Yes!!! build environments (eg cmake/scons) Yes WML (the wesnoth specific scenario language) Lightly Lua (used in combination with WML to create scenarios) Lightly 5.2) Which tools do you normally use for development? Why do you use them? Aptana Studio (an Eclipse fork): I love how in Eclipse you can click/select a variable or class/function name, and then Eclipse highlights all other references in that namespace, AND hightlights all points on the scrollbar so that you have a visual reference for large projects (Too much Ctrl+F jumping hurts my eyes). Pico: Vi: 5.3) What programming languages are you fluent in? The only language I'm truly fluent in is Python; I'm still in the process of emigrating to C-land. I'm capable of programming in Java and C/#/++, but much at a slower pace. 5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of "there is no way to contact you" does arise!

In general please try to be as verbose as possible in your answers and feel free to elaborate.