Tetris game

BlitzPlus Forums/BlitzPlus Programming/Tetris game

Ash_UK(Posted 2004) [#1]
Hi there people, could anyone please show me how to go about making a tetris clone. I'm not quite sure where to start :(
If anyone could help me,possibly show me some sort of tutorial, i would be very grateful.

Thankyou

DeViL


Ash_UK(Posted 2004) [#2]
Hello again, please, could someone help me out. I don't know where to start with a tetris game.

Thanks again

DeViL


WolRon(Posted 2004) [#3]
I would love to but don't have time. Here's a start though:

Create a grid of 10x20 squares.
Dim grid(10, 20)

It's automatically filled in with zeros. To place a block in any given location just enter a 1 (or you could even enter a 1 or 2 or 3 or 4 etc. to represent different colors).
grid(1,20) = 1
grid(2,20) = 3


Now to draw this to the screen you just use a For...Next loop.
For yiter = 1 to 20
  For xiter = 1 to 10
    If grid(xiter, yiter) > 0
      Rect xiter*40, yiter*40, 39, 39
    EndIf
  Next
Next


Try to figure out where to go from there...