https://github.com/rdmello/bpftrace-pong
A simple pong game implemented using bpftrace
https://github.com/rdmello/bpftrace-pong
Last synced: about 16 hours ago
JSON representation
A simple pong game implemented using bpftrace
- Host: GitHub
- URL: https://github.com/rdmello/bpftrace-pong
- Owner: rdmello
- Created: 2020-10-14T20:05:02.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-10-14T23:57:19.000Z (over 5 years ago)
- Last Synced: 2025-11-12T22:06:14.512Z (7 months ago)
- Language: Shell
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pong.bt
A small command-line pong game implemented using [bpftrace](https://github.com/iovisor/bpftrace).
Inspired by [bpftrace tetris](https://github.com/mmisono/bpftrace-tetris)
### Instructions
Requires bpftrace 0.11.0 or newer.
Clone the repository, configure [bpftrace](https://github.com/iovisor/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.