Tetris Game
Tetris Game
Tetris Game
Tetris Game
Tetris Game
Tetris Game Tetris Game Tetris Game Tetris Game Tetris Game Tetris Game Tetris Game Tetris Game
Tetris Game Tetris Game
Tetris Game
Go Back  Xtreme Visual Basic Talk > > > Tetris Game


Reply
 
Thread Tools Display Modes
  #1  
Old 09-15-2009, 04:53 PM
Shaq32 Shaq32 is offline
Newcomer
 
Join Date: Jul 2009
Location: Rhode Island
Posts: 10
Arrow Tetris Game


I'm working on a Tetris game in school and I'm really falling behind because I've been stuck for about two weeks. I have the pieces rotating fine, and falling fine, but I can't get the blocks to stop right. I'm using the GetPixel function and I'm trying to make it so it works like this.

Code:
'If the top of the block = one of the shape border colors then
'     If the bottom of the block = one of the shape border colors then
'         stop the block and drop a new piece
'     Else
'         keep moving the block down
'     End if
'End if
I've spent about 10-15 hours trying different ways to get this to work. I've already tried using 2d arrays and stuff, and it's just too complicated. If I can get it working just using getpixel, that would be great. So if someone doesn't mind downloading my Tetris game and trying to get the blocks to stop right, I'd really appreciate it.
Attached Files
File Type: zip Tetris.zip (298.7 KB, 32 views)
Reply With Quote
  #2  
Old 09-21-2009, 04:51 PM
FireBot FireBot is offline
Centurion
 
Join Date: Mar 2008
Posts: 100
Default

I don't see how you're going to complete all the logic behind Tetris without a 2d array or a lot of hacks to do what a 2d array would.
Reply With Quote
  #3  
Old 09-21-2009, 05:11 PM
Qua's Avatar
QuaTetris Game Qua is offline
Impetuous & volatile

* Expert *
 
Join Date: Apr 2005
Posts: 2,177
Default

While it definitely may be possible to do a tetris game using GetPixel I would strongly advice against it. It's terrible performance, it's unintuitive and it's a far more complex solution than basing your work off 2- or even singular dimensional arrays.

I suggest you look into arrays as they're a crucial component of programming and you'll have to learn about them eventually anyway. They will simplify your current project and those to come.
__________________
Reading is the foundation for all knowledge - Unknown.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Tetris Game
Tetris Game
Tetris Game Tetris Game
Tetris Game
Tetris Game
Tetris Game Tetris Game Tetris Game Tetris Game Tetris Game Tetris Game Tetris Game
Tetris Game
Tetris Game
 
Tetris Game
Tetris Game
 
-->