Soc2012 vaulttech refactor the backend

From The Battle for Wesnoth Wiki

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

This is a Summer of Code 2012 student page


John Gamboa - Whiteboard Backend Refactoring

There is a lack of optimization and consistency between the mapbuilder and the validator. These two classes big "entities" are intended to be integrated in one only mapbuilder-validator. Since the validator asks for the information available in the mapbuilder frequently, this should provide more efficience and solve the consistency problems.

In a 4 months based approach, a very preliminar cronogram shall be:

  • integrate the mapbuilder and the validator - 2 months
  • test, bugfix and document the changes - 2 month

Initially, I can't give have a better calendar.




  • 1) Basics
  • 1.1) Write a small introduction to yourself.

I'm a brasilian computer science student. Besides computing, I am interested in music and other languages. I also participate currently in an exchange program in Germany.

  • 1.2) State your preferred email address.

  • 1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?


  • 1.4) Why do you want to participate in summer of code?

I had some friends who participated in the last year and I could see their experience as one of the best they had so far in their carrer. I hope I can have a nice experience like them.

  • 1.5) What are you studying, subject, level and school?

I study currently a bachelor in Computer science.

  • 1.6) What country are you from, at what time are you most likely to be able to join IRC?

I'm from Brasil, but since I'm living in Germany right now, I'm most likely to be in IRC from 20h until 24h in the Berliner (+1) hour.

  • 1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.

I don't plan to take vacations. But I have a "mid journey" job, i.e., I work for 4h a day -- and thus this shouldn't be a problem.

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

I've worked for some time in the MClone[1] project, related to what was long ago my professors doctorate. I also made two games with my friends: Musical-Arena[2] and Sinos[3] (a Pool Game)

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

Yes. The two games from the previous question were developed in "group": Musa was developed in a three-people group and Sinos was developed in a pair. From my college programs I have also worked a lot in group.

  • 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?

No. I only know people who did.

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

The projects mentioned in question 2.1 are open-source, though they weren't big projects. Two of them were games (Musical Arena was a Guitar-Hero "Clone" and Sinos was a Pool game). The other one was the implementation of an algorithm proposed by my professor as his doctorate thesis, long ago. It was changed by a lot of people and I got the project as a mess. I couldn't change much of the code, but at least I made it compilable with a single "make", created a wikipedia article for it and put it in Googlecode.

  • 2.5) Gaming experience - Are you a gamer?

Yes. Definitely!

    • 2.5.1) What type of gamer are you?

I am the "casual" gamer: I play when I have time. This made me freaking good at Gnomines, anyway -- and, well, sometimes I get really involved in some RPG.

    • 2.5.2) What type of games?

RPGs, generally. I like tactics and Real Time Strategies too, but I usually am very bad in them.

    • 2.5.3) What type of opponents do you prefer?

Opponents in my level. I don't play to win: I play to have fun. (I'm probably using a "n00b speech", but, this is me)

    • 2.5.4) Are you more interested in story or gameplay?

This is a very difficult question, but I think I'm more interest in story.

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

No. I didn't.

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 S­­V­­N (during the evaluation period or earlier) please state so.

I haven't.

  • 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.

I'm a Brazilian living in Germany. I can't speak German decently, and thus my only way to comunicate here is English. Because of this, I think I can definitely speak English, though I probably have some grammar problems.

  • 3.2) What spoken languages are you fluent in?

Portuguese (native) and English. I can also understand Spanish very well (but I can't speak) and I can understand a little German.

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

I think so. I never had problems with any player -- though I don't play much online.

  • 3.4) Do you give constructive advice?

In Brazil we have a proverb that says something like "If advices were good, they'd be sold, instead of given". I prefer keeping them for me.

  • 3.5) Do you receive advice well?

Paradoxically, yes. I think so, at least.

  • 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

I'm moderated: I usually like to talk a little about the high-level stuff and then define strategies to follow. When these strategies are accomplished (or when I get into some define milestone), I talk again about what I could find interesting again.

If on one hand I can get really nervous on doing _no_ code, I can on the other hand get really confused when only doing code (and not talking about anything).

  • 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?

I selected a project called "Whiteboard: Refactor the backend". I want to integrate two (or, actually, more, as far as I have understood) big entities of the project in order to improve efficience and consistency to the gameplay.

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

I haven't.

  • 4.3) Why did you choose this project?

I find myself very good in writing well-documented "beautiful" (elegant) code -- though I'm not so good in creating code from scratch. Thus, I though I had the needed skills to this job.

  • 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?

(I would be hyprocrite if I didn't say I expect money, too, but besides that) I expect experience. As I said, I had friends who worked in projects in GSoC and I saw how they found theirselves inspired in their projects. I want this kind of experience too. I want to *have* to code!

I also admit I find the "participation on an open source project" a very good way of improving my chances in a future good job.

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

More code to refactor! I love making codes "beautiful" and as long as I have the permission to do such things, I would have a huge pleasure in doing this always. I also love making documentation (really!), and I think I could help too in the game translations to portuguese.

  • 5) Practical considerations
  • 5.1) Are you familiar with any of the following tools or languages?
   Sub­­version (used for all commits)
   C++ (language used for all the normal source code)
   STL, Boost, Sdl (C++ libraries used by Wesnoth)
   Python (optional, mainly used for tools)
   build environments (eg cmake/scons)
   WML (the wesnoth specific scenario language)
   Lua (used in combination with WML to create scenarios) 

I'm familiar with these ones: S­­v­­n, C++, Stl, Python, Cmake (a little) and Lua (a little). I have never touched the other ones (Boost, Sdl and WML).

  • 5.2) Which tools do you normally use for development? Why do you use them?

It depends! I usually like to use kate: it has a console, splits the windows, and you can use the VI input. But sometimes, when I need to change variable names, for example, I like to use eclipse -- because of the awesome refactoring skills from eclipse.

  • 5.3) What programming languages are you fluent in?

C and C++ are my preferred ones. I don't like to say "fluent": I really don't know everything (or almost that) of the language. Anyway, I feel very confortable using them.

I have already played with Java, Python and Lua, just in case this is usefull.

  • 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!

I wouldn't mind. I would find great, if I had a phone. Currently, I have no phone. But I intend to buy one soon, and then I'll be able to share it to my mentor, if it is the case. I can also share a skype, or such thing, in case he finds this useful.

In general, students should be as verbose as possible in their answers and feel free to elaborate.

This page was last edited on 21 March 2013, at 03:18.