Ensure you have the following dependencies installed:
- Operating System:
Linux/macOS/Windows - Package Manager: Conan
- CMake: For managing the build process.
- Make: For building the project.
- C++: The programming language used for development.
- Clone the repository:
git clone https://github.com/ItsZcx/r-type.git
- Navigate to the project directory:
cd r-type - Set up environment variables:
make install
To run the project, you can use the provided Makefile which includes commands to build and run both the server and the client.
-
Build the project:
make build
-
Run the server:
./server [PORT]
-
Run the client:
./client
When you run the client, it will prompt you to enter the server IP. If you are running both the server and client on the same machine, provide the IP in the format 127.0.0.1:PORT. Otherwise, provide the appropriate server IP and port.
graph TD
dev --> client((client))
dev --> server((server))
client --> c_feature((c_feature))
server --> s_feature((s_feature))
c_feature --> client
s_feature --> server
client --> dev
server --> dev
dev --> main
Explanation:
mainbranch: The final, stable branch (main) is updated with tested and completed changes fromdev.devbranch: The main development branch, which integrates changes from theclientandserverbranches.client&serverbranches: These branches handle module-specific development. They integrate work from their respective feature branches (c_featureands_feature).- Feature branches (
c_feature&s_feature): Temporary branches created for individual features. These branches have custom names (e.g., s_tcp_support, c_sfml_support). Once a feature is completed and stable, it is merged into its corresponding module branch (client or server).
Use clang-format to ensure consistent code style.
-
Format a specific file:
clang-format -style=file [FILE] -i
-
Format all files in the current directory:
find . -regex '.*\.\(cpp\|hpp\|cc\|cxx\)' -exec clang-format -style=file -i {} \;
For detailed information on the project architecture, refer to the Architecture documentation.
For detailed information on the communication protocol, refer to the Protocol documentation.
This project is licensed under the MIT License.