While building our game servers we found ourselves frequently including the same files in multiple builds. Fortunately git has built-in support for linking and adding content from foreign repositories called submodules.
Submodules on github are identifiable via the format <folder-name> @ <commit-hash>
where the commit-hash shows which commit of the foreign git repo has been included.
When you first clone a repo that includes submodules you'll find those folders empty. To fetch their contents use the command git submodule update --recursive;
.
To update submodules to their latest commits use git submodule foreach git pull origin master;
.
Further reading: github.com - Working with Submodules
Our game servers are built as Docker Images - you'll need Docker to build them as well. The free community edition on desktop will suffice. Download Docker
Further reading: Using Docker for Game Servers
Our game-server repositories are optimized for editing with Visual Studio Code, a cross-platform, open-source code editor. When working with these repos we highly recommend using it.
We highly recommend these plugins while working with our repositories in Visual Studio Code.
- Docker - for syntax highlighting, hover tips, IntelliSense completion, and linting.
- EditorConfig for VS Code - Used to maintain consistent coding style and encoding.
You might find these plugins helpful as well.
- markdownlint - highlight syntax errors in markdown files
- Spell Right - lightweight spell checker
- VSCode Great Icons -
Common build/test operations are defined using VSCode tasks and can be executed via the Tasks.