Chapter 3. Events and Basic Game Mechanisms
In the last chapter, we saw how to add dependencies into a project thanks to Cargo
and the basics of the SDL2
library.
We now have all the Rust basics in order to write the Tetris game. Time to look at how we will actually write Tetris.
In this chapter, we will cover the following topics:
- Tetrimino
- Creating tetriminos
- Generating a tetrimino
- Tetris struct
- Interacting with the game map
- SDL events
- Score, level, lines sent