Posts Tagged ‘pong’

Programming Pong in C and OpenGL – Part VI

Monday, January 19th, 2009
The latest version of my sample clone with scoreboard, etc.

The latest version of my sample clone!

Here’s the last part of my multi-part series on programming your very own pong clone in c and opengl!  It’s been a long time coming, so I hope you enjoy.  There’s lots of improvements in this version including a completely custom old-style “LED Alarm Clock” scoreboard, flashes on bounce, funky changing colors, improved collision detection, and a round ball! ;)

(more…)

Programming Pong in C and OpenGL – Part V

Tuesday, July 22nd, 2008

It’s been a while since I last updated on this, but hopefully you’ve brushed up on your C and OpenGL skills.  Here you’ll find the entire source code to a pong implementation in C and OpenGL.

Enjoy!

(more…)

Programming Pong in C and OpenGL – Part IV

Tuesday, July 1st, 2008

OpenGL

OpenGL is the Open Graphics Library and it is maintained by the Kronos Group, which is a consortium of top-tier companies that include board members such as ATI nVidia, Apple, IBM, and more. Microsoft used to be on the consortium, but left and decided to make DirectX, a competing closed graphics library that only runs on Windows (at least without some sort of emulation layer or wrapper like Wine or Cedega).

(more…)

Programming Pong in C and OpenGL – Part III

Friday, June 27th, 2008

Sorry for the delay in this post, but here’s Part III.

For reference, you probably want to start out with Part’s II and I here and here.

Last we left off I said I’d get into some of the basic mechanics of GLUT and OpenGL, so let’s hit the ground running.

GLUT

GLUT, or the Graphics Library Utility Toolkit, is a cross-platform C library for generating windows and handling IO events. Basically, GLUT was written so you can get to learning OpenGL very quickly without having to spend enormous amounts of time learning how to handle mouse or keyboard actions in your current OS, or worse, learn how to setup a simple GUI just so you can see your work. On top of making these tasks simpler, GLUT is, as I mentioned, cross-platform. This means that you can take your code and recompile it on another OS as long as you have the appropriate GLUT library referenced in your IDE. There are currently versions of GLUT created for Linux, OS X, Windows, and probably even more operating systems.

So how do we create a simple window?

(more…)

Programming Pong in C and OpenGL – Part II

Monday, June 2nd, 2008

This is the second part in what should be a four part series on how to program your very own Pong clone. The first article went over setting up your environment in your favorite OS, now this part gets into some of the mechanics or details on how to actually get started.

Before I start with anything, we have to think about simple animation. In fact, animation is just simply a series of static images, with each image slightly displaced from the last.

So what does that mean? (more…)