Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Tetris collision again.

This topic is 6033 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I asked awhile ago about tetris collision and the best way to do it. I decided to go with the array-technic. But now I am a little stuck. I really never got started. Where should I begin? How should the routines for collision look like? All help are greatfully appreciated.

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
why would you need a collision system for a tetris game?

the pieces are set sizes and they move set distances.ie one grid square at a time..

for the basic tetris game you have a 2d grid of squares..the majority of the game is figuring our when to stop a piece from moving..you wouldnt use a "true collision" routine for this, youd just need to check the shape the the piece moving with the slots in your array. .

Share this post

Link to post
Share on other sites

I''m working on a tetris game too...and there''s only two moments when you copy your shape to the pit (change the matrix'' 0 to 1''s)
1: when the shape hit''s the bottom of the pit...just check if the lowest part of your shape is in the highest or lowest row of your matrix (depends on if the bottom of your pit is row 0 of the matrix or if the bottom of the pit is the highest row of your matrix.
2: your shape stops moving when the shape falls ontop of another shape.
hope that helps a bit....


Share this post

Link to post
Share on other sites

I see you guys are working on a tetris game. I was working on a tetris game that was going to be really super uber duper and crap. But as all things, I changed my mind, a playable demo is at


updated exe is nb111b.zip

anyhow, it works fairly well, and could use some optimization, it uses d3d8 and it''s 3d. main falling block rotates and crap. I use premodell3d x files for the block shapes.. hell i use x files for everything 3d. the music was made by my good buddy crimson, and the block artwork was made by my other good buddy valacar, http://valacar.waveforms.com (good freakin'' artist).
skybox was given to me by valacar even though he didn''t make it, it was for some quake 2 stage i hear.

anyhow, I''m giving the source to it away since i currently have no plans of finishing it to be internet ready, other then that it''s a fully playable tetris game w/out score saving (was going to get to that.. but well.. you know)


hope any of this source might help you out. i use BASS library for sound cuz i''m a lazy idiot, and crimson perfers IT''s. I am no longer doing game development because i have nothing to achieve and i see 12 year old kids doing stuff i only wish i could. i posted in another forum some MD2 code i had made that is pretty fast, although the loading code could probably use some sort of optimization although it''s pretty clean and easy to read. it can be downloaded at


everything posted here is for dx8.0 or 8.0a or some crap.
I am suffering from severe wisdom tooth pain headaches lately so my thought process is out the freakin'' window.

anyhow, if you have any questions about the code or any comments etc, don''t expect immediate reply...

Head Coder (only coder,etc)
Khaotix Software Inc.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!