The popular classic game Pong developed as the first assignment of the online course CS50 Games. I built my version in the C programming language using Raylib 5.5, while the course uses an OOP scripting language called Love2D. I was focused on design differences from an Object Oriented paradigm versus a procedural paradigm.
Coming from a largely OOP background, the problems were more or less self created as I tried to stick a little too hard to OOP ideas.
I tried 'faking' objects with enums using function pointers (encapsulation), which sort of works until it doesn't.
Such as when I began trying to swap those functions with other related functions (polymorphism) and it becomes a real mess for no real gain in usage from a developers standpoint (atleast not in this particular project aside from left vs right paddles).
I had tried generalizing some code to plop into other data structures I created (inheritance) but this ended upcausing the code to become, just like one of the BIGGEST problems with OOP, extremely brittle. One change up stream will ruin everything downstream.
When I let go of my ego stopped trying to find a problem for my solution, the project was immediatly pretty trivial.
OOP is OOP. You can't fake it with non-OOP paradigms. Don't try to use tools for a job they weren't made for.
The code went through one or two changes I just kinda said screw it and embraced C as it is and had fun with it.
I also discovered that actual randomness generally kind of sucks. Example, the ball has a tendency to move straight up & down or perfectly horizontal. if I were to go back and redo it, I would hard code a few directions and randomly pick form that list (which I did in Breakout! and it turned out infinitely better).
The biggest thing was learning how one problem can be reasonably solved in different ways. Seeing OOP and solving the same problems procedurally was a blast and I intend to keep going on with CS50 Games writing everything in C using Raylib.
Lastly, I'm learning I kind of love Raylib.
What would I do differently? Everything. The code could me much less verbose and succinct but this was a day long project just kinda testing the waters with Raylib, C, and CS50 Games. It is fully functional, but it is what it is, I certainly wouldn't show it off in an interview hahaha It did leave me wanting more (spoiler alert i'm half way through the CS50 games course now and yes, I am still using C and Raylib, I just haven't learned to like blogging yet).
FYI I do not use AI for my blog, all spellign mistaks and ungood grammar are my own. AI was not used in any of my coding projects either to this point.