Jump to content

Tetris in LabView problem with move blocks


Recommended Posts

Collision detection?  Basically each block (normally only one falls at a time) will keep incrementing until a stop condition is seen.  In your case it will be from the lowest block hitting the floor, but when the game goes on you could have any block hit another block forcing the whole 4 pixel object to stop moving down.  You already have in a shift register where your objects are, so I'd suggest doing something like shift down, then count the number of Trues in the array.  If they are less than the number of Trues before the shift then you know you shouldn't perform the shift and should revert back to where it was.  There are examples on the web of doing tetris in LabVIEW and LabVIEW even used to ship with a version of it in the example finder.  I can't seem to find it in modern versions but if I do I'll post it.  Here is one discussion with several demos.

https://forums.ni.com/t5/LabVIEW/Tetris-in-Labview/td-p/265716

Link to comment
  • 9 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.