C Plus Plus

Game: Snake V1.1

by on Aug.23, 2012, under OpenGL

Hi,

I was learning opengl and maid a new snake game in freeglut and c++. It is different from my first snake game as it is in GUI and not in terminal. Here are some pics to look at.

It has statistics about food eaten, elapsed time, speed of snake which can be freely adjusted using button Q (increase) and E (decrease). You can change direction using W, D, S and A buttons. And it have distance traveled. Measured by squares of food size.

You can restart game by pressing button R. And close game with button ESC.

Well it have graphic from old times (or don’t have graphic :D ), but it works as it should work. As source code takes a lot of place I won’t put it here but will give download link. Here are a makefile which I use to compile program in linux terminal.

Download .tar.gz

P.S. I put in archive  a compiled game. But it is compiled on Ubuntu 12.04 64bit system. So it may not work in your system.


2 Comments for this entry

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...

    Archives

    All entries, chronologically...