Sunday, April 13, 2008

GTK+2 Game

You're going to be coding a simple game today.

This is the object of the game.

My Sub should have given you source code. I think it's really good practice to recode this by hand rather than copy and paste; you get a better feel for the code.

You have to understand the idea of tables in GTK+

Code the .c and .h files then compile; from Ubuntu, I used:

gcc game.c -o game `pkg-config --cflags --libs gtk+-2.0`

Then, go back and comment your code as detailed as possible; define variables, explain objects and functions.

Also add the new functions to your libraries.


;)

No comments: