FAF Development

From FA Forever Wiki
Revision as of 10:13, 13 December 2020 by Rowey (talk | contribs) (Created page with "= '''Introduction to Development''' = This document only covers development of the FAF infrastructure. * For information about mapping, please look here. * Fo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction to Development

This document only covers development of the FAF infrastructure.

  • For information about mapping, please look here.
  • For information about modding, please look here.

Source code & version control

Forged Alliance Forever is an open source project. You can find all sourcecode on Github. As the name indicates, Github uses git as version control system. If you want to participate in development, you have to use git and create a Github account (it's free). You can find a small introduction in our Dev School. There are also lots of tutorials on YouTube and other sites.

We strongly recommend to use git on the command line at the beginning. Please do not use the git tools inside your IDE before you have understood the basics of git.


All developer communication takes place on Zulip.

If you want to join us, please contact an administrator/moderator on the forums or in our in-client chat (white names at the top) so that we can invite you to our Zulip project.

Since mid-2016 we introduced a conference call every 2nd month, where developers and moderators talk about the progress. These calls are streamed in our YouTube channel.

Many developers also like to talk to each other on the Faf Discord in the Development channels. Those are restricted channel up if you write those developers in private chat they will probably let you in.

Infrastructure overview

If you have looked up our Githube page, you may have noticed lots of sub-projects.

FAF consists of 5 important projects, which reflect the basic architecture:

  • game: Forged Alliance gameplay files (lua)
    • This is the official featured FAF mod
    • This is the right place to work on balancing changes, game-lobby changes, unit behavior fixes/enhancements
    • The game communicates with the client using GPGNet-protocol
  • client: FAF lobby client (java)
    • This is the FAF client featured on the website and the main user interface.
    • Instructions how to set up the client dev environment can be found on Youtube (brief, detailed)
  • server: FAF lobby server (python)
    • The server is responsible for game hosting, rating calculation and ladder-matchmaking
  • Web api: FAF restful Web-api server (java)
    • The api servers offers servers to authenticated users (via OAuth2)
    • Services are i.e. achievements, map upload, bug reports.
    • As it's open for everybody, the service itself is not restricted to any client.
  • db: FAF sql database (sql)
    • The database is the backend for server and api.
    • Instructions how to set up the db can be found on Youtube

Then there is the python client, which was the previous official client:

  • client: FAF lobby client (python)
    • Instructions how to set up the python client dev environment can be found here

FAF is working on a java-replacement for the server(discontinued):

All these projects have a readme which contains information how to use it. For further questions please ask for help in our Zulip chat.

Developer tools

The following tools are strongly recommended for development (regardless of your operating system):

  • git
    • Please follow our branching scheme.
    • Linux client should be available in your package manager
    • Windows client
  • docker
  • a good IDE:

Where to begin?

There are lots of starting points for new developers:

  • Pick an issue from any of the git projects and start working on it.
    • We recommend to check that the issue isn't solved already. If someone worked on it, you can usually see referenced commits in the issue history.
    • If the situation is unclear, ask in Zulip.
  • Pick a suggestion from the suggestion forum or
  • Bring up any topic in Zulip and offer to work on that.
    • The devs will give useful hints about your approach and tell you about possible conflicts.
  • Join #pair-programming in Zulip and team up with others

Dev Notes

Installing Luajit and Lupa for building lupa package

FAF Development School

FAF Development School is an open group set up by Softles to promote development of FAForever's codebase.

Hints and tips for contributing to FAF are provided to the less experienced both in the forums and the groups chat, #FAF_Dev_School

  • In order to join this chat simply type: /join #FAF_Dev_School into aeolus.

The lessons to date are recorded below for reference.



Resources for working on FA modding (the game code):

1) Modding hints

2) AI Modding

2) LUA-Docs

3) Unit Blueprint Docs

First Time Guide

If you've not done any coding before, or have no idea where to start then this is the guide for you!

The most important thing to do if we want to play with the FAF code is get a GitHub account, see the lesson on that: Github for FAF

Once you've got a GitHub account set up, the next thing to do is to choose what FAF code you want to take a look at.

For the FAF client code see: FAF Client code

For the FAF server code see: FAF Server code

If you're looking for suggestions, it might be easiest to set up the Client code first :)