Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 7 days 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 (8 days ago)
- Default Branch: main
- Last Pushed: 2025-01-28T06:17:53.000Z (7 days ago)
- Last Synced: 2025-01-28T07:23:15.149Z (7 days ago)
- Topics: c, c11, game, game-development, gamedev, sdl, sdl3, sdl3-image, sdl3-mixer, sdl3-ttf
- Language: C
- Homepage:
- Size: 1.07 MB
- Stars: 0
- 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.
*TODO: rewrite the building and installation sections for complete instructions for compilation on Windows,
and list of needed libraries on Linux. Also it might be worth to write shell and powershell scripts for
downloading all dependencies when building with -DVENDORED_LIBS=ON.*## Building
If you're on Windows, you can obtain tetris from the
[Releases](https://github.com/inunix3/wetris/releases) page.Create a build directory in the project root:
```
mkdir build; cd build
```Invoke cmake something like this:
```
cmake -DCMAKE_BUILD_TYPE=Release ..
```Currently SDL3 is not widely installable from repositories, so you'll probably need to pass
`-DVENDORED_LIBS=ON` to build SDL3 and its extensions.If you're on Windows, you also need to pass this flag, and `-DSDLIMAGE_VENDORED=ON
-DSDLMIXER_VENDORED=ON -DSDLTTF_VENDORED=ON` too.Next build the tetris:
```
cmake --build .
```After a successful building, binary `wetris` will be lying in the src directory.
### Installation
If you like my tetris, you can also install it from the build directory:
```
sudo cmake --install .
```## 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.## License
wetris is licensed under the [MIT license](LICENSE.md).