-
Tetris Tutorial??
Hi there, I am looking for a step by step tetris tutorial for VB 5 or vb 2005 express ed.
I am having to write a tetris program for a project in my course, but I'm really not sure what to do, and we have been instructed that we may use any resource we can aslong as we do not just copy and paste. We have been encouraged to find tutorials, sadly I can't find any.
If anyone knows of a good tutorial or can write one or something I'd be greatfull
Greg
-
Re: Tetris Tutorial??
-
Re: Tetris Tutorial??
Hi there, Thanks for the link however, this is the actual finnished version, I am looking for a tutorial. I'm not a cheat and I do not want to copy some one elses work. All I ask for is a tutorial to teach me so I can then do it myself. So if there is one I would be greatfull if I was told about it :)
Greg
-
Re: Tetris Tutorial??
Because of the graphics involved, games programming is generally done in some form of C
I actually did find a couple of tutorials....none for Visual Basic.
-
Re: Tetris Tutorial??
Actually more members have been developing their games in .NET
timeshiffer wrote some missle defense game in it. Might want to see if he can provide any help.
-
Re: Tetris Tutorial??
I know that games arent usually done in VB. But in this course the environment we use is VB and every class that has taken the course does their game in VB. It just seems that tetris is a very rare game to be done with VB.
-
Re: Tetris Tutorial??
I've got an example of "Columns" in VB.NET that I wrote. I haven't done Tetris yet. I suspect a Tetris engine would work the same way. Just an (X,Y) array of Integers (each number a color of block, 0 means empty area). You have 19 different piece orientations from its 7 different pieces (3 w/ 4 rotations = 12, 3 w/ 2 rotations = 6, 1 w/ 1 rotation = 1) so you code the arrays for each.
You have a "heartbeat" timer that causes the piece to drop. When a heartbeat happens, you check if the row below it is clear and move the piece down one row or make it "stick" by changing the main board's X,Y array.
If a piece sticks, you check each row for completion and mark any that are complete. If any rows are complete, you halt the heartbeat timer, change those rows to all 0's. Calculate the score for completing them and run a routine to "collapse down" everything above it. When everything is collapsed, you repeat the check to make sure there are no new rows now complete and repeat until everything is collapsed and no more rows are complete. Then you start back up the heartbeat to resume the gameplay.
Graphics for a game like this is always secondary to its game engine mechanics. You can ALWAYS do graphics.
If you sit down and think through it, it shouldn't take you more than a few days to code. It's all about playing with arrays.
Tetris would be a VERY easy game to do in VB.NET.