Tetris Tutorial (C or C++)

5cd4aa640c40d41724a5c6ca6eedc606
0
Wrks 101 May 21, 2011 at 15:15

I’m looking for a Tetris tutorial, either in C or C++. Anyone has good links?

1 Reply

Please log in or register to post a reply.

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 104 May 21, 2011 at 17:43

You should figure it out for yourself!!

Alot of people use a small 2d array to keep the block positions, then when the shape is placed, you insert it into array then detect for completed lines, then if any lines are completed the slit gets memcpyd out of the array.

Its actually mostly easy, its definitely a beginner project.

The hard bit is getting all the animation nice and smooth and the visuals nice.