flappy-boid banner

flappy-boid

2 devlogs
12h 22m 16s

flappy bird using c++ and raylib

Voxi0

feat

  • rewrote everything in modern c++. classes and structs in c++ are really nice and convenient honestly but anyways im also making use of deconstructors and all to make sure resources are properly cleaned up automatically no matter what without requiring manual intervention among other things
  • cleaned up makefile and stuff and using clang instead of gcc. for some reason clang feels slightly faster at compiling? but anyways i also noticed the error messages are way nicer looking and less terrifying compared to gcc so uh yeah using clang now
  • rotate the bird so it looks up when flapping and smoothly looks down as it falls
  • added pipes. still very incomplete as im not handling collisions and scoring just yet but the basics are there. im currently in the middle of trying to figure out how to generate the pipes using object pooling instead of destroying and creating pipes continuously

extra yap

i nearly finished the project in c but i felt like my code was too unclean and messy and just, trash in general to the point that refactoring felt like one messy chore that just hurts your soul. so i may or may not have deleted everything and rewrote everything in c++ lmao

but honestly it did help. the structure and everything is way cleaner now with classes and structs. c++ is just nice to work with unless you get into really low-level advanced stuff i guess.

and uh, from the last image you can tell that pipe generation is still a heavy work in progress… i feel so stupid i’m somewhat lost. but anyways i’ll focus a lot today and hopefully get it working. after that it’s genuinely smooth sailing and just polishing a bit and making a web build with emscripten before shipping.

Attachment
Attachment
Attachment
Attachment
Attachment
0
Voxi0

init

  • set up a basic flappy bird project using c23 and raylib. the development environment is composed of a simple nix devshell and a makefile. not really much to it.
  • added a bird struct which is just the player. i already did stuff so it can flap and move left and right cause why not?
  • made a crappy main menu using raygui. ignore the two test buttons at the bottom gang. there’s a simple enum to track the game state and in the main loop i just have a switch statement to check the state of the game. i should be able to easily implement a pause menu later on.
  • as you can see in the actual game uh, there’s a random rectangle. im just testing collision right now before starting to make pipes using rectangles and stuff. its just a placeholder for now which i’ll later replace with proper textures and stuff later.
Attachment
Attachment
0