I know some Python basics and want to learn C for reverse engineering, game porting, and eventually making my own games. What would be a practical place to start? Also, will AI make learning to program less worthwhile for personal projects?
How should I learn C for reverse engineering and game porting?
Answers
Start with small C programs and get comfortable compiling them from the command line. Work through variables, functions, arrays and structs, then spend some time on pointers and memory management. Use a debugger to step through your code and inspect what changes.
For the reverse engineering side, compile a small program you wrote and compare its source with the assembly. You can also open the compiled program in a tool like Ghidra and see how its C-like pseudocode differs from the original. That makes it easier to connect the pieces before tackling unfamiliar software.
Reply to this answer
Make a tiny 2D game with raylib once you have the basics down. Something with movement and a few objects is plenty. You'll have a reason to practice structs, pointers and keeping track of game state without starting with a huge project.
After that, look at a small open-source game and see what would need to change to build it on another platform. A modest port will teach you more than jumping straight into a large commercial game.
Reply to this answer
CS50 is a good option if you want a structured introduction rather than piecing everything together yourself. It covers C early on, and you can use the exercises as a starting point before branching out into game projects.
Reply to this answer
AI can help explain a compiler error or suggest an approach, but you still need to check whether the code does what you want. Knowing C lets you question its handling of pointers, memory and program structure instead of trusting the output blindly.
And if the goal is making things for fun, learning isn't wasted just because a tool can generate code. Solving the puzzle yourself can be a big part of the appeal.
Virel-5d:
Trying the problem first and then asking for an explanation of a specific error is a useful way to keep the learning part in the loop.
Reply to this answer
Add your answer
Answers are reviewed before publication.
9c+tramspindle_572:
The pseudocode is a reconstruction, not the original source, so expect some details to look different or be missing.