Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

qbasic collion detection

Status
Not open for further replies.

Megaterd77

Programmer
Aug 27, 2003
1
US
Can anyone help me with collision detection in my Tetris game? I am using screen 7, and my game pieces are placed on the screen using GET and PUT.
 
It depends on how you are doing your tetris game, post some of your code for us

If a man says something in the forest and no woman hears it is he still wrong?
 
before you add one to the y of your sprite (the tetris tile) use the point function to check where you're heading. now, say you're nowhere near the bottom/other tiles. that means the pointing will return 0, for the colour 0. (the colour the screen is) so you add y and loop again. however, if you're about to hit a tile/the bottom, the pointing will return a number other than 0. then you stop handling that sprite and start handling another. if done right, this can be very accurate.

sorry for not giving you any code or explaining too well. i'm kinda rushing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top