From e8d1618673b4498604aea07c2f06e09433bd762b Mon Sep 17 00:00:00 2001 From: Edvin Jakobsson Date: Tue, 8 Sep 2026 19:34:30 +0200 Subject: Add README --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..acc75c2 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# pong + +Pong in C and SDL2 — two paddles, a ball, the whole game. There are two versions of it sitting side by side: `pong.c` is the first cut, and `game.c` is a cleaned-up revision that actually keeps score (`pong.c`'s scoring is stubbed out in comments) and eases up on how aggressively the ball speeds up on each bounce (1.1x per hit in `game.c` versus a much twitchier 1.5x in `pong.c`, which gets out of hand fast). `game.c` is the one worth running; `pong.c` is left in as the earlier draft. + +## Controls + +- Player 1: `W`/`S` +- Player 2: `I`/`K` + +## Building + +Needs SDL2 (and SDL2_ttf for `game.c`, unused at the moment but linked). + +```sh +cc game.c -lSDL2 -lSDL2_ttf -o pong +./pong +``` -- cgit v1.2.3