GameFilter
From The Battle for Wesnoth Wiki
Basics
- Introduction
- My name is Ben Hwang. I am a senior college student at Yonsei University, Korea majoring computer science. During year 2001 ~ 2005, I have actively participated in the ACM-ICPC and advanced to the World Finals on year 2003 and 2005. On year 2006 to 2007, I worked at NHN Corporation, which is one of the biggest IT software company in Korea, as a game developer. The long time contest participating gave me a habit to think up with efficient algorithms and to consider the boundary limits. I am especially comfortable writing the algorithms with either c or c++.
- Contact Info
- Email Address: ben_DOT_hwang_AT_gmail_DOT_com
- irc: BenHwang
- Awake time: UTC 00:00 ~ 15:00
- No problem with communicating by phone
- Preferred contact time by phone: UTC 09:00 ~ 15:00
- Summer of Code
- This is the first time for me to participate in an open source project. Although It is a little bit late, I would like to join the open source community and learn a lot and contribute a lot.
- Experience
- Worked as a game developer for more than 4 years.
- Communication skills
- Fluent in both written and spoken English.
- Lived in the US for 7 years.
Project
- Concept
- Player can add filter options to easily find games the player is interested in. Some filtering criteria can be game type, map size and type, number of free slots/players, etc.
- When I was working at NHN Corporation, I developed a similar room-searching filter for the online poker game products.
- Usage: player can customize one to three filter options
- Categories: game rule, betting rule, betting money, maximum number of players
- Outcome: games that match more filter options were shown earlier in the list
- Reaction: Satisfied! 7 variations of poker games had their custom categories and work perfectly.
- Product reference: can check out the poker game products at http://www.hangame.com, but may have difficulties due to language.
- Timeline (roughly)
- 3 weeks: research and code review
- 2 weeks: structure the algorithm
- 2 weeks: implementation and documenting
- Rest: debugging, testing, improving
- Technical details (Just an example based on my previous project. Need more research to apply on Battle for Wesnoth)
- Game-Option string: A string that stores the option setting of the game. Data received from the server.
- ex) AABBBBCCCDD
- AA: game type
- BBBB: scenario number
- CCC: map info
- D: max players
- ex) AABBBBCCCDD
- Filter option retriever: retrieves the players custom filter option and generates a key to compare with the game-option string.
- ex1) scenario number - 1537: generated key - 153700000
- ex2) max players - 4: generated key - 4
- ex3) game type - free for all(12), map info - 100x100(191): generated key - 12000000000, 19100
- keys are generated separately to count the matching options number.
- Compare function: two games are given as arguments and return the game that matches more player custom filter options.
- filter option retriever is used to know what is trying to be match.
- if the two games has the same number of matches, they are compared with the default comparison function.
- Bottom line: Perform a single sort with the above compare function!
- If the compare function is implemented generally, it can be encapsulated. It will work well even on future changes in the options once the filter option retriever is updated.
- Game-Option string: A string that stores the option setting of the game. Data received from the server.
- My gains
- First step into the open source community.
Practical considerations
- Languages
- Fluent in C/C++
- Beginner of Python
- IDE, Tools
- Visual Studio .Net 2003 - usually developed Windows games in the past
- Subversion