You are here

c++

Rick Umali's Tetris

I finally finished my version of Tetris. It's a Windows game. To play on your PC, download the installer below.

Tags: game tetris c++

Solving Invisible Geometry with Correct Winding

While teaching myself Microsoft DirectX, I fell into an issue that is best described as "invisible geometry". This is the unfortunate situation when lines aren't appearing when and where you expect them to. You've told DirectX to draw something, but you don't see it. The difficulties with getting this simple "two-faced triangle" to draw seemed to represent the difficulties with working with DirectX in general.

Tags: c++ DirectX graphics

Tetris Update

I've been on a roll with my Tetris development the past few days. Of late, I've implemented "pause" and "fast fall" (or "fast drop"). I've also added the ability to build a "mound". While working on the code to make the mound (the collection of pieces that pile up on top of each other), I found it helpful to dump the contents of my "grid" to a file. Here's my grid after playing the game for a few minutes. Clearly I now have to work on "clearing the rows" next!
Tags: tetris c++

Tetris Game Shaping Up

Tonight, I reached a good point with my coding of Tetris: I managed to get falling pieces that I could move horizontally. Some big things are missing: boundary detection, the creation of the "mound" (the pieces that collect at the bottom of the playing field), and the randomization of the pieces themselves.

Tags: tetris c++

An Approach for Tetris Shapes in C++

I've been noodling with a Win32 version of Tetris, the ubiquitous "shape placing" game. I'm working in C++ using the Simple Directmedia Layer for my graphics. One of the interesting things in working out the game is the "shape" data. Below is the code for one my shapes, and the methods to "rotate" and "draw" it.

Tags: source code tetris c++
Subscribe to RSS - c++