|
-
Sep 9th, 2008, 06:02 AM
#1
Thread Starter
New Member
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
-
Sep 9th, 2008, 06:43 AM
#2
-
Sep 9th, 2008, 10:08 AM
#3
Thread Starter
New Member
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
-
Sep 9th, 2008, 11:42 AM
#4
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.
-
Sep 9th, 2008, 01:54 PM
#5
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Sep 9th, 2008, 04:01 PM
#6
Thread Starter
New Member
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.
-
Sep 9th, 2008, 04:13 PM
#7
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|