This repository serves as the starting point for building a simple yet functional game engine using Rust. The project is designed to help you apply the concepts and skills you've learned throughout the Rust course. By completing this project, you'll gain hands-on experience with Rust's advanced features, including multi-threading, macros, and interoperability with C code.
When working on this project, you can choose between utilizing Udacity's VM environment or setting it all up on your local machine. If you prefer to use the Udacity VM, you can skip the local environment prerequisite steps and jump straight to the project instructions.
While this project has no specific dependencies on any system, it was built on a Unix-based machine. So, if you're on Windows, I'd recommend using the Windows Subsystem for Linux (WSL), so all instructions here directly apply to your system.
For this project, you'll need to have Rust installed in your machine. If you haven't installed Rust yet, you can do so with:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Also, because we are dealing with C code in this project, you'll need to have a C compiler installed on your machine. You can install the build-essential
package, which includes the GNU C Compiler (GCC) and other necessary tools:
sudo apt update
sudo apt install build-essential
Finally, you'll need to have GLFW installed in your machine. GLFW is a C library that will be the foundation of our game engine. You can install it with:
sudo apt install libglfw3 libglfw3-dev
To start with your project, clone this repository to your local machine:
git clone https://github.com/udacity/intro-to-rust-starter.git
# or, git clone [email protected]:udacity/intro-to-rust-starter.git
To ensure you are set up correctly, you can run the test C game that comes with this project. You can build and run the test game with:
cd intro-to-rust-starter/starter
make run-c
You should see the following pop-up window:
With this done, we are ready to start creating our game engine project. Inside the starter
folder, create a new Rust library project called my_game_engine
(or whatever name you prefer), and then refer to the project instructions in the Udacity website to start building your game engine.
Note: If you choose another name for your engine, you must update the references to
my_game_engine
in thestarter
folder'sMakefile
to reflect the new name.