<$BlogRSDUrl$>

Saturday, January 24, 2004

UPDATE! New version: "Open Gl Free Falling Blocks II"

This version allows the blocks to have mass and stack instead of just covering over each other, they also stick together when pushed from the side. Colors are changed now from RGB to green fading to blue. You can make pretty designs with this program. Use 'P' to pause and 'O' to continue. The program stops after 500 blocks (to prevent old computer from crashing). All the other controls are still the same.

OpenGl Free Falling Blocks II (Windows)

Part of learning OpenGl and the making of "Falling Blocks", I decided to work on the theory of blocks dropping. It's not all perfect, but what's important is that I got blocks to fall. Nothing stacks, so it lines up at the bottom. I capped it at 500 blocks so that if you have a horrible computer, it wont crash. Also, on my computer, running it in full screen makes the blocks fall faster.

OpenGl Free Falling Blocks (Windows)

These problems are things I have to figure out how to overcome prior to programming these games. I think I figured out the speed issue, I'll just run a timer in the game to limit frame rate, etc. Well, enjoy.

Keys:
Arrow Left - Move left.
Arrow Right - Move right.
F1 - Full Screen/Windowed Mode
Esc - Exit

Note: Down does not speed up cube drop.

Thursday, January 22, 2004

New Project: Falling Blocks
Description: A Tetris game written in C++ with OpenGl.
Platform: Mac OS 9.2 (We will port for Windows and Linux)

This project is for my 2nd semester project. I am working on this with Mike Chao.

Sunday, January 04, 2004

Now, I am trying to work with physics in a 2D environment. I am assuming the mass of the two objects are the same and I am able to bounce the objects.

OpenGl Bounce (Windows)

Use the enter key to start the action. You can experiment by pressing the enter key while it is moving or try holding it. I was able to get both objects to bounce.

They only move along the x-axis.

Now I'm trying to apply friction but I'm having trouble with applying the formula, since my program does not track time. a=(f*g)/m from f=(ma)/g - with friction being the force - and using that by.... v=v+a(t).

Also, I need to remember the formula of the energy transferred in a collision between two objects with different masses. Then I'll apply that.

So, right now I'm learning open GL on the Windows environment, and here is what I have created:

OpenGl Pyramid (Windows)
OpenGl Cube (Windows)

You can use your arrow keys to move the shape and press F1 to switch between full screen and windowed mode.

Welcome. This blog was created as a programming diary for ME! to post what I'm doing and for YOU! to read.

This page is powered by Blogger. Isn't yours?