What you'll learn
- Game Development Basics
- Practical Applications of Vectors
- Rust Basics
Before we start writing code, we need to have a clear vision of what we are going to build. Let's first decide on what features the game will have and how it will look like so that we can make a plan of action.
We are going to build a classic snake game that you can see on the screen. When the snake eats food, it becomes longer, and the score increases. If the snake heats the wall or bites the tail game is over. Additionally, we will allow the player to stop the game by pressing the space button. To keep the user motivated, we will save the best score and show it alongside the current one. We make sure that the game looks good on any screen size, be it a tiny mobile phone or a large TV.
The main thing that we will export from Rust is Game struct with a constructor and two public methods. The first method will receive a duration from the last update and direction that the user wants a snake to take. The second method will check if the game is over.
All the source code you can find in the repository. Each part will have a link to the corresponding commit. There are a lot of things to cover in this short course, so let's jump in.
Who this course is for:
- Beginner Game Developers
- Rust Developers
I am a software engineer with four years of experience. During my career, I worked with a lot of different technologies, yet most of the time, I do web apps with React+Redux on the frontend, NodeJS microservices on the backend and AWS, Docker, Terraform on DevOps side.
After a regular job, I develop a productivity tool that you can find on my website. In the time left, I write stories on Medium and create YouTube videos about technology and productivity.