This repository contains the materials for the course on software architecture. It features a game project, whose architecture is a lighter version of industrial-grade ones.
The project's code contains voluntary errors and design flaws which are addressed during the classes. The repository is updated after every class, in order to reflect the evolution of its code.
The following tools are required:
If you're not on Windows, or cannot use Visual Studio, Premake allows to use other toolchains, please read its documentation.
Open a terminal in StealthFactor directory and follow the instructions for your platform.
premake5.exe vs2019
Open build\StealthFactor.sln, choose your target, and build.
apt-get install -y g++ g++-multilib libode-dev libsfml-dev make
premake5 gmake2
cd build
make config=release_linux64
In order to simplify installation of the project, the repository contains parts of external projects, in source code form or executable form.
Although the code should support multiple platforms, only precompiled libraries for Windows are provided.
- cli.cpp, a CLI argument parser (header-only)
- ODE, a physics engine
- pugixml, an XML parser (header-only)
- SFML, a small multimedia framework
- Why do we need architecture and code quality anyway?
- Architecture principle: rely on lower level, cannot access to higher level.
- Overview of a typical game engine architecture.
- Dependency cycles to be avoided.
- Singletons can facilitate architecture breaches.
- Division of responsibilities.
- Interfaces to break dependency cycles.
- Dependency injection.
- Dependency inversion.
- pImpl.
- RAII.
- Ownership.
- std::unique_ptr.
- Move semantics.
- void*: C-style pointer to user data.
- Interface with opaque structures through handlers.
- Specialization through inheritance.
- Specialization through components, entity-component-system.
- Camera system.
- Separation between Model and View.
- Visitor pattern.
- Test-driven development, unit tests.
- Serialization.
- Visitor pattern, again.
- Model-View, again.
- Command pattern, undo-redo.