Rotating Cube

I’ve been working on learning some DirectX 9.0 which is a great library to create games! Obviously when you’re learning, it’s not all about making games. You have to start somewhere, but a long the way you get to do some pretty neat things. One of those things was a rotating cube. The code came mostly from the book I’m reading, but I modified it with some pretty simple controls to make it some what fun.

This is by no means a complex project, but it’s fun to play with it because you can add your own graphics and it will move the cube at different speeds or directions.

Here is the screenshot:

A rotating cube!

And here is the actual cube: rotating_cube.zip. There are 7 files total. One executable, and one .bmp for each side of the cube. The controls for the cube are easy:

  1. (1) slow
  2. (2) medium slow
  3. (3) medium
  4. (4) medium fast
  5. (5) fast
  6. (0) Rest and stop
  7. (up) rotate up
  8. (down) rotate down
  9. (left/right) rotate sideways

This has been a lot of fun to play around with. I’ve tweaked the controls on all kinds of ways which is not hard at all since it’s just a matter of adding if statements. Again, this does nothing special or paticular, but everyone has to start somewhere!

<end>

Comments are closed.