Skip to content
forked from andrewrk/tetris

A simple tetris clone written in zig programming language.

Notifications You must be signed in to change notification settings

raulgrell/tetris

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tetris

A simple tetris clone written in zig programming language.

Demo

https://raulgrell.github.io/tetris/

Controls

  • Left/Right/Down Arrow - Move piece left/right/down.
  • Up Arrow - Rotate piece clockwise.
  • Shift - Rotate piece counter clockwise.
  • Space - Drop piece immediately.
  • R - Start new game.
  • P - Pause and unpause game.
  • Escape - Quit.

Dependencies

Desktop

  • GLFW
  • libepoxy
  • libpng

WebGL

  • Browser supporting WebGL

Building and Running

Desktop

Run the following command from the project root:

zig build

Webgl

Open the index.html file to run. You can also run a local http live server on the project root so the game restarts whenever you make a change. If you make changes to the zig code, rebuild the wasm binary by running the following command from the project root:

zig build-exe -target wasm32-freestanding --release-small src/main_web.zig

About

A simple tetris clone written in zig programming language.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Zig 70.7%
  • JavaScript 26.0%
  • HTML 2.6%
  • CSS 0.7%