Skip to content

mmisono/bpftrace-tetris

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

bpftrace-tetris

This is the ported version of tetris.spt.

Requirements

  • Linux 5.3+
  • bcc master branch version
  • bpftrace master branch version

How to run

  • ./run.sh

In Vagrant

If you do not readily have access to a recent linux kernel and bpftrace, you can try the included Vagrant file which launches ubuntu eoan so you can still play tetris!

Download vagrant from https://www.vagrantup.com/downloads.html, and make sure you have either VMWare or Virtualbox 6.0 installed.

Install both, then run:

vagrant plugin install vagrant-vbguest

You can then run tetris with:

./run-in-vagrant.sh

In Docker

./run-in-docker.sh

Note that this also run with a recent Docker Desktop for Mac.

FAQ

Q. Why is Linux 5.3+ required?

Otherwise the BPF program will be rejected due to the maximum instruction limit (see this commit.)

Q. How do I change the dropping speed?

It can be changed by modifying the interval value of interval:ms:99.

Q. How are blocks represented?

License

GPL v2 or later

About

Tetris in bpftrace

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages