Sign in to follow this  
Jiggle156

Tetris Clone (in progress, hit a wall)

Recommended Posts

I am currently writing a Tetris clone game, and due to a lack of knowledge on how to plan properly - its becoming...challenging.
I have written a fair amount of code already, but it's all over the place - and probably only makes sense in my head, so perhaps best not to post it here. But anyhow, I am using a 2D array of boolean values to deal with collision. A brick will be randomly created, and bound to the base pointer controlled by key events. I understand how its going to move, and collide with things - but I have absolutely no idea what to do when it hits the bottom. How should I make it 'stay around', once the block is deleted, and a new one bound?

Note: Using C++, SDL and this is my first game project.

Share this post


Link to post
Share on other sites
When I've written Tetris clones in the past I tended to have a 2d array of blocks for use as the background blocks, as it were. So when your shape settles, just turn on relevant blocks on the background 2d array.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this