I've been programming in Ruby for a while, but I'm diving into C now for some hobby game development. I'm using the Cute Framework to handle a lot of the low-level stuff. I could really use some feedback on things like the following:
- The common pitfalls or surprises people encounter when starting with C.
- Thoughts on how I've set up my globals in the code.
- Any tips on what I could have approached differently.
- Insights on the general structure of my CMake setup.
You can check out my code on GitHub here: https://github.com/pusewicz/raptor-cute-c
2 Answers
It's interesting that you're using CMake because it seems like a lot of folks aren't really on board with traditional C build concepts. Honestly, it seems more stable than some of the other options out there like Automake, but I always feel a bit nervous about it. After looking at your main.c and other files, it kind of feels like you're blending C++ styles into C. If you're comfortable with Cute Framework, that's totally valid, but remember that C and C++ have their differences. If your aim is to stick to C, it might be worth exploring frameworks that are purely C, like raylib. It's a popular choice for games!
Wow, I have to say, your code looks really solid! You've got the essence of C down well, and while there's always room for refinement, honestly, your bases are covered. I think you've approached this like a pro, so no major complaints here! Just keep it up, and you might find yourself polishing some small details to take it to the next level!
Are you being serious, or are you just kidding?

Can you give an example of what parts of the code seem less like C?