ARTICLE

Tetris Game in VB.NET

Posted by Andrew McCarter Articles | Visual Basic 2010 June 18, 2003
I have written a Tetris clone that demonstrates how to use off-screen graphics buffering for smooth animation and utilizes a multi-dimensional array approach to designing a game grid.
Download Files:
 
Reader Level:

 

Overview

I have written a Tetris clone that demonstrates how to use off-screen graphics buffering for smooth animation and utilizes a multi-dimensional array approach to designing a game grid. The classes are largely self-explanatory and the techniques are documented in code well enough to explain what is going on. I have enclosed two screen shots as well. A summary of the classes is as follows: 

LayoutForm.cs this is merely the GUI for the game and controls all keyboard input.
Screen.cs                     this class handles the creation of off-screen graphics used for double-buffering.
Shape.cs             this class takes care of creating the shape and positioning it in the game grid.
GameGrid.cs                 this class represents the game grid - comprised of a multi-dimensional array.

share this article :
post comment
 

Nothing loads, it's just a black screen. I DO NOT RECOMMEND THIS.

Posted by Anton Oct 29, 2010

Garbage

Posted by col1blb Jun 25, 2009

Hi there,
I teach VB.NET and would like to offer students the oppportunity to create video games. Do you have any suggestions for resources I can use to teach from?
Thanks so much,
K

Posted by Karen Siebrass Jun 01, 2009
Nevron Diagram
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
    Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Team Foundation Server Hosting
Become a Sponsor