DEV Community

Samuel Collier
Samuel Collier

Posted on

1 1

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!

Image of Datadog

Measure and Advance Your DevSecOps Maturity

In this white paper, we lay out a DevSecOps maturity model based on our experience helping thousands of organizations advance their DevSecOps practices. Learn the key competencies and practices across four distinct levels of maturity.

Get The White Paper

Top comments (0)