WesnothStatistics

From The Battle for Wesnoth Wiki
Revision as of 17:44, 24 March 2008 by Radx (talk | contribs) (Added crash report idea.)

Basics

My name is Myk and I am currently a full time graduate student (Masters, Computer Science) at CU, Ottawa, Canada.

My preferred email address is 'mkonyk_A-T_gmail_D-O-T_com'. On IRC/forums/gna I am 'radx'.

My main reason for participating in this project is that I am passionate about any kind of game development. I would certainly want to work in a gamedev industry once I graduate; I have also never participated in the Google Summer of Code, which I hope will prove to be an exciting, interesting, and of course challenging, experience.


Experience

  • What programs/software have you worked on before?
    • I participated in several commercial projects, including a commercial FPS game (during my CO-OP). As far as open source goes, I wrote a semantic web plugin for the OpenBabel chemical suite (part of my research). This project will be published on Google Code soon.
  • Have you developed software in a team environment before? (As opposed to hacking on something on your own)
    • Yes; I participated in several team projects involving software development before (both university and work).
  • 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 have not participated before; I was going to apply last year (Ogre3d SoC project), but I decided not to because of the additional summer workload.
  • What development model would you use (e.g. keywords: V-model, XP programming, agile programming, iterative; with the help of prototyping, formal specifications, tests, etc).
    • I would use a mix of iterative/agile model with unit-testing and prototyping.


Open Source

  • Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.
    • I am not involved with any open source project at the moment. I have been previously involved (please see above).


Gaming experience

  • Are you a gamer? If so...
    • Yes, I play now and then.
  • What type of games?
    • I prefer turn based strategy games, arcade console games and occasional FPS action.
  • What type of opponents do you prefer?
    • Non-cheating humans, of course. I am not a great fan of AI opponents.
  • Are you more interested in story or gameplay?
    • I am interested in both, since both are crucial.
  • Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.
    • I have played Wesnoth for about a week now. In order to build a prototype system for this project I played through several Wesnoth single players campaigns. I haven't tried multi-player mode yet.


Communication skills

  • Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.
    • Even though English is not my first language, I would say I am quite fluent.
  • Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.
    • Absolutely! So far my impression of the Wesnoth developer community is great. People on IRC have been quite helpful and friendly.
  • Do you give constructive advice?
    • Yes, If it is something I can help with, I have no problem explaining/expressing myself. I am usually quite helpful in that sense.
  • Do you receive advice well?
    • Yes, of course. I am always interested in alternative opinions/solutions.
  • Are you good at sorting useful criticisms from useless ones?
    • I find that development experience usually helps with this.


Project

  • Did you select a project from our list? If that is the case, what project did you select?
    • I chose a project which is not in the provided list. My project is 'Wesnoth Statistics'.
  • Why did you choose this project?
    • I chose this project after talking to some Wesnoth developers on the IRC channel. It seemed like an interesting and challenging project.
  • Include an estimated timeline for your work on the project
    • Please see 'Timeline' section.
  • Include as much technical detail about your implementation as you can
    • Please see 'Idea' and 'Tools and implementation' section.
  • What do you expect to gain from this project?
    • I expect to gain two things: first of all development experience and secondly, experience participating in a big open source project.
  • What would make you stay in the Wesnoth community after the conclusion of SOC?
    • It is possible, however I will not have as much time after the summer, graduate school tends to eat a lot of time.


Practical considerations

  • Are you familiar with any of the following tools?
    • I have used SVN before, however I tend to use other VCS, mostly Perforce.
    • c++ is my main programming language (STL, boost).
    • I have no experience using Python whatsoever; My main scripting language is Ruby.
  • Which tools do you normally use for development? Why do you use them?
    • I use c++ (gcc / intel compiler) and xcode ide to write my software, with my main dev system being a mac. I am also used to working with visual c++ (I went pretty much through all vc versions), since I mostly have to write code which has to be portable.
  • What programming languages are you fluent in?
    • Relevant to the project: c++, Ruby, php
  • What spoken languages are you fluent in?
    • English, Ukrainian, Russian
  • At what hours are you awake (please specify in UTC)
    • Usually from 11 AM EST to 2 AM EST (EST is -5).
  • Would you mind talking with your mentor on telephone / internet phone?
    • I would prefer to communicate via messaging (IRC, email, any IM). But if it's necessary I won't mind.


Idea

At the moment Wesnoth has a statistics system which could be accessed at http://stats.wesnoth.org . In Wesnoth client, there's an option which enables anonymous log submission to the existing statistics server. If enabled, Wesnoth client will submit campaign logs to the statistics server. With this information available, developers could track potential problems across existing campaigns - check where people tend to have problems, where people tend to give up, or where they have an easy time, and so on.

This current statistics system has a couple of problems, however. In this idea I will try to address some of these problems and discuss possible solutions.

First of all, in order to receive more accurate results about campaigns we would need to increase our dataset. This could be achieved by making 'log submission' option more accessible to the player; for example creating a dialog which would ask user if it's ok to submit the data upon the first run of the Wesnoth client. This would bring more people into the statistics submission program.

However it would also increase the stress on the server part which is responsible for accepting logs from players.

Another problem with the current statistics system is that the charts which are used to present statistical information are drawn using slow and resource hungry SVG generation routines; It would make more sense to offload this part onto the 3rd party service, such as Google Charts (please see http://code.google.com/apis/chart ).

Additionally, the statistics information that is submitted by the Wesnoth client is quite limited at the moment. It would be quite useful if clients could submit additional information, such as hardware and OS information (of course again, with user's permission) - this could be useful to the developers.


Tools and implementation

I will implement the described above system which would consist of:

  • Modifying the current cgi part responsible for accepting logs from players and making sure that it is scalable. I plan to use Ruby to implement this part. However If it's not available I could rewrite the cgi in any available language I am familiar with (perl, tcl, c).
  • Modifying the existing statistics web part and rewriting it to make use of the Google Charts API. This would involve making modifications to the existing php code.
  • Performing necessary stress tests to make sure the system is scalable.
  • Modifying Wesnoth client to submit additional statistical data.
  • Making necessary UI modifications to Wesnoth client.


Timeline

  • Until the end of April I plan to hammer out the requirements and have a strong prototype model. I plan to interact with developers and get into the Wesnoth source.
  • Unfortunately I cannot start working on this early as I have exams which are coming up in April.
  • I expect to have a completely tested and working statistics system by the end of June.
  • At that point I will start working on integrating additional statistics gathering routines into the Wesnoth client.
  • I am quite flexible with my time; Should the time permit (if I finish everything mentioned above before the end of term) I could work on integrating a basic crash report system.


Prototype

I have already implemented a working prototype for the proposed above system; Because I did not have much time, I implemented the prototype using my preferred tools (Ruby and Rails); However the choice of final tools (depending on the current hosting) is flexible.

At this moment I recompiled my Wesnoth client and forced it to submit campaign logs to my webserver; I rewrote the existing cgi script to parse the logs and upload them to local MySQL database; I also implemented a simple web service (in Ruby on Rails) which presents some statistical data to the user. The images are generated using the Google Charts API.

This prototype can be accessed at http://wesnoth.radx.org/player