This is a list of notes for people willing to develop for gbrainy
Coding Style
gbrainy uses Mono project coding guidelines. Please read before doing any development.
Creating new puzzles
If you are creating a new gbrainy puzzle, please take into account following criteria:
- It should be as dynamic as possible. Every time that the user plays should be a challenge. Even if the logic is always the same, make all the elements that you can random.
- Make very clear and concise questions. The graphics shown should help to understand the puzzle. Ask other people if the puzzle makes sense to them.
- gbrainy is localized in several languages. Puzzles based on play on words or specific to a language are not good puzzles because they cannot be localised. It should be always possible to translate a puzzle to any language.
Puzzles should represent a challenge for an average person. Do not make puzzles that are trivial or only for gifted people. Use the property GameDifficulty to indicate for which difficulties the game is indicated. Also use the CurrentDifficulty enumeration to decide how difficult the puzzle should be at execution based on the user preferences.
- Try to provide a tip if it is possible (Game.Tip property).
- Make sure that, if you give a list of possible answers to the users, the options are not repeated (e.g: random generated).
How to add a new puzzle
Once you have written a new puzzle, follow these steps to add it to gbrainy:
- Add the new puzzle source file to src/Makefile.am to make it compile.
Add it to the right array at GameManager.cs source file.
Sending patch
- Always look at your patch file in its entirety before submitting it. Make sure it does not include any non-related files (such as *.po translation files).
- Describing roughly how you solve the problem will make it easier to evaluate the patch.
- Don't try to solve multiple problems in one patch -- not only will it make us reject the whole patch if one of the problems is poorly solved, it also makes it harder for us to evaluate what is solved by a particular change.
- In particular, don't try to clean up indentation, comments or the like. This will just make it harder for us to read. If you want to clean up stuff, do it in a separate patch.
From the root of the gbrainy directory (i.e., /home/user/projects/gbrainy, type svn diff > name-of-your-patch.patch. This will create a name-of-your-patch.patch in the proper format. Use svn add <filename/directory> to add new files before executing svn diff to include new files into the patch file. Others should be able to apply your patch by navigating to the root of their banter directory and running patch -p0 < name-of-your-patch.patch.
- Make sure you base your patch off of the latest version in SVN.
