<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.wesnoth.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=TuukkaH</id>
	<title>The Battle for Wesnoth Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.wesnoth.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=TuukkaH"/>
	<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/Special:Contributions/TuukkaH"/>
	<updated>2026-04-07T00:52:07Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=CodingStandards&amp;diff=16309</id>
		<title>CodingStandards</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=CodingStandards&amp;diff=16309"/>
		<updated>2007-07-04T03:35:00Z</updated>

		<summary type="html">&lt;p&gt;TuukkaH: add Category:Programmers Category:Committers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wesnoth uses modern/advanced C++ that is portable to Visual C++ 6 and GNU G++ 3.0+&lt;br /&gt;
&lt;br /&gt;
== Formatting ==&lt;br /&gt;
&lt;br /&gt;
Indent with a tab character (width 4 characters), but align with spaces so tab width can change. &lt;br /&gt;
&lt;br /&gt;
You may use long lines. (Could we change this to max 80 columns per line? --TuukkaH)&lt;br /&gt;
&lt;br /&gt;
=== How to on Emacs? ===&lt;br /&gt;
&lt;br /&gt;
 M-x set-variable tab-width 4&lt;br /&gt;
 M-x set-variable c-basic-offset 4&lt;br /&gt;
&lt;br /&gt;
How to set alignment to use spaces?&lt;br /&gt;
&lt;br /&gt;
== Naming ==&lt;br /&gt;
&lt;br /&gt;
=== End Non-Public Members of Classes with an Underscore ===&lt;br /&gt;
&lt;br /&gt;
All non-public data members of classes should have their names terminated with an underscore, to show that they are a&lt;br /&gt;
class member. This makes for more readable code, once one is familiar with the convention.&lt;br /&gt;
&lt;br /&gt;
== Idioms ==&lt;br /&gt;
&lt;br /&gt;
=== Use References when a value may not be NULL ===&lt;br /&gt;
&lt;br /&gt;
If a value passed to a function can never be NULL, use a reference instead of a pointer. I.e.&lt;br /&gt;
&lt;br /&gt;
  void myfunction(Object&amp;amp; obj);&lt;br /&gt;
&lt;br /&gt;
rather than&lt;br /&gt;
&lt;br /&gt;
  void myfunction(Object* obj);&lt;br /&gt;
&lt;br /&gt;
This more clearly shows the user of the function that obj may never be NULL, without them having to consult&lt;br /&gt;
documentation or the implementation of the function.&lt;br /&gt;
&lt;br /&gt;
=== Use Const ===&lt;br /&gt;
&lt;br /&gt;
The 'const' feature of C++ allows interfaces to more clearly specify how they treat objects. Always use const when you&lt;br /&gt;
are not going to modify an object.&lt;br /&gt;
&lt;br /&gt;
I.e.&lt;br /&gt;
&lt;br /&gt;
  void myfunction(const Object&amp;amp; obj);&lt;br /&gt;
&lt;br /&gt;
demonstrates to the caller of myfunction() that obj will not be modified. If myfunction may modify obj, then use&lt;br /&gt;
&lt;br /&gt;
  void myfunction(Object&amp;amp; obj);&lt;br /&gt;
&lt;br /&gt;
likewise, if a variable is not changed after initialization, make it const.&lt;br /&gt;
&lt;br /&gt;
=== Write Exception-Safe Code ===&lt;br /&gt;
&lt;br /&gt;
Wesnoth code should be exception-safe, even if you do not use exceptions directly. That is, you should be able to assume that an exception is thrown almost anywhere from within the code, with well-defined results (i.e. no resource leaks).&lt;br /&gt;
&lt;br /&gt;
Code that uses a pattern like,&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  SDL_Surface* image = IMG_Load(&amp;quot;image.bmp&amp;quot;);&lt;br /&gt;
  ...some code, which uses 'image'...&lt;br /&gt;
  SDL_FreeSurface(image);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
is bad, because the code may throw an exception, and 'image' will never be freed. Instead, use wrapper objects which free the object in their destructor.&lt;br /&gt;
&lt;br /&gt;
For SDL_Surface objects, use the &amp;lt;tt&amp;gt;surface&amp;lt;/tt&amp;gt; class. So you could rewrite the above code,&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  surface image(IMG_Load(&amp;quot;image.bmp&amp;quot;));&lt;br /&gt;
  ...some code, which uses 'image'...&lt;br /&gt;
  } ''the image is automatically freed here when 'image' is destroyed&lt;br /&gt;
&lt;br /&gt;
Instead of allocating memory directly using new[] or malloc(), use language-provided containers, such as vector.&lt;br /&gt;
&lt;br /&gt;
=== Do not use sprintf ===&lt;br /&gt;
&lt;br /&gt;
Sprintf does not check whether or not it is writing past the end of the space allocated. This is a security problem if someone other than the person running the game can cause sprintf to write very long strings. In Wesnoth this untrusted data could come potentially from other players in a multiplayer game or from downloaded campaigns. Instead you should use snprintf with the second argument being sizeof of the buffer that will hold the result.&lt;br /&gt;
&lt;br /&gt;
== Standard C++ to avoid ==&lt;br /&gt;
&lt;br /&gt;
=== Respect for loop scoping of different platforms ===&lt;br /&gt;
&lt;br /&gt;
In the code,&lt;br /&gt;
&lt;br /&gt;
  for(int i = 0; i != 100; ++i) {...}&lt;br /&gt;
&lt;br /&gt;
the variable 'i' is scoped within the for loop according to ISO/ANSI C++ and GNU G++. However it is scoped within the&lt;br /&gt;
surrounding scope according to Visual C++ 6.&lt;br /&gt;
&lt;br /&gt;
This means that the code,&lt;br /&gt;
&lt;br /&gt;
  for(int i = 0; i != 100; ++i) {}&lt;br /&gt;
  for(int i = 0; i != 100; ++i) {}&lt;br /&gt;
&lt;br /&gt;
is illegal on VC++6, because i is defined twice, although it is legal according to the standard, and GNU G++.&lt;br /&gt;
&lt;br /&gt;
On VC++6, the legal way to write it would be,&lt;br /&gt;
&lt;br /&gt;
  for(int i = 0; i != 100; ++i) {}&lt;br /&gt;
  for(i = 0; i != 100; ++i) {}&lt;br /&gt;
&lt;br /&gt;
But this is illegal according to the standard, because 'i' is not defined in the second loop. The correct way to write&lt;br /&gt;
this code to conform to the standard and work on all platforms is to simply abandon declaring variables in the&lt;br /&gt;
initialization statement of a for loop when the variable must be reused in the same scope,&lt;br /&gt;
&lt;br /&gt;
  int i;&lt;br /&gt;
  for(i = 0; i != 100; ++i) {}&lt;br /&gt;
  for(i = 0; i != 100; ++i) {}&lt;br /&gt;
&lt;br /&gt;
=== Do not use wstring ===&lt;br /&gt;
&lt;br /&gt;
The standard C++ wstring class, defined as a basic_string&amp;lt; wchar_t &amp;gt;, does not exist in some platforms supported&lt;br /&gt;
by&lt;br /&gt;
Wesnoth. Use wide_string, defined in language.hpp, instead. wide_string is actually defined as a vector&amp;lt; wchar_t &amp;gt;&lt;br /&gt;
&lt;br /&gt;
== C legacy to be avoided ==&lt;br /&gt;
&lt;br /&gt;
=== Use the function templates minimum and maximum ===&lt;br /&gt;
&lt;br /&gt;
Standard C++ offers the function templates min and max to find the minimum and maximum of two values on which operator&lt;br /&gt;
&amp;lt;&lt;br /&gt;
is defined. Unfortunately, many hoops must be leapt through to get this working on VC++. So, we do not use standard&lt;br /&gt;
min&lt;br /&gt;
and max. Instead, we use minimum and maximum, defined in utils.hpp.&lt;br /&gt;
&lt;br /&gt;
Usage is fairly natural:&lt;br /&gt;
&lt;br /&gt;
  int i = minimum(x,y);&lt;br /&gt;
&lt;br /&gt;
Note that in the above example, if x is an unsigned integer, and y is a signed integer, VC++ will have problems. You&lt;br /&gt;
must explicitly specify the version of minimum being called in such cases:&lt;br /&gt;
&lt;br /&gt;
  int i = minimum&amp;lt;int&amp;gt;(x,y);&lt;br /&gt;
&lt;br /&gt;
=== Use util::array instead of C-style Arrays ===&lt;br /&gt;
&lt;br /&gt;
C-style arrays are very efficient, but their interface is ugly. Use util::array defined in array.hpp. It is a wrapper&lt;br /&gt;
for an array which has a C++ container-style interface. If you need to, extend it to make it fit your needs.&lt;br /&gt;
&lt;br /&gt;
=== Do not use C-style casts ===&lt;br /&gt;
&lt;br /&gt;
The following code,&lt;br /&gt;
&lt;br /&gt;
  if(i-&amp;gt;second.side() == (size_t)player_number_) {&lt;br /&gt;
&lt;br /&gt;
is considered bad practice in C++ since a C-style cast is overpowered -- if types change around it could end up casting away constness, or performing an implementation-defined data reinterpretation (basically a C-style cast is a compiler generated combination of static_cast, reinterpret_cast, and const_cast).&lt;br /&gt;
&lt;br /&gt;
Good programming style is to use the least powerful tool available that does what you want. For example,&lt;br /&gt;
&lt;br /&gt;
  if(i-&amp;gt;second.side() == static_cast&amp;lt;size_t&amp;gt;(player_number_)) {&lt;br /&gt;
&lt;br /&gt;
Alternatively, a constructor call may be used for non-builtin types.&lt;br /&gt;
&lt;br /&gt;
Note: there may be some obscure cases where a C-style cast is desirable, such as converting a pointer to an integer type of unspecified size.&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
=== Document &amp;quot;config&amp;quot; preconditions and postconditions ===&lt;br /&gt;
&lt;br /&gt;
In the Wesnoth code you will commonly encounter a data container known as the &amp;quot;config,&amp;quot; which contains heirarchical string data (such as WML contents or game settings). The tagged &amp;quot;children&amp;quot; of the config and their string &amp;quot;attributes&amp;quot; are arranged in an ordered and mapped format internally using STL.&lt;br /&gt;
&lt;br /&gt;
Because config data is utilized in so many ways and places,  it can be difficult to track across the scope of the entire program. You should document all public functions that take/return a config, specifying config content expectations. In particular, if your function requires a config parameter, specify where/how the config should be created. This will be a great help to any future coders who need to call or modify your function.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[HackingWesnoth]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Programmers]]&lt;br /&gt;
[[Category:Committers]]&lt;/div&gt;</summary>
		<author><name>TuukkaH</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Project&amp;diff=16308</id>
		<title>Project</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Project&amp;diff=16308"/>
		<updated>2007-07-04T03:33:59Z</updated>

		<summary type="html">&lt;p&gt;TuukkaH: add Category:Programmers Category:Committers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Battle for Wesnoth is a [http://gna.org/projects/wesnoth/ Gna! project]. See also the [http://freshmeat.net/projects/wesnoth/ project] and [http://freshmeat.net/project-stats/view/38720/ stats] at [http://www.freshmeat.net/ freshmeat].&lt;br /&gt;
&lt;br /&gt;
There are also Wesnoth pages in other languages:&lt;br /&gt;
French ([http://tournoiswesnoth.frbb.net/ 1], [http://wesnothfr.ww7.be/ 2]),&lt;br /&gt;
[http://wesnoth.fw.hu/ Hungarian],&lt;br /&gt;
[http://wikiwiki.jp/wesnoth/ Japanese],&lt;br /&gt;
[http://www.wesnoth.pl/ Polish],&lt;br /&gt;
[http://perso.wanadoo.es/wesnoth/ Spanish].&lt;br /&gt;
&lt;br /&gt;
== Artists ==&lt;br /&gt;
Graphic artists and musicians usually meet on the [http://www.wesnoth.org/forum/ forum].&lt;br /&gt;
* [http://www.wesnoth.org/forum/viewforum.php?f=9 Artwork development forum]&lt;br /&gt;
* [http://www.wesnoth.org/forum/viewforum.php?f=14 Music development forum]&lt;br /&gt;
&lt;br /&gt;
== Developers ==&lt;br /&gt;
Coders can help fixing [http://bugs.wesnoth.org bugs], adding new features...&lt;br /&gt;
* [[CodingStandards]]&lt;br /&gt;
* [[Roadmap]]&lt;br /&gt;
* [http://devdocs.wesnoth.org/ Documentation] - generated and uploaded two times every day (05:05 and 17:05 GMT+2).&lt;br /&gt;
* [[WesnothSVN]]&lt;br /&gt;
* [[DeveloperGuide]]&lt;br /&gt;
&lt;br /&gt;
== Translators ==&lt;br /&gt;
* [[WesnothTranslations]]&lt;br /&gt;
* [http://gettext.wesnoth.org Statistics]&lt;br /&gt;
* [[WesCamp|Translating User made Campaigns (featuring wescamp-i18n)]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Programmers]]&lt;br /&gt;
[[Category:Committers]]&lt;/div&gt;</summary>
		<author><name>TuukkaH</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=HackingWesnoth&amp;diff=16307</id>
		<title>HackingWesnoth</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=HackingWesnoth&amp;diff=16307"/>
		<updated>2007-07-04T03:31:58Z</updated>

		<summary type="html">&lt;p&gt;TuukkaH: add Category:Programmers Category:Committers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is designed to be a guide for aspiring Wesnoth programmers on what they need to do to be able to productively contribute to the Wesnoth code base.&lt;br /&gt;
&lt;br /&gt;
Wesnoth is written in C++, a large and complicated language. There are many C++ programmers, but they tend to have widely varying levels of skills and styles. This page is designed to be a guide as to the skillset needed to contribute to Wesnoth.&lt;br /&gt;
&lt;br /&gt;
== C++ Quiz ==&lt;br /&gt;
&lt;br /&gt;
Below is a short C++ quiz that assesses your skills in areas of C++ that are used alot in Wesnoth. If you know all the answers to the questions, you are probably ready to start working on the Wesnoth code base. If you know most of the answers to the questions, you can probably work on the Wesnoth code base with some oversight from the senior developers. There are good C++ guides for both knowledgeable programmers (such as [http://www.icce.rug.nl/documents/cplusplus/ The C++ Annotations]) and beginners (such as [http://www.cplusplus.com/doc/tutorial/introduction.html C++ Language Tutorial]).&lt;br /&gt;
&lt;br /&gt;
# What is a virtual destructor? Why is it needed?&lt;br /&gt;
# What does the standard class template auto_ptr do? What is its purpose?&lt;br /&gt;
# What is a vector, and why would you use it?&lt;br /&gt;
# What is a map, and why would you use it?&lt;br /&gt;
# What are the differences between a reference and a pointer? When should each be used?&lt;br /&gt;
# What is an iterator, and when is it used?&lt;br /&gt;
# What are the memory areas in a C++ program, and what is the purpose of each?&lt;br /&gt;
# What is a copy constructor, and what is an assignment operator? When must you define them in a class?&lt;br /&gt;
&lt;br /&gt;
== Wesnoth Coding Style ==&lt;br /&gt;
&lt;br /&gt;
=== Guideline 1: Don't prematurely optimize ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;When I was a new and inexperienced coder, I read the following rather famous saying: &amp;quot;Premature optimization is the root of all evil.&amp;quot; -- Donald Knuth.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While I wouldn't then -- and would be hesitant to now -- dispute the opinion of Donald Knuth on any programming topic, this absolute statement confused me. Premature optimization certainly doesn't sound like a wise thing to do, but it sounds somewhat obscure to be the root of all problems in programming. Had Knuth written this phrase after spending too long correcting problems caused by a programmer who was hell-bent on optimization at every turn?&lt;br /&gt;
&lt;br /&gt;
Now I realize that Knuth was correct. Time and time again programming problems spring from developers making their code too complicated because they are trying to optimize unnecessarily.&lt;br /&gt;
&lt;br /&gt;
By the [http://en.wikipedia.org/wiki/Pareto_principle Pareto Principle] we know that a minority of the code will occupy a majority of the running time. That is, perhaps 90% of the running time of the program will be spend executing just 5% of the code. It is thus generally unnecessary to apply many optimizations at all to most of the program. One can just write the code in a way that is the most readable and maintainable and forget about optimization altogether most of the time.&lt;br /&gt;
&lt;br /&gt;
Remember also, C++ compilers are good, and smart, and they can execute code fast. Most code will run fast enough, unless you go out of your way to make it run slowly.&lt;br /&gt;
&lt;br /&gt;
So, the first rule of Wesnoth programming is that unless you have a very good reason to think you need to optimize, do whatever is simplest and most maintainable.&lt;br /&gt;
&lt;br /&gt;
Many programmers seem to have an obsession with using the control C++ gives them to do all sorts of crazy things. Like make their own memory management routines, or write their own containers, and so forth. Simply, don't. It's possible to write good C++ code very fast using the standard components supplied as part of the language.&lt;br /&gt;
&lt;br /&gt;
This leads us to our next topic...&lt;br /&gt;
&lt;br /&gt;
=== Guideline 2: Know the Standard containers and use them ===&lt;br /&gt;
&lt;br /&gt;
One of the best things about C++ is that the standard supplies some great containers. Always prefer to use them first to store data. That is,&lt;br /&gt;
&lt;br /&gt;
* prefer to use std::vector to store dynamic arrays&lt;br /&gt;
* prefer to use std::string to store strings (we also provide t_string for a translatable string -- it's based on std::basic_string, which std::string is also based on)&lt;br /&gt;
* prefer to use std::map to store key/value pairs&lt;br /&gt;
* prefer to use std::set to store sets of items (roughly equivalent to the mathematical concept of a set).&lt;br /&gt;
&lt;br /&gt;
There are other C++ containers, and you should know about all of them. A good source of documentation on the portion of the C++ standard library known as the Standard Template Library (STL) which contains the standard containers can be found [http://www.sgi.com/tech/stl/ here].&lt;br /&gt;
&lt;br /&gt;
By using the standard containers, you should almost never have to manually allocate and delete memory yourself by hand. The containers will automatically allocate and deallocate memory for you. This leads us to our next guideline...&lt;br /&gt;
&lt;br /&gt;
=== Guideline 3: Use the resource acquisition is initialization (RAII) idiom ===&lt;br /&gt;
&lt;br /&gt;
In C, you might write some code like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void myfunction()&lt;br /&gt;
{&lt;br /&gt;
    char* mystring = (char*)malloc(n);&lt;br /&gt;
    /*some code, which manipulates mystring*/&lt;br /&gt;
    ...&lt;br /&gt;
    free(mystring);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code works, but is error prone. What if the code in the middle exited using a return statement, or a longjmp statement, or in C++, threw an exception? The memory allocated would never be cleaned up, and we would have a memory leak.&lt;br /&gt;
&lt;br /&gt;
Sure, you're a good programmer, and you probably make sure you're very careful about freeing the string. But what about when this function grows to be 100 lines long (and functions have a way of doing that), and then another programmer who isn't that familiar with the function is trying to fix a critical bug as quickly as they can, that requires adding an early return statement to this function? What about when someone is trying to read the code to scan for memory leaks? Once they see the malloc at the top, they will have to carefully read the entire function, to make sure it's all okay.&lt;br /&gt;
&lt;br /&gt;
Now if we had this C++ version instead,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void myfunction()&lt;br /&gt;
{&lt;br /&gt;
    std::string mystring(n,'x');&lt;br /&gt;
    /*some code, which manipulates mystring*/&lt;br /&gt;
} //mystring is destroyed and memory automatically released&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None of these problems can possibly happen. mystring will ''always'' be released at the end of the function.&lt;br /&gt;
&lt;br /&gt;
So, this just re-iterates how important C++ containers are, right? Well, yes, but it also shows us that we should always avoid code written like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void myfunction()&lt;br /&gt;
{&lt;br /&gt;
    ...allocate resources...&lt;br /&gt;
    ...use resources&lt;br /&gt;
    ...release resources...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have code like this, you should put the resources in a class that will manage them and release them at the end of the function. If there is no class like that, then you should write one. This goes for all resources: memory, files, threads, and so forth.&lt;br /&gt;
&lt;br /&gt;
It might sound like a silly mistake that we're protecting against here, one that an experienced programmer wouldn't make. However, almost all programming bugs are due to 'silly mistakes'. This leads us to our next item...&lt;br /&gt;
&lt;br /&gt;
=== Guideline 4: Lean on the compiler as heavily as you can ===&lt;br /&gt;
&lt;br /&gt;
Humans make mistakes. Even very stupid mistakes. Computers are as dumb as toast, but they are at least very very consistent.&lt;br /&gt;
&lt;br /&gt;
For Wesnoth, we try to write code that will make the compiler guard against mistakes as much as possible. The use of RAII as described above is one example of this: writing the code so the compiler and language rules will guarantee it's correct.&lt;br /&gt;
&lt;br /&gt;
There are some more ways to do this. One big way is to make all code const correct. That is, always define something as 'const' when it shouldn't change its value. If you have a pointer that is meant to be read only, define it as a const pointer. Then if the code is later changed so that your pointer changes the value, the compiler will produce an error.&lt;br /&gt;
&lt;br /&gt;
Another way is to avoid implicit conversions between objects, and always use the C++-style casts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[CodingStandards]]&lt;br /&gt;
* [http://www.wesnoth.org/forum/viewtopic.php?t=9979 Patch guidelines]&lt;br /&gt;
* [http://www.wesnoth.org/forum/viewtopic.php?t=13878 Lack of code documentation]&lt;br /&gt;
&lt;br /&gt;
[[Category:Programmers]]&lt;br /&gt;
[[Category:Committers]]&lt;/div&gt;</summary>
		<author><name>TuukkaH</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=DeveloperGuide&amp;diff=16306</id>
		<title>DeveloperGuide</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=DeveloperGuide&amp;diff=16306"/>
		<updated>2007-07-04T03:29:39Z</updated>

		<summary type="html">&lt;p&gt;TuukkaH: add Category:Committers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* setting up developer SVN access:  https://gna.org/svn/?group=wesnoth&lt;br /&gt;
* Keep the commit easy to revert if need be&lt;br /&gt;
* no huge commit (hard to review), so when possible maybe split it in working part with info about where you are going&lt;br /&gt;
* be on #wesnoth-dev IRC channel and coordinate with other developers&lt;br /&gt;
* code should compile and work after commit&lt;br /&gt;
* Don't mess with the art or music without approval from one of the art and music people.&lt;br /&gt;
* clear commit message (can be several lines)&lt;br /&gt;
* mention &amp;quot;bug #1234&amp;quot; in the commit message for automatic cc to that gna bug number&lt;br /&gt;
* don't forget changelog&lt;br /&gt;
* change status of fixed bugs to &amp;quot;Fixed&amp;quot; when committed&lt;br /&gt;
* change status of fixed bugs to &amp;quot;Closed&amp;quot; when released (as stable or devel version)&lt;br /&gt;
** if the bug is svn only (something that was existing as bug in svn but in no release) you can directly close the bug after fixing it&lt;br /&gt;
* register to commit mailing list: https://mail.gna.org/listinfo/wesnoth-commits&lt;br /&gt;
** or get the list moderator to approve commit messages from you otherwise&lt;br /&gt;
* don't forget http://www.wesnoth.org/wiki/EasyCoding if you're ever out of ideas :)&lt;br /&gt;
&lt;br /&gt;
* threading model: SDL threads via src/thread.hpp&lt;br /&gt;
** synchronization model&lt;br /&gt;
*** avoid multi-threading code as much as possible&lt;br /&gt;
*** if you don't see threading code you probably don't need to learn about it&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Project#Developers]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Committers]]&lt;/div&gt;</summary>
		<author><name>TuukkaH</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=HackingWesnoth&amp;diff=16305</id>
		<title>HackingWesnoth</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=HackingWesnoth&amp;diff=16305"/>
		<updated>2007-07-04T03:15:28Z</updated>

		<summary type="html">&lt;p&gt;TuukkaH: /* See also */ add links to forum about patches and comments&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is designed to be a guide for aspiring Wesnoth programmers on what they need to do to be able to productively contribute to the Wesnoth code base.&lt;br /&gt;
&lt;br /&gt;
Wesnoth is written in C++, a large and complicated language. There are many C++ programmers, but they tend to have widely varying levels of skills and styles. This page is designed to be a guide as to the skillset needed to contribute to Wesnoth.&lt;br /&gt;
&lt;br /&gt;
== C++ Quiz ==&lt;br /&gt;
&lt;br /&gt;
Below is a short C++ quiz that assesses your skills in areas of C++ that are used alot in Wesnoth. If you know all the answers to the questions, you are probably ready to start working on the Wesnoth code base. If you know most of the answers to the questions, you can probably work on the Wesnoth code base with some oversight from the senior developers. There are good C++ guides for both knowledgeable programmers (such as [http://www.icce.rug.nl/documents/cplusplus/ The C++ Annotations]) and beginners (such as [http://www.cplusplus.com/doc/tutorial/introduction.html C++ Language Tutorial]).&lt;br /&gt;
&lt;br /&gt;
# What is a virtual destructor? Why is it needed?&lt;br /&gt;
# What does the standard class template auto_ptr do? What is its purpose?&lt;br /&gt;
# What is a vector, and why would you use it?&lt;br /&gt;
# What is a map, and why would you use it?&lt;br /&gt;
# What are the differences between a reference and a pointer? When should each be used?&lt;br /&gt;
# What is an iterator, and when is it used?&lt;br /&gt;
# What are the memory areas in a C++ program, and what is the purpose of each?&lt;br /&gt;
# What is a copy constructor, and what is an assignment operator? When must you define them in a class?&lt;br /&gt;
&lt;br /&gt;
== Wesnoth Coding Style ==&lt;br /&gt;
&lt;br /&gt;
=== Guideline 1: Don't prematurely optimize ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;When I was a new and inexperienced coder, I read the following rather famous saying: &amp;quot;Premature optimization is the root of all evil.&amp;quot; -- Donald Knuth.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While I wouldn't then -- and would be hesitant to now -- dispute the opinion of Donald Knuth on any programming topic, this absolute statement confused me. Premature optimization certainly doesn't sound like a wise thing to do, but it sounds somewhat obscure to be the root of all problems in programming. Had Knuth written this phrase after spending too long correcting problems caused by a programmer who was hell-bent on optimization at every turn?&lt;br /&gt;
&lt;br /&gt;
Now I realize that Knuth was correct. Time and time again programming problems spring from developers making their code too complicated because they are trying to optimize unnecessarily.&lt;br /&gt;
&lt;br /&gt;
By the [http://en.wikipedia.org/wiki/Pareto_principle Pareto Principle] we know that a minority of the code will occupy a majority of the running time. That is, perhaps 90% of the running time of the program will be spend executing just 5% of the code. It is thus generally unnecessary to apply many optimizations at all to most of the program. One can just write the code in a way that is the most readable and maintainable and forget about optimization altogether most of the time.&lt;br /&gt;
&lt;br /&gt;
Remember also, C++ compilers are good, and smart, and they can execute code fast. Most code will run fast enough, unless you go out of your way to make it run slowly.&lt;br /&gt;
&lt;br /&gt;
So, the first rule of Wesnoth programming is that unless you have a very good reason to think you need to optimize, do whatever is simplest and most maintainable.&lt;br /&gt;
&lt;br /&gt;
Many programmers seem to have an obsession with using the control C++ gives them to do all sorts of crazy things. Like make their own memory management routines, or write their own containers, and so forth. Simply, don't. It's possible to write good C++ code very fast using the standard components supplied as part of the language.&lt;br /&gt;
&lt;br /&gt;
This leads us to our next topic...&lt;br /&gt;
&lt;br /&gt;
=== Guideline 2: Know the Standard containers and use them ===&lt;br /&gt;
&lt;br /&gt;
One of the best things about C++ is that the standard supplies some great containers. Always prefer to use them first to store data. That is,&lt;br /&gt;
&lt;br /&gt;
* prefer to use std::vector to store dynamic arrays&lt;br /&gt;
* prefer to use std::string to store strings (we also provide t_string for a translatable string -- it's based on std::basic_string, which std::string is also based on)&lt;br /&gt;
* prefer to use std::map to store key/value pairs&lt;br /&gt;
* prefer to use std::set to store sets of items (roughly equivalent to the mathematical concept of a set).&lt;br /&gt;
&lt;br /&gt;
There are other C++ containers, and you should know about all of them. A good source of documentation on the portion of the C++ standard library known as the Standard Template Library (STL) which contains the standard containers can be found [http://www.sgi.com/tech/stl/ here].&lt;br /&gt;
&lt;br /&gt;
By using the standard containers, you should almost never have to manually allocate and delete memory yourself by hand. The containers will automatically allocate and deallocate memory for you. This leads us to our next guideline...&lt;br /&gt;
&lt;br /&gt;
=== Guideline 3: Use the resource acquisition is initialization (RAII) idiom ===&lt;br /&gt;
&lt;br /&gt;
In C, you might write some code like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void myfunction()&lt;br /&gt;
{&lt;br /&gt;
    char* mystring = (char*)malloc(n);&lt;br /&gt;
    /*some code, which manipulates mystring*/&lt;br /&gt;
    ...&lt;br /&gt;
    free(mystring);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code works, but is error prone. What if the code in the middle exited using a return statement, or a longjmp statement, or in C++, threw an exception? The memory allocated would never be cleaned up, and we would have a memory leak.&lt;br /&gt;
&lt;br /&gt;
Sure, you're a good programmer, and you probably make sure you're very careful about freeing the string. But what about when this function grows to be 100 lines long (and functions have a way of doing that), and then another programmer who isn't that familiar with the function is trying to fix a critical bug as quickly as they can, that requires adding an early return statement to this function? What about when someone is trying to read the code to scan for memory leaks? Once they see the malloc at the top, they will have to carefully read the entire function, to make sure it's all okay.&lt;br /&gt;
&lt;br /&gt;
Now if we had this C++ version instead,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void myfunction()&lt;br /&gt;
{&lt;br /&gt;
    std::string mystring(n,'x');&lt;br /&gt;
    /*some code, which manipulates mystring*/&lt;br /&gt;
} //mystring is destroyed and memory automatically released&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None of these problems can possibly happen. mystring will ''always'' be released at the end of the function.&lt;br /&gt;
&lt;br /&gt;
So, this just re-iterates how important C++ containers are, right? Well, yes, but it also shows us that we should always avoid code written like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void myfunction()&lt;br /&gt;
{&lt;br /&gt;
    ...allocate resources...&lt;br /&gt;
    ...use resources&lt;br /&gt;
    ...release resources...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have code like this, you should put the resources in a class that will manage them and release them at the end of the function. If there is no class like that, then you should write one. This goes for all resources: memory, files, threads, and so forth.&lt;br /&gt;
&lt;br /&gt;
It might sound like a silly mistake that we're protecting against here, one that an experienced programmer wouldn't make. However, almost all programming bugs are due to 'silly mistakes'. This leads us to our next item...&lt;br /&gt;
&lt;br /&gt;
=== Guideline 4: Lean on the compiler as heavily as you can ===&lt;br /&gt;
&lt;br /&gt;
Humans make mistakes. Even very stupid mistakes. Computers are as dumb as toast, but they are at least very very consistent.&lt;br /&gt;
&lt;br /&gt;
For Wesnoth, we try to write code that will make the compiler guard against mistakes as much as possible. The use of RAII as described above is one example of this: writing the code so the compiler and language rules will guarantee it's correct.&lt;br /&gt;
&lt;br /&gt;
There are some more ways to do this. One big way is to make all code const correct. That is, always define something as 'const' when it shouldn't change its value. If you have a pointer that is meant to be read only, define it as a const pointer. Then if the code is later changed so that your pointer changes the value, the compiler will produce an error.&lt;br /&gt;
&lt;br /&gt;
Another way is to avoid implicit conversions between objects, and always use the C++-style casts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[CodingStandards]]&lt;br /&gt;
* [http://www.wesnoth.org/forum/viewtopic.php?t=9979 Patch guidelines]&lt;br /&gt;
* [http://www.wesnoth.org/forum/viewtopic.php?t=13878 Lack of code documentation]&lt;/div&gt;</summary>
		<author><name>TuukkaH</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=DeveloperGuide&amp;diff=16304</id>
		<title>DeveloperGuide</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=DeveloperGuide&amp;diff=16304"/>
		<updated>2007-07-04T02:49:58Z</updated>

		<summary type="html">&lt;p&gt;TuukkaH: allacrost link didn't belong here&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* setting up developer SVN access:  https://gna.org/svn/?group=wesnoth&lt;br /&gt;
* Keep the commit easy to revert if need be&lt;br /&gt;
* no huge commit (hard to review), so when possible maybe split it in working part with info about where you are going&lt;br /&gt;
* be on #wesnoth-dev IRC channel and coordinate with other developers&lt;br /&gt;
* code should compile and work after commit&lt;br /&gt;
* Don't mess with the art or music without approval from one of the art and music people.&lt;br /&gt;
* clear commit message (can be several lines)&lt;br /&gt;
* mention &amp;quot;bug #1234&amp;quot; in the commit message for automatic cc to that gna bug number&lt;br /&gt;
* don't forget changelog&lt;br /&gt;
* change status of fixed bugs to &amp;quot;Fixed&amp;quot; when committed&lt;br /&gt;
* change status of fixed bugs to &amp;quot;Closed&amp;quot; when released (as stable or devel version)&lt;br /&gt;
** if the bug is svn only (something that was existing as bug in svn but in no release) you can directly close the bug after fixing it&lt;br /&gt;
* register to commit mailing list: https://mail.gna.org/listinfo/wesnoth-commits&lt;br /&gt;
** or get the list moderator to approve commit messages from you otherwise&lt;br /&gt;
* don't forget http://www.wesnoth.org/wiki/EasyCoding if you're ever out of ideas :)&lt;br /&gt;
&lt;br /&gt;
* threading model: SDL threads via src/thread.hpp&lt;br /&gt;
** synchronization model&lt;br /&gt;
*** avoid multi-threading code as much as possible&lt;br /&gt;
*** if you don't see threading code you probably don't need to learn about it&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Project#Developers]]&lt;/div&gt;</summary>
		<author><name>TuukkaH</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=StartingPoints&amp;diff=16303</id>
		<title>StartingPoints</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=StartingPoints&amp;diff=16303"/>
		<updated>2007-07-04T02:48:04Z</updated>

		<summary type="html">&lt;p&gt;TuukkaH: /* Developer information */ link new DeveloperGuide&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
What would you like to learn about Wesnoth in this wiki? [[Play]] it, [[create]] with it, [[support]] for it, [[project]] resources about it, [[credits]] of it.&lt;br /&gt;
&lt;br /&gt;
This is a page with starting points to exploring this wiki about The Battle for Wesnoth. In addition to the wiki, there's also a [http://www.wesnoth.org homepage], a [http://www.wesnoth.org/forum forum],  and a [http://gna.org/projects/wesnoth/ Gna project page].&lt;br /&gt;
&lt;br /&gt;
* [[Special:Categories|List of all page categories in this wiki]]&lt;br /&gt;
* [[Special:Allpages|List of all pages in this wiki]]&lt;br /&gt;
&lt;br /&gt;
== Getting the Game ==&lt;br /&gt;
==== Downloading ====&lt;br /&gt;
* [[Download]] - get the most recent source-files and many binaries&lt;br /&gt;
** [[WesnothBinaries]] - precompiled for GNU/Linux, BeOS, PDAs, ...&lt;br /&gt;
** [[WesnothBinariesLinux]] - precompiled for many GNU/Linux distributions&lt;br /&gt;
&lt;br /&gt;
==== Compiling ====&lt;br /&gt;
* [[CompilingWesnoth]] - on Unix, Mac, Windows, GNU/Linux, PDAs, ...&lt;br /&gt;
* [[DebuggingWesnoth]] - on GNU/Linux and Unix-like systems&lt;br /&gt;
* [[WesnothOnLinuxPDAs]] - on the Qtopia/OPIE and thepdaXrom/Zaurus C series&lt;br /&gt;
&lt;br /&gt;
== Playing the Game ([[Play]]) ==&lt;br /&gt;
&lt;br /&gt;
==== For New Players ====&lt;br /&gt;
* [[GettingStarted]] - read me first!&lt;br /&gt;
* [[WesnothManual]] - the rules&lt;br /&gt;
* [[MainlineScenarios]] - walkthroughs for the game-supplied campaigns&lt;br /&gt;
&lt;br /&gt;
==== For Not-So-New Players ====&lt;br /&gt;
* [[AdvancedTactics]] - beating the AI and other people&lt;br /&gt;
* [[MultiplayerServers]] - where to play against other people online&lt;br /&gt;
&lt;br /&gt;
==== Reference ====&lt;br /&gt;
* [[HotKeysSystem]] - keyboard shortcuts&lt;br /&gt;
* [[CommandMode]] - commands you can use in-game&lt;br /&gt;
* [[ServerAdministration]] - commands that authenticated users can use to administer the server&lt;br /&gt;
* [http://zapicm.freeshell.org Units] - Units advancement trees and stats&lt;br /&gt;
** [http://zapicm.freeshell.org/dev Development version]&lt;br /&gt;
** [http://zapicm.freeshell.org/stable Stable version]&lt;br /&gt;
** [http://zapicm.freeshell.org/trunk Trunk version]&lt;br /&gt;
* [[RaceDescriptions]] - Elves, Humans, Dwarves, Orcs, Drakes, Undead, Others&lt;br /&gt;
** [[Complete_Faction_List_%28unfinished%29]] - list all user made factions&lt;br /&gt;
* [[WesnothAcronyms|Wesnoth Acronyms (by category)]] - common wesnothian acronyms explained&lt;br /&gt;
* [[WesnothAcronyms(alphabetic)|Wesnoth Acronyms (alphabetic)]] - common wesnothian acronyms explained&lt;br /&gt;
&lt;br /&gt;
== Tweaking the Game ([[Create]]) ==&lt;br /&gt;
==== Scenarios &amp;amp; Campaigns ====&lt;br /&gt;
* [[UserScenarios]] - user-written scenarios, campaigns and game modifications&lt;br /&gt;
* [[BuildingCampaigns]] - how to make your own single player campaigns&lt;br /&gt;
* [[MultiplayerCampaigns]] - how to make your own multiplayer campaigns&lt;br /&gt;
* [[BuildingScenarios]] - how to make your own scenarios&lt;br /&gt;
* [[BuildingUnits]] - how to make your own units&lt;br /&gt;
* [[UnitAnalysis]] - tool to analyze units&lt;br /&gt;
==== References ====&lt;br /&gt;
* [[ReferenceWML]] and [[AlphabeticalWML]] - all about Wesnoth Markup Language&lt;br /&gt;
* [[ReferencePythonAPI]] - upcoming Python interface for AI&lt;br /&gt;
==== Tools &amp;amp; Utilities ====&lt;br /&gt;
* [[ExternalUtilities]] - scripts to help create scenarios, campaigns, and graphics&lt;br /&gt;
* [[WesnothMapEditor]] - summary of controls&lt;br /&gt;
==== Art related ====&lt;br /&gt;
* [[Create_Art#Art_Tutorials|Art Tutorials]] - help in creating art&lt;br /&gt;
* [[GraphicLibrary]] - unit and terrain images posted on the forums&lt;br /&gt;
* [[Tiles_Status]] - terrain tiles: proposed and in progress.&lt;br /&gt;
&lt;br /&gt;
== Improving the Game ==&lt;br /&gt;
* [[ReportingBugs]] - use Gna&lt;br /&gt;
* To submit a feature request, use http://bugs.wesnoth.org&lt;br /&gt;
* [[FrequentlyProposedIdeas]] - before you propose an idea, check here!&lt;br /&gt;
==== Developer information ====&lt;br /&gt;
* [[DeveloperResources]] - useful links&lt;br /&gt;
* [http://changelog.wesnoth.org Changelog] - the most recent changes made to the game&lt;br /&gt;
* [[WesnothSVN]] - accessing the source code&lt;br /&gt;
* [[HackingWesnoth]] - guide for programmers&lt;br /&gt;
* [[CodingStandards]] - for programmers&lt;br /&gt;
* [[DeveloperGuide]] - for those who received SVN commit rights&lt;br /&gt;
* [[UnitDescriptionRewriting]] - coordinating the revision&lt;br /&gt;
* [http://wesnoth.slack.it/missing.cgi Missing unit animations and sounds] - what's available and what's missing&lt;br /&gt;
* [[WritingYourOwnAI]] - write a C++ plugin&lt;br /&gt;
* [[ThemeSystem]] - customizing the screen layout for the game and the editor&lt;br /&gt;
* [[ReleasingWesnoth]] - steps to follow to release a new version&lt;br /&gt;
* [[WesnothPackagersGuide]] - guidelines for packaging Wesnoth for different platforms&lt;br /&gt;
* [[WesnothPreferences]]&lt;br /&gt;
* [[EasyCoding]] - Bugs and features that are easy to implement for new coders&lt;br /&gt;
* [[NotSoEasyCoding]] - Bugs and features which are doable but lacking someone working on them&lt;br /&gt;
* [[WesnothGL]] - Guide to programming the Wesnoth OpenGL branch&lt;br /&gt;
&lt;br /&gt;
==== Game translations ====&lt;br /&gt;
* [[GettextForTranslators]] - how to translate Wesnoth under [[GetText]]&lt;br /&gt;
* [[WesnothTranslations]] - completely unknown stats...&lt;br /&gt;
* [[WesCamp]] - a project for translating user-made campaigns&lt;br /&gt;
&lt;br /&gt;
== About the Game ==&lt;br /&gt;
* [[WesnothPhilosophy]] - Dave on Wesnoth&lt;br /&gt;
* [[WesnothHistory]] - the Ages of Wesnoth&lt;br /&gt;
* [[WesnothGeography]] - description of Wesnoth and surrounding lands&lt;br /&gt;
* [[WesnothFigures]] - notable figures of valorous and infamous deeds in Wesnoth&lt;br /&gt;
* [[WesnothReviews]] - third party reviews of Wesnoth&lt;br /&gt;
* [irc://irc.wesnoth.org/wesnoth #wesnoth] - our IRC channel&lt;br /&gt;
* [[Donate]] or [http://cafepress.com/wesnoth buy Wesnoth merchandise].&lt;br /&gt;
* [[Trailer]] - the Wesnoth trailer&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
* [[UsefulLinks]]&lt;br /&gt;
* [[WesnothLSM]] - presentation at LSM&lt;br /&gt;
* [http://wesnoth.slack.it/?WesnothPlayerMap Map of Wesnoth player locations] - add yourself to the map!&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Battle_for_Wesnoth Wikipedia entry for Wesnoth]&lt;br /&gt;
* [[WikiHaiku]]&lt;br /&gt;
&lt;br /&gt;
== About this Wiki ==&lt;br /&gt;
* [[Help:Editing|Editing]] - learn how to edit pages&lt;br /&gt;
* [[Sandbox]] - experiment with the wiki&lt;br /&gt;
* [[WikiMigration]] - we were looking for a replacement for our old wiki (and ended up using Mediawiki)&lt;/div&gt;</summary>
		<author><name>TuukkaH</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=DeveloperGuide&amp;diff=16302</id>
		<title>DeveloperGuide</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=DeveloperGuide&amp;diff=16302"/>
		<updated>2007-07-04T02:43:35Z</updated>

		<summary type="html">&lt;p&gt;TuukkaH: fix syntax&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* setting up developer SVN access:  https://gna.org/svn/?group=wesnoth&lt;br /&gt;
* Keep the commit easy to revert if need be&lt;br /&gt;
* no huge commit (hard to review), so when possible maybe split it in working part with info about where you are going&lt;br /&gt;
* be on #wesnoth-dev IRC channel and coordinate with other developers&lt;br /&gt;
* code should compile and work after commit&lt;br /&gt;
* Don't mess with the art or music without approval from one of the art and music people.&lt;br /&gt;
* clear commit message (can be several lines)&lt;br /&gt;
* mention &amp;quot;bug #1234&amp;quot; in the commit message for automatic cc to that gna bug number&lt;br /&gt;
* don't forget changelog&lt;br /&gt;
* change status of fixed bugs to &amp;quot;Fixed&amp;quot; when committed&lt;br /&gt;
* change status of fixed bugs to &amp;quot;Closed&amp;quot; when released (as stable or devel version)&lt;br /&gt;
** if the bug is svn only (something that was existing as bug in svn but in no release) you can directly close the bug after fixing it&lt;br /&gt;
* register to commit mailing list: https://mail.gna.org/listinfo/wesnoth-commits&lt;br /&gt;
** or get the list moderator to approve commit messages from you otherwise&lt;br /&gt;
http://www.allacrost.org&lt;br /&gt;
* don't forget http://www.wesnoth.org/wiki/EasyCoding if you're ever out of ideas :)&lt;br /&gt;
&lt;br /&gt;
* threading model: SDL threads via src/thread.hpp&lt;br /&gt;
** synchronization model&lt;br /&gt;
*** avoid multi-threading code as much as possible&lt;br /&gt;
*** if you don't see threading code you probably don't need to learn about it&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Project#Developers]]&lt;/div&gt;</summary>
		<author><name>TuukkaH</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=DeveloperGuide&amp;diff=16301</id>
		<title>DeveloperGuide</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=DeveloperGuide&amp;diff=16301"/>
		<updated>2007-07-04T02:42:07Z</updated>

		<summary type="html">&lt;p&gt;TuukkaH: gathered hints from irc discussions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
* setting up developer SVN access:  https://gna.org/svn/?group=wesnoth&lt;br /&gt;
* Keep the commit easy to revert if need be&lt;br /&gt;
* no huge commit (hard to review), so when possible maybe split it in working part with info about where you are going&lt;br /&gt;
* be on #wesnoth-dev IRC channel and coordinate with other developers&lt;br /&gt;
* code should compile and work after commit&lt;br /&gt;
* Don't mess with the art or music without approval from one of the art and music people.&lt;br /&gt;
* clear commit message (can be several lines)&lt;br /&gt;
* mention &amp;quot;bug #1234&amp;quot; in the commit message for automatic cc to that gna bug number&lt;br /&gt;
* don't forget changelog&lt;br /&gt;
* change status of fixed bugs to &amp;quot;Fixed&amp;quot; when committed&lt;br /&gt;
* change status of fixed bugs to &amp;quot;Closed&amp;quot; when released (as stable or devel version)&lt;br /&gt;
  * if the bug is svn only (something that was existing as bug in svn but in no release) you can directly close the bug after fixing it&lt;br /&gt;
* register to commit mailing list: https://mail.gna.org/listinfo/wesnoth-commits&lt;br /&gt;
  * or get the list moderator to approve commit messages from you otherwise&lt;br /&gt;
http://www.allacrost.org&lt;br /&gt;
* don't forget http://www.wesnoth.org/wiki/EasyCoding if you're ever out of ideas :)&lt;br /&gt;
&lt;br /&gt;
* threading model: SDL threads via src/thread.hpp&lt;br /&gt;
  * synchronization model&lt;br /&gt;
    * avoid multi-threading code as much as possible&lt;br /&gt;
    * if you don't see threading code you probably don't need to learn about it&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Project#Developers]]&lt;/div&gt;</summary>
		<author><name>TuukkaH</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Project&amp;diff=16300</id>
		<title>Project</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Project&amp;diff=16300"/>
		<updated>2007-07-04T02:40:37Z</updated>

		<summary type="html">&lt;p&gt;TuukkaH: /* Developers */ link new DeveloperGuide&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Battle for Wesnoth is a [http://gna.org/projects/wesnoth/ Gna! project]. See also the [http://freshmeat.net/projects/wesnoth/ project] and [http://freshmeat.net/project-stats/view/38720/ stats] at [http://www.freshmeat.net/ freshmeat].&lt;br /&gt;
&lt;br /&gt;
There are also Wesnoth pages in other languages:&lt;br /&gt;
French ([http://tournoiswesnoth.frbb.net/ 1], [http://wesnothfr.ww7.be/ 2]),&lt;br /&gt;
[http://wesnoth.fw.hu/ Hungarian],&lt;br /&gt;
[http://wikiwiki.jp/wesnoth/ Japanese],&lt;br /&gt;
[http://www.wesnoth.pl/ Polish],&lt;br /&gt;
[http://perso.wanadoo.es/wesnoth/ Spanish].&lt;br /&gt;
&lt;br /&gt;
== Artists ==&lt;br /&gt;
Graphic artists and musicians usually meet on the [http://www.wesnoth.org/forum/ forum].&lt;br /&gt;
* [http://www.wesnoth.org/forum/viewforum.php?f=9 Artwork development forum]&lt;br /&gt;
* [http://www.wesnoth.org/forum/viewforum.php?f=14 Music development forum]&lt;br /&gt;
&lt;br /&gt;
== Developers ==&lt;br /&gt;
Coders can help fixing [http://bugs.wesnoth.org bugs], adding new features...&lt;br /&gt;
* [[CodingStandards]]&lt;br /&gt;
* [[Roadmap]]&lt;br /&gt;
* [http://devdocs.wesnoth.org/ Documentation] - generated and uploaded two times every day (05:05 and 17:05 GMT+2).&lt;br /&gt;
* [[WesnothSVN]]&lt;br /&gt;
* [[DeveloperGuide]]&lt;br /&gt;
&lt;br /&gt;
== Translators ==&lt;br /&gt;
* [[WesnothTranslations]]&lt;br /&gt;
* [http://gettext.wesnoth.org Statistics]&lt;br /&gt;
* [[WesCamp|Translating User made Campaigns (featuring wescamp-i18n)]]&lt;br /&gt;
&lt;br /&gt;
{{Home}}&lt;/div&gt;</summary>
		<author><name>TuukkaH</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=StartingPoints&amp;diff=16299</id>
		<title>StartingPoints</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=StartingPoints&amp;diff=16299"/>
		<updated>2007-07-04T01:57:32Z</updated>

		<summary type="html">&lt;p&gt;TuukkaH: rewrite the intro now that this is StartingPoints&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
What would you like to learn about Wesnoth in this wiki? [[Play]] it, [[create]] with it, [[support]] for it, [[project]] resources about it, [[credits]] of it.&lt;br /&gt;
&lt;br /&gt;
This is a page with starting points to exploring this wiki about The Battle for Wesnoth. In addition to the wiki, there's also a [http://www.wesnoth.org homepage], a [http://www.wesnoth.org/forum forum],  and a [http://gna.org/projects/wesnoth/ Gna project page].&lt;br /&gt;
&lt;br /&gt;
* [[Special:Categories|List of all page categories in this wiki]]&lt;br /&gt;
* [[Special:Allpages|List of all pages in this wiki]]&lt;br /&gt;
&lt;br /&gt;
== Getting the Game ==&lt;br /&gt;
==== Downloading ====&lt;br /&gt;
* [[Download]] - get the most recent source-files and many binaries&lt;br /&gt;
** [[WesnothBinaries]] - precompiled for GNU/Linux, BeOS, PDAs, ...&lt;br /&gt;
** [[WesnothBinariesLinux]] - precompiled for many GNU/Linux distributions&lt;br /&gt;
&lt;br /&gt;
==== Compiling ====&lt;br /&gt;
* [[CompilingWesnoth]] - on Unix, Mac, Windows, GNU/Linux, PDAs, ...&lt;br /&gt;
* [[DebuggingWesnoth]] - on GNU/Linux and Unix-like systems&lt;br /&gt;
* [[WesnothOnLinuxPDAs]] - on the Qtopia/OPIE and thepdaXrom/Zaurus C series&lt;br /&gt;
&lt;br /&gt;
== Playing the Game ([[Play]]) ==&lt;br /&gt;
&lt;br /&gt;
==== For New Players ====&lt;br /&gt;
* [[GettingStarted]] - read me first!&lt;br /&gt;
* [[WesnothManual]] - the rules&lt;br /&gt;
* [[MainlineScenarios]] - walkthroughs for the game-supplied campaigns&lt;br /&gt;
&lt;br /&gt;
==== For Not-So-New Players ====&lt;br /&gt;
* [[AdvancedTactics]] - beating the AI and other people&lt;br /&gt;
* [[MultiplayerServers]] - where to play against other people online&lt;br /&gt;
&lt;br /&gt;
==== Reference ====&lt;br /&gt;
* [[HotKeysSystem]] - keyboard shortcuts&lt;br /&gt;
* [[CommandMode]] - commands you can use in-game&lt;br /&gt;
* [[ServerAdministration]] - commands that authenticated users can use to administer the server&lt;br /&gt;
* [http://zapicm.freeshell.org Units] - Units advancement trees and stats&lt;br /&gt;
** [http://zapicm.freeshell.org/dev Development version]&lt;br /&gt;
** [http://zapicm.freeshell.org/stable Stable version]&lt;br /&gt;
** [http://zapicm.freeshell.org/trunk Trunk version]&lt;br /&gt;
* [[RaceDescriptions]] - Elves, Humans, Dwarves, Orcs, Drakes, Undead, Others&lt;br /&gt;
** [[Complete_Faction_List_%28unfinished%29]] - list all user made factions&lt;br /&gt;
* [[WesnothAcronyms|Wesnoth Acronyms (by category)]] - common wesnothian acronyms explained&lt;br /&gt;
* [[WesnothAcronyms(alphabetic)|Wesnoth Acronyms (alphabetic)]] - common wesnothian acronyms explained&lt;br /&gt;
&lt;br /&gt;
== Tweaking the Game ([[Create]]) ==&lt;br /&gt;
==== Scenarios &amp;amp; Campaigns ====&lt;br /&gt;
* [[UserScenarios]] - user-written scenarios, campaigns and game modifications&lt;br /&gt;
* [[BuildingCampaigns]] - how to make your own single player campaigns&lt;br /&gt;
* [[MultiplayerCampaigns]] - how to make your own multiplayer campaigns&lt;br /&gt;
* [[BuildingScenarios]] - how to make your own scenarios&lt;br /&gt;
* [[BuildingUnits]] - how to make your own units&lt;br /&gt;
* [[UnitAnalysis]] - tool to analyze units&lt;br /&gt;
==== References ====&lt;br /&gt;
* [[ReferenceWML]] and [[AlphabeticalWML]] - all about Wesnoth Markup Language&lt;br /&gt;
* [[ReferencePythonAPI]] - upcoming Python interface for AI&lt;br /&gt;
==== Tools &amp;amp; Utilities ====&lt;br /&gt;
* [[ExternalUtilities]] - scripts to help create scenarios, campaigns, and graphics&lt;br /&gt;
* [[WesnothMapEditor]] - summary of controls&lt;br /&gt;
==== Art related ====&lt;br /&gt;
* [[Create_Art#Art_Tutorials|Art Tutorials]] - help in creating art&lt;br /&gt;
* [[GraphicLibrary]] - unit and terrain images posted on the forums&lt;br /&gt;
* [[Tiles_Status]] - terrain tiles: proposed and in progress.&lt;br /&gt;
&lt;br /&gt;
== Improving the Game ==&lt;br /&gt;
* [[ReportingBugs]] - use Gna&lt;br /&gt;
* To submit a feature request, use http://bugs.wesnoth.org&lt;br /&gt;
* [[FrequentlyProposedIdeas]] - before you propose an idea, check here!&lt;br /&gt;
==== Developer information ====&lt;br /&gt;
* [[DeveloperResources]] - useful links&lt;br /&gt;
* [http://changelog.wesnoth.org Changelog] - the most recent changes made to the game&lt;br /&gt;
* [[WesnothSVN]] - accessing the source code&lt;br /&gt;
* [[HackingWesnoth]] - guide for programmers&lt;br /&gt;
* [[CodingStandards]] - for programmers&lt;br /&gt;
* [[UnitDescriptionRewriting]] - coordinating the revision&lt;br /&gt;
* [http://wesnoth.slack.it/missing.cgi Missing unit animations and sounds] - what's available and what's missing&lt;br /&gt;
* [[WritingYourOwnAI]] - write a C++ plugin&lt;br /&gt;
* [[ThemeSystem]] - customizing the screen layout for the game and the editor&lt;br /&gt;
* [[ReleasingWesnoth]] - steps to follow to release a new version&lt;br /&gt;
* [[WesnothPackagersGuide]] - guidelines for packaging Wesnoth for different platforms&lt;br /&gt;
* [[WesnothPreferences]]&lt;br /&gt;
* [[EasyCoding]] - Bugs and features that are easy to implement for new coders&lt;br /&gt;
* [[NotSoEasyCoding]] - Bugs and features which are doable but lacking someone working on them&lt;br /&gt;
* [[WesnothGL]] - Guide to programming the Wesnoth OpenGL branch&lt;br /&gt;
&lt;br /&gt;
==== Game translations ====&lt;br /&gt;
* [[GettextForTranslators]] - how to translate Wesnoth under [[GetText]]&lt;br /&gt;
* [[WesnothTranslations]] - completely unknown stats...&lt;br /&gt;
* [[WesCamp]] - a project for translating user-made campaigns&lt;br /&gt;
&lt;br /&gt;
== About the Game ==&lt;br /&gt;
* [[WesnothPhilosophy]] - Dave on Wesnoth&lt;br /&gt;
* [[WesnothHistory]] - the Ages of Wesnoth&lt;br /&gt;
* [[WesnothGeography]] - description of Wesnoth and surrounding lands&lt;br /&gt;
* [[WesnothFigures]] - notable figures of valorous and infamous deeds in Wesnoth&lt;br /&gt;
* [[WesnothReviews]] - third party reviews of Wesnoth&lt;br /&gt;
* [irc://irc.wesnoth.org/wesnoth #wesnoth] - our IRC channel&lt;br /&gt;
* [[Donate]] or [http://cafepress.com/wesnoth buy Wesnoth merchandise].&lt;br /&gt;
* [[Trailer]] - the Wesnoth trailer&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
* [[UsefulLinks]]&lt;br /&gt;
* [[WesnothLSM]] - presentation at LSM&lt;br /&gt;
* [http://wesnoth.slack.it/?WesnothPlayerMap Map of Wesnoth player locations] - add yourself to the map!&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Battle_for_Wesnoth Wikipedia entry for Wesnoth]&lt;br /&gt;
* [[WikiHaiku]]&lt;br /&gt;
&lt;br /&gt;
== About this Wiki ==&lt;br /&gt;
* [[Help:Editing|Editing]] - learn how to edit pages&lt;br /&gt;
* [[Sandbox]] - experiment with the wiki&lt;br /&gt;
* [[WikiMigration]] - we were looking for a replacement for our old wiki (and ended up using Mediawiki)&lt;/div&gt;</summary>
		<author><name>TuukkaH</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=StartingPoints&amp;diff=16298</id>
		<title>StartingPoints</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=StartingPoints&amp;diff=16298"/>
		<updated>2007-07-04T01:40:55Z</updated>

		<summary type="html">&lt;p&gt;TuukkaH: link Special:Categories and Special:Allpages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Battle for Wesnoth is a turn-based fantasy strategy game.&lt;br /&gt;
&lt;br /&gt;
Defeat all enemy leaders using a well-chosen cadre of troops,&lt;br /&gt;
taking care to manage your resources of gold and villages.&lt;br /&gt;
All units have their own strengths and weaknesses; to win,&lt;br /&gt;
deploy your forces to their best advantage while&lt;br /&gt;
denying your foes the chance to do the same. As units gain&lt;br /&gt;
experience, they acquire new abilities and become more&lt;br /&gt;
powerful. Play in your own language and test your skill&lt;br /&gt;
against a smart computer opponent, or join Wesnoth's large&lt;br /&gt;
community of on-line players.&lt;br /&gt;
Create your own custom units, scenarios or campaigns,&lt;br /&gt;
and share them with others.&lt;br /&gt;
&lt;br /&gt;
Battle for Wesnoth is released under the&lt;br /&gt;
[http://www.gnu.org/licenses/licenses.html#GPL GPL].&lt;br /&gt;
Prebuilt packages are available for most operating systems,&lt;br /&gt;
including Windows, Mac OS X, and GNU/Linux, or you can build&lt;br /&gt;
your own from source code.&lt;br /&gt;
&lt;br /&gt;
* [[Special:Categories|List of all page categories in this wiki]]&lt;br /&gt;
* [[Special:Allpages|List of all pages in this wiki]]&lt;br /&gt;
&lt;br /&gt;
== Getting the Game ==&lt;br /&gt;
==== Downloading ====&lt;br /&gt;
* [[Download]] - get the most recent source-files and many binaries&lt;br /&gt;
** [[WesnothBinaries]] - precompiled for GNU/Linux, BeOS, PDAs, ...&lt;br /&gt;
** [[WesnothBinariesLinux]] - precompiled for many GNU/Linux distributions&lt;br /&gt;
&lt;br /&gt;
==== Compiling ====&lt;br /&gt;
* [[CompilingWesnoth]] - on Unix, Mac, Windows, GNU/Linux, PDAs, ...&lt;br /&gt;
* [[DebuggingWesnoth]] - on GNU/Linux and Unix-like systems&lt;br /&gt;
* [[WesnothOnLinuxPDAs]] - on the Qtopia/OPIE and thepdaXrom/Zaurus C series&lt;br /&gt;
&lt;br /&gt;
== Playing the Game ([[Play]]) ==&lt;br /&gt;
&lt;br /&gt;
==== For New Players ====&lt;br /&gt;
* [[GettingStarted]] - read me first!&lt;br /&gt;
* [[WesnothManual]] - the rules&lt;br /&gt;
* [[MainlineScenarios]] - walkthroughs for the game-supplied campaigns&lt;br /&gt;
&lt;br /&gt;
==== For Not-So-New Players ====&lt;br /&gt;
* [[AdvancedTactics]] - beating the AI and other people&lt;br /&gt;
* [[MultiplayerServers]] - where to play against other people online&lt;br /&gt;
&lt;br /&gt;
==== Reference ====&lt;br /&gt;
* [[HotKeysSystem]] - keyboard shortcuts&lt;br /&gt;
* [[CommandMode]] - commands you can use in-game&lt;br /&gt;
* [[ServerAdministration]] - commands that authenticated users can use to administer the server&lt;br /&gt;
* [http://zapicm.freeshell.org Units] - Units advancement trees and stats&lt;br /&gt;
** [http://zapicm.freeshell.org/dev Development version]&lt;br /&gt;
** [http://zapicm.freeshell.org/stable Stable version]&lt;br /&gt;
** [http://zapicm.freeshell.org/trunk Trunk version]&lt;br /&gt;
* [[RaceDescriptions]] - Elves, Humans, Dwarves, Orcs, Drakes, Undead, Others&lt;br /&gt;
** [[Complete_Faction_List_%28unfinished%29]] - list all user made factions&lt;br /&gt;
* [[WesnothAcronyms|Wesnoth Acronyms (by category)]] - common wesnothian acronyms explained&lt;br /&gt;
* [[WesnothAcronyms(alphabetic)|Wesnoth Acronyms (alphabetic)]] - common wesnothian acronyms explained&lt;br /&gt;
&lt;br /&gt;
== Tweaking the Game ([[Create]]) ==&lt;br /&gt;
==== Scenarios &amp;amp; Campaigns ====&lt;br /&gt;
* [[UserScenarios]] - user-written scenarios, campaigns and game modifications&lt;br /&gt;
* [[BuildingCampaigns]] - how to make your own single player campaigns&lt;br /&gt;
* [[MultiplayerCampaigns]] - how to make your own multiplayer campaigns&lt;br /&gt;
* [[BuildingScenarios]] - how to make your own scenarios&lt;br /&gt;
* [[BuildingUnits]] - how to make your own units&lt;br /&gt;
* [[UnitAnalysis]] - tool to analyze units&lt;br /&gt;
==== References ====&lt;br /&gt;
* [[ReferenceWML]] and [[AlphabeticalWML]] - all about Wesnoth Markup Language&lt;br /&gt;
* [[ReferencePythonAPI]] - upcoming Python interface for AI&lt;br /&gt;
==== Tools &amp;amp; Utilities ====&lt;br /&gt;
* [[ExternalUtilities]] - scripts to help create scenarios, campaigns, and graphics&lt;br /&gt;
* [[WesnothMapEditor]] - summary of controls&lt;br /&gt;
==== Art related ====&lt;br /&gt;
* [[Create_Art#Art_Tutorials|Art Tutorials]] - help in creating art&lt;br /&gt;
* [[GraphicLibrary]] - unit and terrain images posted on the forums&lt;br /&gt;
* [[Tiles_Status]] - terrain tiles: proposed and in progress.&lt;br /&gt;
&lt;br /&gt;
== Improving the Game ==&lt;br /&gt;
* [[ReportingBugs]] - use Gna&lt;br /&gt;
* To submit a feature request, use http://bugs.wesnoth.org&lt;br /&gt;
* [[FrequentlyProposedIdeas]] - before you propose an idea, check here!&lt;br /&gt;
==== Developer information ====&lt;br /&gt;
* [[DeveloperResources]] - useful links&lt;br /&gt;
* [http://changelog.wesnoth.org Changelog] - the most recent changes made to the game&lt;br /&gt;
* [[WesnothSVN]] - accessing the source code&lt;br /&gt;
* [[HackingWesnoth]] - guide for programmers&lt;br /&gt;
* [[CodingStandards]] - for programmers&lt;br /&gt;
* [[UnitDescriptionRewriting]] - coordinating the revision&lt;br /&gt;
* [http://wesnoth.slack.it/missing.cgi Missing unit animations and sounds] - what's available and what's missing&lt;br /&gt;
* [[WritingYourOwnAI]] - write a C++ plugin&lt;br /&gt;
* [[ThemeSystem]] - customizing the screen layout for the game and the editor&lt;br /&gt;
* [[ReleasingWesnoth]] - steps to follow to release a new version&lt;br /&gt;
* [[WesnothPackagersGuide]] - guidelines for packaging Wesnoth for different platforms&lt;br /&gt;
* [[WesnothPreferences]]&lt;br /&gt;
* [[EasyCoding]] - Bugs and features that are easy to implement for new coders&lt;br /&gt;
* [[NotSoEasyCoding]] - Bugs and features which are doable but lacking someone working on them&lt;br /&gt;
* [[WesnothGL]] - Guide to programming the Wesnoth OpenGL branch&lt;br /&gt;
&lt;br /&gt;
==== Game translations ====&lt;br /&gt;
* [[GettextForTranslators]] - how to translate Wesnoth under [[GetText]]&lt;br /&gt;
* [[WesnothTranslations]] - completely unknown stats...&lt;br /&gt;
* [[WesCamp]] - a project for translating user-made campaigns&lt;br /&gt;
&lt;br /&gt;
== About the Game ==&lt;br /&gt;
* [[WesnothPhilosophy]] - Dave on Wesnoth&lt;br /&gt;
* [[WesnothHistory]] - the Ages of Wesnoth&lt;br /&gt;
* [[WesnothGeography]] - description of Wesnoth and surrounding lands&lt;br /&gt;
* [[WesnothFigures]] - notable figures of valorous and infamous deeds in Wesnoth&lt;br /&gt;
* [[WesnothReviews]] - third party reviews of Wesnoth&lt;br /&gt;
* [irc://irc.wesnoth.org/wesnoth #wesnoth] - our IRC channel&lt;br /&gt;
* [[Donate]] or [http://cafepress.com/wesnoth buy Wesnoth merchandise].&lt;br /&gt;
* [[Trailer]] - the Wesnoth trailer&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
* [[UsefulLinks]]&lt;br /&gt;
* [[WesnothLSM]] - presentation at LSM&lt;br /&gt;
* [http://wesnoth.slack.it/?WesnothPlayerMap Map of Wesnoth player locations] - add yourself to the map!&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Battle_for_Wesnoth Wikipedia entry for Wesnoth]&lt;br /&gt;
* [[WikiHaiku]]&lt;br /&gt;
&lt;br /&gt;
== About this Wiki ==&lt;br /&gt;
* [[Help:Editing|Editing]] - learn how to edit pages&lt;br /&gt;
* [[Sandbox]] - experiment with the wiki&lt;br /&gt;
* [[WikiMigration]] - we were looking for a replacement for our old wiki (and ended up using Mediawiki)&lt;/div&gt;</summary>
		<author><name>TuukkaH</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=CodingStandards&amp;diff=16297</id>
		<title>CodingStandards</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=CodingStandards&amp;diff=16297"/>
		<updated>2007-07-04T01:04:53Z</updated>

		<summary type="html">&lt;p&gt;TuukkaH: group under sections, add Formatting and See also&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wesnoth uses modern/advanced C++ that is portable to Visual C++ 6 and GNU G++ 3.0+&lt;br /&gt;
&lt;br /&gt;
== Formatting ==&lt;br /&gt;
&lt;br /&gt;
Indent with a tab character (width 4 characters), but align with spaces so tab width can change. &lt;br /&gt;
&lt;br /&gt;
You may use long lines. (Could we change this to max 80 columns per line? --TuukkaH)&lt;br /&gt;
&lt;br /&gt;
=== How to on Emacs? ===&lt;br /&gt;
&lt;br /&gt;
 M-x set-variable tab-width 4&lt;br /&gt;
 M-x set-variable c-basic-offset 4&lt;br /&gt;
&lt;br /&gt;
How to set alignment to use spaces?&lt;br /&gt;
&lt;br /&gt;
== Naming ==&lt;br /&gt;
&lt;br /&gt;
=== End Non-Public Members of Classes with an Underscore ===&lt;br /&gt;
&lt;br /&gt;
All non-public data members of classes should have their names terminated with an underscore, to show that they are a&lt;br /&gt;
class member. This makes for more readable code, once one is familiar with the convention.&lt;br /&gt;
&lt;br /&gt;
== Idioms ==&lt;br /&gt;
&lt;br /&gt;
=== Use References when a value may not be NULL ===&lt;br /&gt;
&lt;br /&gt;
If a value passed to a function can never be NULL, use a reference instead of a pointer. I.e.&lt;br /&gt;
&lt;br /&gt;
  void myfunction(Object&amp;amp; obj);&lt;br /&gt;
&lt;br /&gt;
rather than&lt;br /&gt;
&lt;br /&gt;
  void myfunction(Object* obj);&lt;br /&gt;
&lt;br /&gt;
This more clearly shows the user of the function that obj may never be NULL, without them having to consult&lt;br /&gt;
documentation or the implementation of the function.&lt;br /&gt;
&lt;br /&gt;
=== Use Const ===&lt;br /&gt;
&lt;br /&gt;
The 'const' feature of C++ allows interfaces to more clearly specify how they treat objects. Always use const when you&lt;br /&gt;
are not going to modify an object.&lt;br /&gt;
&lt;br /&gt;
I.e.&lt;br /&gt;
&lt;br /&gt;
  void myfunction(const Object&amp;amp; obj);&lt;br /&gt;
&lt;br /&gt;
demonstrates to the caller of myfunction() that obj will not be modified. If myfunction may modify obj, then use&lt;br /&gt;
&lt;br /&gt;
  void myfunction(Object&amp;amp; obj);&lt;br /&gt;
&lt;br /&gt;
likewise, if a variable is not changed after initialization, make it const.&lt;br /&gt;
&lt;br /&gt;
=== Write Exception-Safe Code ===&lt;br /&gt;
&lt;br /&gt;
Wesnoth code should be exception-safe, even if you do not use exceptions directly. That is, you should be able to assume that an exception is thrown almost anywhere from within the code, with well-defined results (i.e. no resource leaks).&lt;br /&gt;
&lt;br /&gt;
Code that uses a pattern like,&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  SDL_Surface* image = IMG_Load(&amp;quot;image.bmp&amp;quot;);&lt;br /&gt;
  ...some code, which uses 'image'...&lt;br /&gt;
  SDL_FreeSurface(image);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
is bad, because the code may throw an exception, and 'image' will never be freed. Instead, use wrapper objects which free the object in their destructor.&lt;br /&gt;
&lt;br /&gt;
For SDL_Surface objects, use the &amp;lt;tt&amp;gt;surface&amp;lt;/tt&amp;gt; class. So you could rewrite the above code,&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  surface image(IMG_Load(&amp;quot;image.bmp&amp;quot;));&lt;br /&gt;
  ...some code, which uses 'image'...&lt;br /&gt;
  } ''the image is automatically freed here when 'image' is destroyed&lt;br /&gt;
&lt;br /&gt;
Instead of allocating memory directly using new[] or malloc(), use language-provided containers, such as vector.&lt;br /&gt;
&lt;br /&gt;
=== Do not use sprintf ===&lt;br /&gt;
&lt;br /&gt;
Sprintf does not check whether or not it is writing past the end of the space allocated. This is a security problem if someone other than the person running the game can cause sprintf to write very long strings. In Wesnoth this untrusted data could come potentially from other players in a multiplayer game or from downloaded campaigns. Instead you should use snprintf with the second argument being sizeof of the buffer that will hold the result.&lt;br /&gt;
&lt;br /&gt;
== Standard C++ to avoid ==&lt;br /&gt;
&lt;br /&gt;
=== Respect for loop scoping of different platforms ===&lt;br /&gt;
&lt;br /&gt;
In the code,&lt;br /&gt;
&lt;br /&gt;
  for(int i = 0; i != 100; ++i) {...}&lt;br /&gt;
&lt;br /&gt;
the variable 'i' is scoped within the for loop according to ISO/ANSI C++ and GNU G++. However it is scoped within the&lt;br /&gt;
surrounding scope according to Visual C++ 6.&lt;br /&gt;
&lt;br /&gt;
This means that the code,&lt;br /&gt;
&lt;br /&gt;
  for(int i = 0; i != 100; ++i) {}&lt;br /&gt;
  for(int i = 0; i != 100; ++i) {}&lt;br /&gt;
&lt;br /&gt;
is illegal on VC++6, because i is defined twice, although it is legal according to the standard, and GNU G++.&lt;br /&gt;
&lt;br /&gt;
On VC++6, the legal way to write it would be,&lt;br /&gt;
&lt;br /&gt;
  for(int i = 0; i != 100; ++i) {}&lt;br /&gt;
  for(i = 0; i != 100; ++i) {}&lt;br /&gt;
&lt;br /&gt;
But this is illegal according to the standard, because 'i' is not defined in the second loop. The correct way to write&lt;br /&gt;
this code to conform to the standard and work on all platforms is to simply abandon declaring variables in the&lt;br /&gt;
initialization statement of a for loop when the variable must be reused in the same scope,&lt;br /&gt;
&lt;br /&gt;
  int i;&lt;br /&gt;
  for(i = 0; i != 100; ++i) {}&lt;br /&gt;
  for(i = 0; i != 100; ++i) {}&lt;br /&gt;
&lt;br /&gt;
=== Do not use wstring ===&lt;br /&gt;
&lt;br /&gt;
The standard C++ wstring class, defined as a basic_string&amp;lt; wchar_t &amp;gt;, does not exist in some platforms supported&lt;br /&gt;
by&lt;br /&gt;
Wesnoth. Use wide_string, defined in language.hpp, instead. wide_string is actually defined as a vector&amp;lt; wchar_t &amp;gt;&lt;br /&gt;
&lt;br /&gt;
== C legacy to be avoided ==&lt;br /&gt;
&lt;br /&gt;
=== Use the function templates minimum and maximum ===&lt;br /&gt;
&lt;br /&gt;
Standard C++ offers the function templates min and max to find the minimum and maximum of two values on which operator&lt;br /&gt;
&amp;lt;&lt;br /&gt;
is defined. Unfortunately, many hoops must be leapt through to get this working on VC++. So, we do not use standard&lt;br /&gt;
min&lt;br /&gt;
and max. Instead, we use minimum and maximum, defined in utils.hpp.&lt;br /&gt;
&lt;br /&gt;
Usage is fairly natural:&lt;br /&gt;
&lt;br /&gt;
  int i = minimum(x,y);&lt;br /&gt;
&lt;br /&gt;
Note that in the above example, if x is an unsigned integer, and y is a signed integer, VC++ will have problems. You&lt;br /&gt;
must explicitly specify the version of minimum being called in such cases:&lt;br /&gt;
&lt;br /&gt;
  int i = minimum&amp;lt;int&amp;gt;(x,y);&lt;br /&gt;
&lt;br /&gt;
=== Use util::array instead of C-style Arrays ===&lt;br /&gt;
&lt;br /&gt;
C-style arrays are very efficient, but their interface is ugly. Use util::array defined in array.hpp. It is a wrapper&lt;br /&gt;
for an array which has a C++ container-style interface. If you need to, extend it to make it fit your needs.&lt;br /&gt;
&lt;br /&gt;
=== Do not use C-style casts ===&lt;br /&gt;
&lt;br /&gt;
The following code,&lt;br /&gt;
&lt;br /&gt;
  if(i-&amp;gt;second.side() == (size_t)player_number_) {&lt;br /&gt;
&lt;br /&gt;
is considered bad practice in C++ since a C-style cast is overpowered -- if types change around it could end up casting away constness, or performing an implementation-defined data reinterpretation (basically a C-style cast is a compiler generated combination of static_cast, reinterpret_cast, and const_cast).&lt;br /&gt;
&lt;br /&gt;
Good programming style is to use the least powerful tool available that does what you want. For example,&lt;br /&gt;
&lt;br /&gt;
  if(i-&amp;gt;second.side() == static_cast&amp;lt;size_t&amp;gt;(player_number_)) {&lt;br /&gt;
&lt;br /&gt;
Alternatively, a constructor call may be used for non-builtin types.&lt;br /&gt;
&lt;br /&gt;
Note: there may be some obscure cases where a C-style cast is desirable, such as converting a pointer to an integer type of unspecified size.&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
=== Document &amp;quot;config&amp;quot; preconditions and postconditions ===&lt;br /&gt;
&lt;br /&gt;
In the Wesnoth code you will commonly encounter a data container known as the &amp;quot;config,&amp;quot; which contains heirarchical string data (such as WML contents or game settings). The tagged &amp;quot;children&amp;quot; of the config and their string &amp;quot;attributes&amp;quot; are arranged in an ordered and mapped format internally using STL.&lt;br /&gt;
&lt;br /&gt;
Because config data is utilized in so many ways and places,  it can be difficult to track across the scope of the entire program. You should document all public functions that take/return a config, specifying config content expectations. In particular, if your function requires a config parameter, specify where/how the config should be created. This will be a great help to any future coders who need to call or modify your function.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[HackingWesnoth]]&lt;/div&gt;</summary>
		<author><name>TuukkaH</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=HackingWesnoth&amp;diff=16295</id>
		<title>HackingWesnoth</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=HackingWesnoth&amp;diff=16295"/>
		<updated>2007-07-03T22:07:25Z</updated>

		<summary type="html">&lt;p&gt;TuukkaH: /* C++ Quiz */ add links to tutorials&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is designed to be a guide for aspiring Wesnoth programmers on what they need to do to be able to productively contribute to the Wesnoth code base.&lt;br /&gt;
&lt;br /&gt;
Wesnoth is written in C++, a large and complicated language. There are many C++ programmers, but they tend to have widely varying levels of skills and styles. This page is designed to be a guide as to the skillset needed to contribute to Wesnoth.&lt;br /&gt;
&lt;br /&gt;
== C++ Quiz ==&lt;br /&gt;
&lt;br /&gt;
Below is a short C++ quiz that assesses your skills in areas of C++ that are used alot in Wesnoth. If you know all the answers to the questions, you are probably ready to start working on the Wesnoth code base. If you know most of the answers to the questions, you can probably work on the Wesnoth code base with some oversight from the senior developers. There are good C++ guides for both knowledgeable programmers (such as [http://www.icce.rug.nl/documents/cplusplus/ The C++ Annotations]) and beginners (such as [http://www.cplusplus.com/doc/tutorial/introduction.html C++ Language Tutorial]).&lt;br /&gt;
&lt;br /&gt;
# What is a virtual destructor? Why is it needed?&lt;br /&gt;
# What does the standard class template auto_ptr do? What is its purpose?&lt;br /&gt;
# What is a vector, and why would you use it?&lt;br /&gt;
# What is a map, and why would you use it?&lt;br /&gt;
# What are the differences between a reference and a pointer? When should each be used?&lt;br /&gt;
# What is an iterator, and when is it used?&lt;br /&gt;
# What are the memory areas in a C++ program, and what is the purpose of each?&lt;br /&gt;
# What is a copy constructor, and what is an assignment operator? When must you define them in a class?&lt;br /&gt;
&lt;br /&gt;
== Wesnoth Coding Style ==&lt;br /&gt;
&lt;br /&gt;
=== Guideline 1: Don't prematurely optimize ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;When I was a new and inexperienced coder, I read the following rather famous saying: &amp;quot;Premature optimization is the root of all evil.&amp;quot; -- Donald Knuth.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While I wouldn't then -- and would be hesitant to now -- dispute the opinion of Donald Knuth on any programming topic, this absolute statement confused me. Premature optimization certainly doesn't sound like a wise thing to do, but it sounds somewhat obscure to be the root of all problems in programming. Had Knuth written this phrase after spending too long correcting problems caused by a programmer who was hell-bent on optimization at every turn?&lt;br /&gt;
&lt;br /&gt;
Now I realize that Knuth was correct. Time and time again programming problems spring from developers making their code too complicated because they are trying to optimize unnecessarily.&lt;br /&gt;
&lt;br /&gt;
By the [http://en.wikipedia.org/wiki/Pareto_principle Pareto Principle] we know that a minority of the code will occupy a majority of the running time. That is, perhaps 90% of the running time of the program will be spend executing just 5% of the code. It is thus generally unnecessary to apply many optimizations at all to most of the program. One can just write the code in a way that is the most readable and maintainable and forget about optimization altogether most of the time.&lt;br /&gt;
&lt;br /&gt;
Remember also, C++ compilers are good, and smart, and they can execute code fast. Most code will run fast enough, unless you go out of your way to make it run slowly.&lt;br /&gt;
&lt;br /&gt;
So, the first rule of Wesnoth programming is that unless you have a very good reason to think you need to optimize, do whatever is simplest and most maintainable.&lt;br /&gt;
&lt;br /&gt;
Many programmers seem to have an obsession with using the control C++ gives them to do all sorts of crazy things. Like make their own memory management routines, or write their own containers, and so forth. Simply, don't. It's possible to write good C++ code very fast using the standard components supplied as part of the language.&lt;br /&gt;
&lt;br /&gt;
This leads us to our next topic...&lt;br /&gt;
&lt;br /&gt;
=== Guideline 2: Know the Standard containers and use them ===&lt;br /&gt;
&lt;br /&gt;
One of the best things about C++ is that the standard supplies some great containers. Always prefer to use them first to store data. That is,&lt;br /&gt;
&lt;br /&gt;
* prefer to use std::vector to store dynamic arrays&lt;br /&gt;
* prefer to use std::string to store strings (we also provide t_string for a translatable string -- it's based on std::basic_string, which std::string is also based on)&lt;br /&gt;
* prefer to use std::map to store key/value pairs&lt;br /&gt;
* prefer to use std::set to store sets of items (roughly equivalent to the mathematical concept of a set).&lt;br /&gt;
&lt;br /&gt;
There are other C++ containers, and you should know about all of them. A good source of documentation on the portion of the C++ standard library known as the Standard Template Library (STL) which contains the standard containers can be found [http://www.sgi.com/tech/stl/ here].&lt;br /&gt;
&lt;br /&gt;
By using the standard containers, you should almost never have to manually allocate and delete memory yourself by hand. The containers will automatically allocate and deallocate memory for you. This leads us to our next guideline...&lt;br /&gt;
&lt;br /&gt;
=== Guideline 3: Use the resource acquisition is initialization (RAII) idiom ===&lt;br /&gt;
&lt;br /&gt;
In C, you might write some code like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void myfunction()&lt;br /&gt;
{&lt;br /&gt;
    char* mystring = (char*)malloc(n);&lt;br /&gt;
    /*some code, which manipulates mystring*/&lt;br /&gt;
    ...&lt;br /&gt;
    free(mystring);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code works, but is error prone. What if the code in the middle exited using a return statement, or a longjmp statement, or in C++, threw an exception? The memory allocated would never be cleaned up, and we would have a memory leak.&lt;br /&gt;
&lt;br /&gt;
Sure, you're a good programmer, and you probably make sure you're very careful about freeing the string. But what about when this function grows to be 100 lines long (and functions have a way of doing that), and then another programmer who isn't that familiar with the function is trying to fix a critical bug as quickly as they can, that requires adding an early return statement to this function? What about when someone is trying to read the code to scan for memory leaks? Once they see the malloc at the top, they will have to carefully read the entire function, to make sure it's all okay.&lt;br /&gt;
&lt;br /&gt;
Now if we had this C++ version instead,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void myfunction()&lt;br /&gt;
{&lt;br /&gt;
    std::string mystring(n,'x');&lt;br /&gt;
    /*some code, which manipulates mystring*/&lt;br /&gt;
} //mystring is destroyed and memory automatically released&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
None of these problems can possibly happen. mystring will ''always'' be released at the end of the function.&lt;br /&gt;
&lt;br /&gt;
So, this just re-iterates how important C++ containers are, right? Well, yes, but it also shows us that we should always avoid code written like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void myfunction()&lt;br /&gt;
{&lt;br /&gt;
    ...allocate resources...&lt;br /&gt;
    ...use resources&lt;br /&gt;
    ...release resources...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have code like this, you should put the resources in a class that will manage them and release them at the end of the function. If there is no class like that, then you should write one. This goes for all resources: memory, files, threads, and so forth.&lt;br /&gt;
&lt;br /&gt;
It might sound like a silly mistake that we're protecting against here, one that an experienced programmer wouldn't make. However, almost all programming bugs are due to 'silly mistakes'. This leads us to our next item...&lt;br /&gt;
&lt;br /&gt;
=== Guideline 4: Lean on the compiler as heavily as you can ===&lt;br /&gt;
&lt;br /&gt;
Humans make mistakes. Even very stupid mistakes. Computers are as dumb as toast, but they are at least very very consistent.&lt;br /&gt;
&lt;br /&gt;
For Wesnoth, we try to write code that will make the compiler guard against mistakes as much as possible. The use of RAII as described above is one example of this: writing the code so the compiler and language rules will guarantee it's correct.&lt;br /&gt;
&lt;br /&gt;
There are some more ways to do this. One big way is to make all code const correct. That is, always define something as 'const' when it shouldn't change its value. If you have a pointer that is meant to be read only, define it as a const pointer. Then if the code is later changed so that your pointer changes the value, the compiler will produce an error.&lt;br /&gt;
&lt;br /&gt;
Another way is to avoid implicit conversions between objects, and always use the C++-style casts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[CodingStandards]]&lt;/div&gt;</summary>
		<author><name>TuukkaH</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FAQ&amp;diff=5357</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FAQ&amp;diff=5357"/>
		<updated>2005-12-13T20:56:38Z</updated>

		<summary type="html">&lt;p&gt;TuukkaH: /* Multiplayer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Frequently Asked Questions=&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
===What is Battle for Wesnoth?===&lt;br /&gt;
Battle for Wesnoth is a fantasy turn-based strategy game.&lt;br /&gt;
&lt;br /&gt;
===What license is the game distributed under?===&lt;br /&gt;
The project is distributed under the [http://www.fsf.org/copyleft/gpl.html GPL]. All contributors retain copyright on the portions of the project that they contribute.&lt;br /&gt;
&lt;br /&gt;
===How to get informed about new releases?===&lt;br /&gt;
Subscribe to new releases at [http://freshmeat.net/subscribe/38720/?url=%2Fprojects%2Fwesnoth%2F Freshmeat].&lt;br /&gt;
&lt;br /&gt;
===A new version is out, but where is the download for [Windows, Mac OS, etc.]?===&lt;br /&gt;
The downloads are NOT part of the official project.  The BFW team only releases the game's source code.  Binary executables or applications are always contributed by community volunteers.  If not for these volunteers, there would never be any downloads for us to enjoy.  The volunteers compile the game and upload it on their own time, and sometimes they cannot do this in a timely fashion (or at all, at times)  Although there are usual packagers designated for each operating system, there are times when other members of the community are asked to step in and contribute when the usual people cannot.&lt;br /&gt;
&lt;br /&gt;
Every time a new version is released, the usual volunteers are always notified by the project leaders.  '''Please refrain from making forum posts asking where your download is''' because it doesn't help anything - the packagers already know, and they will get to it as soon as they can.  In the past, the Windows and Mac communities have come together to produce home-grown unofficial builds for the community to use, and the renewed interest in community and learning how to compile is generally a good thing.&lt;br /&gt;
&lt;br /&gt;
===Why does Wesnoth not have my favorite feature?===&lt;br /&gt;
Because we are building this game for ourselves and for our preferences, not for you. If you like the game as we like it - that is good. If you hate the game - that is also fine.&lt;br /&gt;
So what is the point of asking for ideas? Because the developers are just common people, although we come up with many ideas, our players certainly do as well, and often ones we don't think of ourselves. If a player comes up with an idea we like - we might implement it. Not because you asked for it - we do it because we like the feature.&lt;br /&gt;
At the moment there will be no features added because of the feature freeze in preparation for the release of v1.0. But after the release, there will be many new things again.&lt;br /&gt;
You are free to re-use any work in Wesnoth, as long as you follow the rules of the [http://www.fsf.org/copyleft/gpl.html GPL], to build the game that you like. Don't expect us to build that game for you.  Building this game is our hobby, not our profession - you did not pay us to make it; rather, we are the ones who have paid for it, in time and labor.&lt;br /&gt;
&lt;br /&gt;
===Do you want help making this game? How can I help?===&lt;br /&gt;
Yes, we want your help. Whether you're a programmer, artist, musician, writer, translator, level designer, playtester, or just have some great suggestions, you're welcome to contribute. How?  You can:&lt;br /&gt;
* join the [http://www.wesnoth.org/wiki/Project Project]&lt;br /&gt;
* share your point of view at the [http://www.wesnoth.org/forum/ Forum]&lt;br /&gt;
* talk with us on [irc://irc.wesnoth.org/wesnoth IRC]&lt;br /&gt;
* report bugs you find at [[ReportingBugs]]&lt;br /&gt;
* update the wiki&lt;br /&gt;
* play against us via the Multiplayer menu&lt;br /&gt;
* vote for Wesnoth at your favorite gaming web site&lt;br /&gt;
* Spread the word!&lt;br /&gt;
&lt;br /&gt;
=== What are the system requirements? ===&lt;br /&gt;
&lt;br /&gt;
We are not completely certain, but an x86 running at 600MHz with 128MB RAM should be adequate.  Slower machines will have trouble scrolling large maps or processing AI turns with many units.  See the [http://www.wesnoth.org/forum/viewtopic.php?t=7384 forum thread] about minimum and recommended system requirements.&lt;br /&gt;
&lt;br /&gt;
=== I'm bored; how do I speed the game up? ===&lt;br /&gt;
&lt;br /&gt;
There are several preferences you can change to shorten the time that the AI takes to make its moves. &amp;quot;Accelerated Speed&amp;quot; will make units move and fight faster. &amp;quot;Skip AI Moves&amp;quot; will not show the AI's units moving from hex to hex. Finally, you can turn off all combat animations via the &amp;quot;Show Combat&amp;quot; option on the Advanced tab.&lt;br /&gt;
&lt;br /&gt;
=== My computer is too slow; how do I speed the game up? ===&lt;br /&gt;
&lt;br /&gt;
First, turn off the music and sound effects. Turning off the color cursors will make your cursor respond faster. If scrolling the map is slow, run the game in &amp;quot;Full Screen&amp;quot; mode, not in a window.  Turn off combat animations via the &amp;quot;Show Combat&amp;quot; option on the Advanced tab.  You can try turning off halos and combat results, but this might make gameplay more difficult.&lt;br /&gt;
&lt;br /&gt;
=== Post more questions here ===&lt;br /&gt;
&lt;br /&gt;
Is there an FTP YaST repository?&lt;br /&gt;
&lt;br /&gt;
You would have better luck with this on the forum.  It isn't a very frequent question, and those with the answer would be more likely to be there rather than here.&lt;br /&gt;
&lt;br /&gt;
== Gameplay and Controls ==&lt;br /&gt;
&lt;br /&gt;
=== How do I learn to play? ===&lt;br /&gt;
&lt;br /&gt;
If you just want to jump right in, start the game and play the tutorial.  If you like reading documentation, see [[WesnothManual]], which is also distributed as a PDF file.  At any time while playing, you can select help from the menu button (or hit F1). The online help is quite extensive and provides information on terrains, weapons, traits, abilities, units and a good overview of how to play.&lt;br /&gt;
&lt;br /&gt;
=== My unit leveled up but didn't improve. What happened? ===&lt;br /&gt;
&lt;br /&gt;
This is called &amp;quot;After Maximum Level Advancement&amp;quot; or AMLA for short. While most level 0, 1, and 2 units can advance, some cannot.  However, some level 3 units can advance to level 4, or even 5. You can see whether a unit can advance further by right clicking and selecting &amp;quot;description.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
After a unit reaches the highest level it can get, every time it gains 100 experience it gains 3 hitpoints. It does not heal when this happens. This is a minor bonus so that experience gained by maxed out units is not altogether wasted. It is generally better to give experience to lower level units, rather than continue to advanced units that have reached their maximum level.&lt;br /&gt;
&lt;br /&gt;
If the unit in question is the Necrophage, this is not a bug.  The Necrophage eats the corpses of the dead, allowing it to periodically completely heal.  Leveling into itself is how this is carried out.&lt;br /&gt;
&lt;br /&gt;
=== I tried to trap an enemy with several weak units, but it still escaped. What happened? ===&lt;br /&gt;
&lt;br /&gt;
Most units exert a zone of control (or ZOC).  IF an enemy moves into one of the six adjacent hexes, the zone of control will prevent it from moving any farther.  However some weak units are level 0, meaning they are so weak that they do not have a ZOC. You can still surround an enemy unit entirely with level 0 units to keep it from escaping, but if there is any gap in your ranks, it could escape.&lt;br /&gt;
&lt;br /&gt;
Also, some units have the &amp;quot;skirmish&amp;quot; ability, which allows them to ignore ZOCs.&lt;br /&gt;
&lt;br /&gt;
=== How can I see where an enemy unit can move next turn? ===&lt;br /&gt;
&lt;br /&gt;
During you turn you can click on an enemy unit. Wesnoth will highlight all the hexes the unit can move to in the next turn. This is useful when trying to arrange your units to block an enemy's movement.&lt;br /&gt;
&lt;br /&gt;
=== There's too much luck in this game! ===&lt;br /&gt;
&lt;br /&gt;
Sooner or later, you will become frustrated when your archmage with four 70% attacks misses all four times.  This does not mean that the AI is cheating or the random number generator is futzed.  It means you are noticing negative random events more than positive ones.  During the development of the game, many mathematicians have done sophisticated statistical analysis of the combat system.  Likewise, programmers have examined the random number generator.  Wesnoth has been deliberately designed so that the streaks of &amp;quot;bad&amp;quot; and &amp;quot;good&amp;quot; luck are part of the gameplay.&lt;br /&gt;
&lt;br /&gt;
Note that saving your game right before a combat, and restoring and trying again, will often generate the same result.  This is expected, because the random number generator is &amp;quot;seeded&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Since Wesnoth is GPLed, it is possible that, after the 1.0 release, a new development team will &amp;quot;fork&amp;quot; the source and produce a version more like Heroes of Might &amp;amp; Magic, with no randomness.  Until then, don't charge with your horsemen against rock trolls at night...&lt;br /&gt;
&lt;br /&gt;
=== The (random unit) is overpowered/underpowered! ===&lt;br /&gt;
&lt;br /&gt;
The development team has spent years tweaking the units in the game.  Each unit has had its gold cost, attack types, combat damage, defensive values, resistances, upgrade paths, and other stats carefully scrutinized and loudly discussed in the forum.  However, the game code and the units were being modified right up until the 1.0 release, so some unbalanced units may have slipped through.&lt;br /&gt;
&lt;br /&gt;
If you have evidence to back up your claim, search the forum for past discussions about this unit, and then try posting.&lt;br /&gt;
&lt;br /&gt;
=== The (random scenario) is too hard/easy! ===&lt;br /&gt;
&lt;br /&gt;
See above answer about random units.&lt;br /&gt;
&lt;br /&gt;
=== What do the different difficulty levels do? ===&lt;br /&gt;
&lt;br /&gt;
That depends on the scenario. Usually, the opponent will get more money and be able to recruit higher-level units at higher difficulty levels, and you will have fewer turns available.&lt;br /&gt;
&lt;br /&gt;
=== Post more questions here ===&lt;br /&gt;
&lt;br /&gt;
== Maps, Scenarios and Campaigns ==&lt;br /&gt;
&lt;br /&gt;
=== How do I beat scenario _______ ? ===&lt;br /&gt;
&lt;br /&gt;
If you are stuck on a scenario in a campaign, you'll probably find a walkthrough at [[MainlineScenarios]].  Or check out the &amp;quot;Strategies and Tips&amp;quot; forum at http://www.wesnoth.org/forum/viewforum.php?f=3&lt;br /&gt;
&lt;br /&gt;
=== Are there any tools to help me create maps and scenarios? ===&lt;br /&gt;
Yes, there is a tool called wesnoth_editor. It is a normal map-editor that should be a good help for creating the plain maps. For creating the scenarios there already is a scenario-editor included in the mac build. But this editor is rather outdated and it exists only for MacOS X. At the moment some community members are working on creating a nice and working scenario editor. You can have a look at the [http://www.wesnoth.org/forum/viewtopic.php?t=6925 forum post] about this tool. You will also find more info at [[CampGen]].&lt;br /&gt;
&lt;br /&gt;
=== How do I download user campaigns? ===&lt;br /&gt;
Choose &amp;quot;Campaigns&amp;quot; in the main Wesnoth menu. Then scroll down to the bottom and choose &amp;quot;Get More Campaigns...&amp;quot;. This connects you to the campaign server. In the campaign server you can view a list of all available campaigns and download them, as well as posting or deleting your own campaigns. If you are behind a firewall you may not be able to connect the the campaign server; in this case try contacting the author of the campaign via the forums to see if there is another way you can get the campaign.&lt;br /&gt;
&lt;br /&gt;
=== I already created a campaign and published it on the campaign server. How can I get translations for the campaign? ===&lt;br /&gt;
Just have a look at [[WesCamp]]. This project is the easiest way to get translations for your campaign. All the info you need you can find at [[WesCamp]].&lt;br /&gt;
&lt;br /&gt;
===How do I place an object or unit on my map with the map editor?===&lt;br /&gt;
You can't.  You need to make a multiplayer scenario file.  There are more details on the [[BuildingMaps|maps]] page.&lt;br /&gt;
&lt;br /&gt;
=== Post more questions here ===&lt;br /&gt;
&lt;br /&gt;
== Multiplayer ==&lt;br /&gt;
&lt;br /&gt;
===How to find players for multiplayer game?===&lt;br /&gt;
Hang around for a while on multiplayer servers and you might find someone to play with. If you observe other people playing you will get informed when someone joins the servers. Maybe you find someone willing to play in the irc channel dedicated to mp: #wesnoth-mp at irc.freenode.net.&lt;br /&gt;
You can also join #wesnoth at irc.freenode.net.&lt;br /&gt;
&lt;br /&gt;
===How can I make my computer into a dedicated Wesnoth server?===&lt;br /&gt;
&lt;br /&gt;
===Which versions of Wesnoth can play together?===&lt;br /&gt;
&lt;br /&gt;
== Translations ==&lt;br /&gt;
&lt;br /&gt;
===I selected an asian translation and am not able to see the letters correctly. What happend?===&lt;br /&gt;
&lt;br /&gt;
Since the size of the necessary fonts is too large, you'll need to download them separately (if you don't already have them). After that, simply copy the font to the '''fonts/''' directory in your wesnoth installation.&lt;br /&gt;
* Chinese font: [ftp://cle.linux.org.tw/pub/fonts/ttf/unicode/Arphic/gkai00mp.ttf gkai00mp.ttf]&lt;br /&gt;
* Japanese font: [http://cvs.sourceforge.jp/cgi-bin/viewcvs.cgi/sqs-xml/sqs-font/sazanami-gothic.ttf sazanami-gothic.ttf]&lt;br /&gt;
&lt;br /&gt;
If you got futher questions have a look at [[WesnothAsianLanguages|this]] page.&lt;br /&gt;
&lt;br /&gt;
=== Post more questions here ===&lt;/div&gt;</summary>
		<author><name>TuukkaH</name></author>
		
	</entry>
</feed>