Refactoring my Apple Game into MULTIPLE C Source Files

Опубликовано: 28 Июль 2026
на канале: Andrew Hamel Codes
4,602
123

In all my Demos up to this point, we've done everything in a single source file. No custom headers and no extra source files. Today we are following up the previous video on creating a Visual Studio Code Task-ready template which supports multi-file work. We're taking that template and using it to split up the source from my AppleCatch video into multiple files. We'll see there's some refactors that need to be done, but it will set us up nicely for when I get around to improving the AppleCatch further in a future video.

The GitHub repo for this project:
https://github.com/AndrewHamel111/ray...

My first video making the Apple Catch game:
   • Making the most COMMON "First Game" In Ray...  

My video on the C Language:
   • C Language Overview  

My video on Tic-Tac-Toe with Raylib in C:
   • Making Tic-Tac-Toe in Raylib with C  

Chapters
0:00 Preparing the project
2:16 defines.h
3:00 Global _apples array refactor
4:40 apples.h
5:34 score.h
7:19 basket.h and gamestate.h
8:30 Red lines and timelapse
10:20 Build notes
11:22 Conclusion