Skip to content

rdmello/bpftrace-pong

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

pong.bt

A small command-line pong game implemented using bpftrace.

Inspired by bpftrace tetris

Instructions

Requires bpftrace 0.11.0 or newer.

Clone the repository, configure bpftrace on your system, and run using:

./run.sh

If all goes well, you should be able to see the game after waiting few seconds for the code to compile.

You can also customize the width, height, and computer difficulty using positional parameters:

./run.sh 41 12 70

Here the difficulty is measured as the percentage of times the computer's paddle correctly moves towards the ball. It defaults to 70% (i.e. the computer makes a mistake during 30% of movements), and you should increase this if you want higher difficulty.

About

A simple pong game implemented using bpftrace

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages