DEV Community

Samuel Collier
Samuel Collier

Posted on

I made 3D Snake

Hello everyone! In my last few posts I've shown off some websites that I've built, but honestly JavaScript is overrated and I wanted to dive back into some lower level stuff. I had worked with C and SDL2 before, but I was still quite a beginner at graphics and the C language itself.

To start things off, I started learning OpenGL from this wonderful website. After setting up the project infrastructure on the 10th of March, I went through all the "Getting Started" tutorials. This just covers the basics of OpenGL and after re-reading the tutorial sections a few times, I decided to create my own project. I wanted to make a classic game, but in 3D, so I chose to make Snake. The game took 4 days in total to make and is composed of ~900 lines of C code.

Here's a screenshot of the game:
Image description

If you want to try out the game yourself or inspect the code, you can do that here at the Github repository:

GitHub logo STCollier / Snake

A snake game made with OpenGL and C

Snake

A snake game made with OpenGL and C (composed of 900 lines of questionable code)

image

Building

  • Unix-like systems

    • Dependences
  • Windows

    • no



Let me know what you think!

Top comments (0)