A recreation of the classic arcade game "Space Invaders" built with C++ and the raylib library.
Follow these steps to get the game up and running in your local development environment.
You'll need to have the following installed on your system:
- Visual Studio Code: The code editor for running the project.
- A C++ Compiler:
g++orclang++must be installed and configured. - The raylib library: This project uses
raylibfor graphics and audio. TheMakefileis configured to findraylibatC:/raylib/raylib, but you may need to adjust the path in theMakefileandtasks.jsonto match your installation.
First, clone this repository to your local machine using Git.
git clone https://github.com/your-username/your-repository-name.git
cd your-repository-nameOpen the project folder in Visual Studio Code.
code .The project is configured to build and run directly from the VS Code Run and Debug menu.
- Open the Run and Debug view in VS Code by clicking the debug icon on the sidebar or pressing
Ctrl+Shift+D. - In the dropdown menu at the top, select the "Run" configuration. This configuration will compile the game in release mode and run the executable.
- Click the green "Start Debugging" button or press
F5.
The Makefile will automatically compile the project, and the game window will launch.
- The
launch.jsonfile contains two configurations: "Debug" and "Run." These configurations tell VS Code how to build and execute the game. - The
tasks.jsonfile defines the build commands, specifically "build debug" and "build release," which use the project'sMakefileto compile the source code. - The
Makefilehandles the platform-specific compilation, including linking with therayliblibrary. It's set up to build a singlegame.exeexecutable.