SummerOfCodeProposal JodyNorthup

From The Battle for Wesnoth Wiki
Revision as of 09:08, 8 April 2010 by Upthorn (talk | contribs) (Questionnaire)


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



This is a Summer of Code 2010 student page


Contents

Description

Jody Northup - Implement gameworld data persistence

This is the Persistent Gameworld idea.
If accepted, I would communicate extensively with the community to determine a solution that provides gameworld persistence with the greatest ease of access and implementation for the established community of world and campaign builders for Wesnoth.
Currently, I expect that this will involve extending WML, and creation of some system of communication about the extended WML for multiplayer games.

IRC

Upthorn, Upth

Questionnaire

Basics

Write a small introduction to yourself.

My name is Jody Northup. I am a 25 year old college student from the United States. Under normal circumstances, I should have graduated by now, but there have been a number of obstacles on my route to academic success.

I have been programming since I was introduced to C++ in the summer of 1999.

State your preferred email address.

upthorn@gmail.com

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

  • irc: Upthorn
  • irc alternate: Upth
  • Wesnoth forums: Upthorn
  • gna.org: Upthorn

Why do you want to participate in summer of code?

It is a good opportunity to gain experience in aspects of programming that aren't covered in classes, it is a great way to contribute to the open source community on projects that I believe in or even make use of myself, being able to contribute usefully to something gives me a great sense of accomplishment, and it is much more fun than any other summer job opportunity I know of.

What are you studying, subject, level and school?

I'm an undergrad with an undeclared major at Sacramento City College. In terms of credit earned, I am in my third year, in terms of time spent I am in my 5th year, and in terms of the length of time remaining until I graduate, I might as well just be starting my 2nd year. In another year or two I hope to transfer to the University of Maryland, where I plan to double-major in Computer Science and Linguistics, getting a simultaneous degree in both if possible.

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

I live on the west coast of the United States (GMT-7 during the summer), but my sleep schedule is very flexible. I am generally available on between around 19:00 and 11:00 GMT, but I can change this during the coding period if it is inconvenient to my mentor. Until my class period ends, I will be completely unavailable on Wednesdays.

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

I may be unavailable from 23:00 Wednesday to 19:00 or later on Thursdays (GMT), but this commitment can be cancelled if there is urgent work to be done. Additionally, I would like to take up an additional part-time job during the summer if I can fit one into the schedule, but there are no definite plans around this at the moment. I forgot to mention this earlier, but I plan to enroll in a math class during summer session, I do not yet know what schedule it will be, but it should not interfere greatly.

Experience

What programs/software have you worked on before?

  • A variety of programming projects for high school and college classes
  • I have hacked around quite a bit on open source emulators. Primarily the rerecording branch of gens (see TASVideos.org introduction and these forum threads for more information, with some work also being done on snes9x and mupen64.
  • I have done a great deal of feature programming and debugging work on the Sonic 1 MegaMix romhacking project for the sega genesis.
  • I have done some simple reverse engineering work to examine a simple archive file format and help create a translation patch for the Japanese indie game Bunny Must Die.
  • I have done some minor testing and debugging work on a project to encapsulate windows games in a deterministic environment, allowing input to be recorded and replayed without concern for RNG input from the system clock, or other sources.
  • I worked on ScummVM for Summer of Code last year, implementing an API to allow engine modules to negotiate with backend modules to determine color depth.

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

Yes, I frequently collaborate with other developers in my development of gens, and Sonic 1 Megamix, as well as having worked in pair and group projects for classes. And, of course, I contributed to ScummVM for last year's Summer of Code.

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?

I participated in last year's summer of code as a student for ScummVM. My project was providing support for RGB color games. I was successful, but had a great snag towards the end as I completed my project as proposed before the midterm, went on a pre-arranged 2-week vacation, and had a great deal of difficulty with the project I was assigned to work on for the remainder of the summer of code period.

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

I have been the project maintainer and coordinator of the Gens-rerecording project since about mid-2006, having produced many new features, created a google code project page, and organized the development of many more during that time.

Gaming experience - Are you a gamer?

Yes, I enjoy games, although lately I haven't been playing them as much as I used to.

What type of gamer are you?

I am an obsessive perfectionist when it comes to gaming. I always try again and again until I get the best possible outcome, and I've collected all the items. Sometimes the frustration from this will drive me to save-scum, or edit my saves outright.

What type of games?

I love all types of games, from real time strategy (command & conquer, starcraft, total annihilation) and turn-based strategy (wesnoth, civilization) to RPGs (Planescape: Torment, Skies of Arcadia), adventures (King's Quest, Space Quest, The Void/Тургор), platformers (Sonic the Hedgehog, Mario) and racing games (Virtua Racing, Burnout) and even to First person shooters (Deus Ex, Unreal Tournament) and simulations (Escape Velocity, Dwarf Fortress)

What type of opponents do you prefer?

I prefer opponents that are on the same level or slightly better than me (so, generally, ones that are not very good).

Are you more interested in story or gameplay?

I cannot choose between story and gameplay. In the best games, there is no separation between the two, but either can hold up a good game on its own.

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

Yes, I got hooked on wesnoth during my vacation last summer, and the Heir to the Throne campaign became one of the greatest difficulties I had in accomplishing additional work for ScummVM. I am not very good at strategy games, so I have not even attempted multiplayer yet.

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.

I did submit a patch to correct the VC9 project files, but then I realized it was a duplicate of one from three weeks earlier.


3) 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.

I am a native English speaker, and my proficiency with written English is better than average.

What spoken languages are you fluent in?

I am a fluent native speaker of English, can communicate alright in Japanese, and am at a basic level in Mandarin and Korean. I hope to learn Russian next year.

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

I do not know about wesnoth players specifically, but I am fairly good at interacting with players of other games. I tend to be friendly and open, and I understand that the other players' insults and other such things are just for fun and don't mean anything.

Do you give constructive advice?

I do give constructive advice whenever I can, although sometimes I think I cause offense by mistake. I always try to think my criticism through so that there is a clear indication of how the aspect could be improved.

Do you receive advice well?

I believe so, as long as it is clear and helpful.

Are you good at sorting useful criticisms from useless ones?

I think I am pretty good at sorting helpful criticism from bikeshed painting, yes.

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 like to keep a good balance between discussing changes and coding proof of concepts. In last year's summer of code, I had to interact extensively with the development community in order to design a useful API for them, but at times when it wasn't clear what the community preference was, I would make a proof of concept to demonstrate the features and drawbacks of a given method. Some of the work would be thrown out, but I did my best to maximize the amount of work that could be reused on a different method.


Project

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 did select a project from your list. Specifically, I selected the persistent gameworld project. I would like to concentrate on the necessary modifications to WML to make it work in single player, and add multiplayer support as time permits.

Why did you choose this project?

It seemed like something that I am farely likely to be able to accomplish at my current skill level, but is large enough that I shouldn't have to worry about completing it too early as happened last summer.


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

Pessimistic:

  • Now - May 23: Research the internal workings of WML, and scenario/campaign design.
  • May 24 - June 2: Discuss with mentors and UMC developers to determine precise needs of world persistence project
  • June 3 - July 12: Design a solution that addresses needs of UMC developers
  • July 13 - August 16: Implement solution for saving and loading in single player context.

Optimistic:

  • Now - May 23: Research the internal workings of WML, and scenario/campaign design, discuss with mentors and UMC developers to determine needs.
  • May 24 - June 2: Design and implement proof of concept solution for this in single player context.
  • June 3 - July 4: Refine solution through iterative design and implementation with continuous discussion with community members.
  • July 5 - July 12: Discuss with player, software dev, and UMC dev community to determine details about needs for world persistence in multiplayer context.
  • July 13 - July 27: Design and implement proof of concept solution for addressing multiplayer needs in persistence data saving/loading
  • July 28 - August 16: Refine solution through iterative design and implementation with continued discussion and/or design and implement solutions for other contexts of multiplayer games. (E.g. dedicated server mode, game-master mode, peer-to-peer or 'normal' mode)

Include as much technical detail about your implementation as you can

I will extend WML to provide for events that can save persistent data about what has occured in a scenario or campaign. This data will be accessible to the scenario and campaign in all future plays from the same machine (or related ones that ask for it by name), even if all normal savegames have been deleted. If I have time remaining once this is completed, I will attempt to extend this functionality into mult-player contexts in a meaningful way.

Crab has suggested the syntax

   [get_global_variable]
     side=1
     namespace=my_addon
     from_global=my_variable_name
     to_local=foo
   [/get_global_variable]
   
   [set_global_variable]
     side=1
     namespace=my_addon
     from_local=foo
     to_global=my_variable_name
   [/set_global_variable]
   
   [clear_global_variable]
     side=1
     namespace=my_addon
     global=my_variable_name
   [/clear_global_variable]

for the WML events to save and load persistent data, and it seems reasonable, so I expect to use it with minor modifications such as allowing for "side=global" for variables which do not relate to a particular side in the scenario, or perhaps different names for the WML events. UMC developers will be able to provide a global namespace for their add-ons, which will be used when namespace is not specified. To set a persistent variable with a constant value, it is recommended to make a temporary variable with that value, and then set the global variable from that. However, syntax may be defined later to directly set a global variable with a constant value.

TODO: Determine suggested format for namespace to minimize chances of collision.

Persistent data will normally be stored locally to each player, in "(user_data)/persist/(namespace).cfg". In standard multiplayer games, persistent variables with "side=global" will be loaded from the client of the initial host player, and persistent variables that are side-specific will be loaded from the client of the player that has taken the specific side.
TODO: Define storage in the case of dedicated game-master server mode multiplayer.

Internally, persistence cfg data will be a collection of variables, in the format var_name="value". Player variables will be separated from global variables via tags. I tentatively suggest [global][/global] and [player][/player] for this purpose. Note: unlike the previous, ill-thought-out [side][/side] proposal, player is not associated with a specific scenario side, but designates variables that may be loaded from non-host clients in multiplayer games. (possibility: some header block specifying the type of addon (scenario, campaign, era, etc) that created the persistence data. note: this cannot be automatically determined, but could be manually specified by requiring WML authors to specify at cfg file's first creation. note: this might be a bad idea, discuss with crab and/or WML authors later)

Era (and other) add-ons will also be allowed to save persistence data, but it has not yet been determined how era persistence and scenario persistence will interact. TODO: determine how era and scenario persistence will interact. (idea: [scenario][/scenario] blocks in era persistence .cfg files, and/or [era][/era] blocks in scenario persistence .cfg files. Note: this may require type-headers in order to implement)

What do you expect to gain from this project?

Experience with custom scripting language implementations, understanding of how to process XML-style languages efficiently, a sense of having been able to do something useful for someone besides myself, and a nifty t-shirt from google.

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

My interest in the project itself, and any relationships I might forge with community members during the coding period.

Practical considerations

Are you familiar with any of the following tools or languages?

   * Subversion (used for all commits)

Yes, I have used it extensively for gens development, megamix development, and my work on ScummVM last summer.

   * C++ (language used for all the normal source code)

Yes, I have been working with C++ for nearly 11 years now.

   * STL, Boost, Sdl (C++ libraries used by Wesnoth)

I am fairly familiar with the STL, and worked almost exclusively with SDL on ScummVM last summer. I am new to Boost, but in the past I have been able to catch on to these things fairly quickly with a little bit of practice.

   * Python (optional, mainly used for tools)

I have worked with python somewhat, contributing a few minor bugfixes to the Civilization 4 mod "Fall From Heaven II"

   * build environments (eg cmake/autotools/scons)

I do not have any experience with cmake, autotools, or scons.

   * WML (the wesnoth specific scenario language)

I have some minor experience with WML, from editing my own wesnoth savegames last summer.

   * Lua (used in combination with WML to create scenarios)

I have experience both in scripting Lua, and in working with the Lua C API to provide hooks and bindings.


Which tools do you normally use for development? Why do you use them?

  • C/C++: I generally use Microsoft Visual C/C++, because I am familiar with it from classes, and because it provides a very useful debugger that allows me to trace problems to their source quite quickly. I have used Dev-C++ in the past, though.
  • Java: Eclipse, because it was recommended to me and I do not know anything about the others, and also because it provides a very useful debugger facility.

What programming languages are you fluent in?

C, C++, Lua, Java, Javascript.

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 have provided a telephone contact in my SoC application.