"Cube Spin" (2025)
C Programming | 3D Math 

"A simple spinning cube program written from scratch in C"

Game Engine: none

Development Time: 2 Weeks

Genre: the iconic spinning primitives genre

The Work 
This project was developed from scratch as a way for me to gain some fundamental knowledge about both 3D math and graphics programming. I wrote it in C and compiled it using GCC. 


I first wrote the basic logic for visualizing the 3D cube and I then added the random spinning, with additional controls for spinning in fixed directions depending on the player input. I also added multiple different colors that you can choose from by pressing the corresponding key. Do note that the script was written on Linux and is not multiplatform if you are thinking of compiling it yourself.
The full script is pasted below: