Answers to questions regarding development of OpenTTD, e.g. source code, setting up compilers, etc..
This page provides brief answers and then links to other resources. This is to avoid duplicating information better found elsewhere - please maintain that approach when editing, thanks.
Contributing to the project
What can I do to contribute to the project?
This depends on your talents.
- Translating to other languages
- Extend this Wiki, or better: Update out-dated stuff.
- Graphics, sound and music: If you draw stuff, but you can't code; check out the forums for some project to contribute to. Note: If you do not cover all skills required for some project, it's smarter to join an existing project, than trying to find someone else to join your new project.
- Language and tools involved
- There are many projects on the DevZone which need new people to pick them up, especially the base sets.
- GameScripts and AIs: Game script
Main-game coding (C/C++):
- See answers on this page below, and also OpenTTD Development Documentation
Tool-chains for Add-ons (mostly python):
- Tools for NewGRF development. Working on the toolchains requires to understand a lot of both the main game and the add-ons, it's probably the hardest challenge to get involved with them.
- Tools for operating OpenTTD servers
How to get in contact with people
Checkout the Community page for links to the various forums and platforms for each subject.
How does open-source work? What to expect from people?
As general advice, if you are new to open-source: Consider the different interests of people in the project. Don't expect people to have rational goals, or to share interests with you. Even if you seem to work on the same thing, some people are mainly interested in the result (what to do?), while others are mainly interested in the path towards some result (how to do something?).
This applies to both "inoffical add-ons" as for the "official branch": This is a volunteer project; everyone is here for fun, not for obligations. Some people develop stuff with the expectation that official maintainers are obliged to look at their stuff and include it into the main branch; but the truth is that people will only look at stuff when they are interested in it.
In every volunteer project you will find posts like "this patch has been around for 10+ years, I want it so badly, why is it still not in the main branch?". But don't let that spoil your fun :)
Contributing to the main game
Want to contribute? Great!
- We have a guide: Contributing to OpenTTD
What are the goals of the official branch?
- The Contributing to OpenTTD guide covers the goals of the official branch.
I do not agree with the goals of the official branch, what can I do instead?
- The Contributing to OpenTTD guide covers this (TL;DR: forks and patchpacks are encouraged).
I've fixed a bug / added a feature. How can I submit it to the codebase?
- Contributions to the official branch are solely via Pull Requests on GitHub
- Some people also like to share diffs via tt-forums
I want to become an official OpenTTD developer! How?
- This is a matter of trust. OpenTTD has many complicated and arcane mechanics with lots of corner cases. You can join the official team by proving that you fix more than you break.
- The best way to get started is by fixing small things, either from the GitHub issues, or things you find yourself. Submit Pull Requests for these. We do try to review all pull requests, especially from new contributors, but sometimes it takes a while before someone gets to it.
- Nearly all official communication is via GitHub, or in irc channels, joining irc regularly is the most effective route to becoming a long-term contributor.
What is source code?
- Source code is the uncompiled version of the program, or in this case OpenTTD, which enables the developers to make changes to the game.
- If you are unfamiliar with source code, then we suggest starting off with a C++ tutorial.
How can I obtain the source code?
- OpenTTD source code is obtained via the OpenTTD GitHub repo
- You can find instructions here: Contributing to OpenTTD
Now I have got the source code how can I compile it?
Compiling OpenTTD contains more information about compiling.
To test the compiler setup, try compiling the game from source code without applying any patch, and run the resulting executable. If all goes well, you can be fairly sure the setup is good. If it fails, you know for sure the patch is not the source of the problems.
I had a problem compiling! What should I do?
- This is not a compiling FAQ. Try to ask your compiler vendor for help.
How do I create a patch?
- See the guide in Contributing to OpenTTD