rayflap

A Flappy Bird clone written in C and compiled to WebAssembly.
git clone https://unitehenry.com/git/rayflap.git
Log | Files | Refs | README

commit f5110fbdcddeac20500709ddc6dae226f0f784e9
parent 5ebf09dc9236ee7e120b5d4e36fba66b4b795a0f
Author: Henry Unite <unitehenry@gmail.com>
Date:   Sun, 19 Apr 2026 17:11:18 +0000

feat: random starting pipe y

Diffstat:
Msrc/game.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/game.c b/src/game.c @@ -221,8 +221,7 @@ void reset_pipes() { float startX = i > 0 ? pipeRects[i - 1].x + screenWidth - pipeTexture.width : (screenWidth + pipeTexture.width); - // TODO: pick between lowerBound and upperBound - float pipeY = 192; + float pipeY = lowerBound + fmodf(rand(), (upperBound - lowerBound + 1));; Rectangle bottomPipeRect = pipeRects[i];