C-tarting at nothing
- 4 Devlogs
- 25 Total hours
Learning C, then making a bunch of memory leaks (a game) once I'm ready
Learning C, then making a bunch of memory leaks (a game) once I'm ready
Been pretty busy the past few days because of work and moving into uni but I’m all moved in now, and have time to code for a bit again
Features:
Stuff I learned:
Biggest Challenge:
When I first built the game for windows and sent it to my friend to try it, it just didn’t work at all, and it took me forever to figure that it was dynamically linking raylib, so anybody running it needed to have raylib installed, but I eventually figured out how to get it to static link
This one took me a while
(My favorite bugs I encountered are attached)
It has:
Stuff I learned:
Biggest challenge:
Debugging different logic errors was really hard, since there’s just so many more different spots where the code can go wrong when handling memory yourself
(out of bounds arrays don’t always crash, they can sometimes just give you random data)
It plays just like classic snake, supporting wasd and arrow keys, hitting yourself or the walls kills you, and eating an apple increases your score and you grow
The biggest challenge was that I kept assuming that uninitialized variables would default to 0 like in other languages, but in C they become whatever was last in that memory, so random garbage
I learned about stardance midway through this, so this is really long.
Basically, I have never touched Linux, C, or C++ before this, and I am going to learn the language while using Linux (wsl2), and make a hopefully good game by the end of it
Calculator
Rock Paper Scissors
String Library
Vector (c++ std::vector/dynamic array)
Linked List
HashMap