https://github.com/inunix3/wetris
A tetris clone using SDL3.
https://github.com/inunix3/wetris
c c11 game game-development gamedev sdl sdl3 sdl3-image sdl3-mixer sdl3-ttf
Last synced: 4 months ago
JSON representation
A tetris clone using SDL3.
- Host: GitHub
- URL: https://github.com/inunix3/wetris
- Owner: inunix3
- License: mit
- Created: 2025-01-27T02:37:53.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-02-26T01:48:25.000Z (4 months ago)
- Last Synced: 2025-02-26T02:32:28.743Z (4 months ago)
- Topics: c, c11, game, game-development, gamedev, sdl, sdl3, sdl3-image, sdl3-mixer, sdl3-ttf
- Language: C
- Homepage:
- Size: 1.08 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# wetris
A tetris clone written in C11 and using SDL3.
![]()
## Building on Linux
```
mkdir build; cd build
cmake -G 'your favorite generator' -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
```Currently SDL3 is not widely installable from repositories, so you'll probably need to pass
`-DVENDORED_LIBS=ON` to build SDL3 and its extensions.After a successful building, binary `src/wetris` will be lying in the build directory.
If you like my tetris, you can also install it from the build directory:
```
sudo cmake --install .
```## Building on Windows
You can obtain prebuilt binaries from the [Releases](https://github.com/inunix3/wetris/releases) page.
### Compiling from sources
Create a build directory:
```
mkdir build; cd build
```If you're going to use multi-config generator like Visual Studio, these flags must be passed, and
the build type must be specified in build-time:```
cmake -G 'your favorite generator' -DVENDORED_LIBS=ON -DSDLIMAGE_VENDORED=ON -DSDLMIXER_VENDORED=ON -DSDLTTF_VENDORED=ON ..
cmake --build . --config Release
```If you wish to use single-config generator like MinGW makefiles:
```
cmake -G 'your favorite generator' -DCMAKE_BUILD_TYPE=Release -DVENDORED_LIBS=ON -DSDLIMAGE_VENDORED=ON -DSDLMIXER_VENDORED=ON -DSDLTTF_VENDORED=ON ..
cmake --build .
```Although if you're using MinGW, you can actually try to copy SDL3 and its extensions into
compiler directories from packages marked as devel.
The SDL libraries can be obtained from [their repositories](https://github.com/libsdl-org).After a successful building, binary `src/wetris.exe` will be lying in the build directory.
## Controls
| Key | Action |
|---------------|-------------------------|
| `escape` | Quit |
| `a` / `left` | Move left |
| `d` / `right` | Move right |
| `q` | Rotate counterclockwise |
| `e` | Rotate clockwise |
| `s` / `down` | Speed up falling |
| `space` | Drop |
| `p` | Pause |## Contribution
If you have found a problem or have a suggestion, feel free to open an issue or send a pull request.
I'd appreciate it.## Notice
Used font is **The PC Paint Font Collection** made by [codeman38](https://www.zone38.net/font/).
Graphics were made in [Aseprite](https://www.aseprite.org/) and [Gimp](https://www.gimp.org/),
sound effects in [MilkyTracker](https://milkytracker.org/) and [Audacity](https://www.audacityteam.org/).## License
wetris is licensed under the [MIT license](LICENSE.md).