News for hackers. Stuff that matters.
Re:Flappy Bird in 1000 lines of C by robinsonb5 on Sunday December 08, 2024 @06:04AM (#42356464)
Yes indeed, if the project were targetting a simpler machine without an operating system and windowing system in the way, then doing the whole thing - graphics presentation and all - in a thousand lines of C would be perfectly feasible

> I'm acutely aware how it's not turtles all the way down (as the logophiles believe)

De Chelonian Mobile

Re:Flappy Bird in 1000 lines of C by Y_Y on Sunday December 08, 2024 @06:36AM (#42356563)
> De Chelonian Mobile

Get out of here with that monotestudonist heresy!

Re:Flappy Bird in 1000 lines of C by rileymat2 on Sunday December 08, 2024 @11:00AM (#42357843)
It uses a sprite sheet png file. I am curious how you would target a simpler machine without a bunch of code to display those. I am having trouble picturing this.
Re:Flappy Bird in 1000 lines of C by robinsonb5 on Sunday December 08, 2024 @11:59AM (#42358222)
There's no special reason it has to PNG, though - if you're aiming for minimum line-count without dependencies then just use a raw bitmap.
Re:Flappy Bird in 1000 lines of C by spookie on Sunday December 08, 2024 @09:07PM (#42362473)
You can just inline sprites in code too. Even though that would add at least one big line of code :)

This is how I do fonts in one of my projects.