A Tetris Clone (VB5/6) | CodeGuru

A Tetris Clone (VB5/6)

This excellent project shows how to create a Tetris Game in VB5 (and VB6) using just the standard VB controls. Difference with Other Tetris Games: works with levels, with different widths get rid of all ‘yellow balls’ is enough to go to the next level The Game After you launch the program, you always start […]

Written By
CodeGuru Staff
CodeGuru Staff
Jan 29, 2004
2 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

This excellent project shows how to create a Tetris Game in VB5 (and VB6) using just the standard VB controls.

Screen-Shot

Difference with Other Tetris Games:


  • works with levels, with different widths

  • get rid of all ‘yellow balls’ is enough to go to the next level

The Game

After you launch the program, you always start at level 0. Unless you close the application you can play the game again and again, moving up the levels when you pass at least 3 levels in one game. For instance, if you don’t get to level 3 in your first game, you will have to restart at level 0. On the other hand if you end at level 14, you’ll be able to restart at level 12.

There are 100 levels at present. For every level you can find a trick to pass through it. Without this tricks you will have a hard time to pass levels. When there are no more levels, you will get random levels instead. Of course this means you will have to pass a hundred levels before you reach this point.

Advertisement

Controls


  • left/right cursor – move falling piece left/right

  • up cursor – rotate falling piece

  • down cursor – speed up fall rate of piece

  • space – fast dropdown of falling piece

Rules of the Game

As soon as all ‘yellow balls’ are removed from the playing field, you can resume with the next level. When the ‘Extend with balls’ flag is set, new ‘yellow balls’ will appear as a kind of falling pieces. They can be a great help in certain situation. They can be a terrible nuissance in other situations.

Score Counting

Per piece     100
Per line      1000
Per level     100000 divided by the no. of lines you needed to pass
              through the level --> the less lines, the more points
              you get
Per 5 levels  50000
PROJECT NAME: stris.vbp

ENVIRONMENT: This is a VB5 project, which will run under Windows 9x.
             No other than basic VB-controls are used.

YOU CAN LEARN:  How to build a (tetris) game.

COPYRIGHT: None. I made the code myself and everybody is free
           to use it.

RUNTIME FILES: stris.exe
               levels.dat
               strishelp.txt

CODE FILES: stris.vbp/.vbw
            frmDial.frm/.frx
            frmStris.frm/.frx

            stris.bas

            nstris.ico
            F8blk.bmp
            help.ico

Download Zipped Project File (37k)

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.