New Project
I m starting another game project with vb, I've decided to try to recreate tetris. If anyone has any ideas that might be able to help my case I'd appreciate it.
Ideas..?
You have falling blocks, I thought that was all it was!
Well, how are you going to draw the blocks? For simple coloured blocks you could be lazy and use the line command to fill squares ( Line(topLeftX, topLeftY)-(btmRightX, btmRightY),Colour,BF ) - for textured blocks you could move up to BitBlt to splat image data from one hDC onto another.
I assume you know how to "double buffer" in VB to stop flicker? Let's say you were drawing to a picture box "renderArea". Set the "AutoRedraw" property to true, then do this:
renderArea.Cls ' Clear the screen
'
' Draw stuff
'
renderArea.Refresh ' Force the picture box to appear
Could you be a bit more specific on what you need to know?
You have falling blocks, I thought that was all it was!
Well, how are you going to draw the blocks? For simple coloured blocks you could be lazy and use the line command to fill squares ( Line(topLeftX, topLeftY)-(btmRightX, btmRightY),Colour,BF ) - for textured blocks you could move up to BitBlt to splat image data from one hDC onto another.
I assume you know how to "double buffer" in VB to stop flicker? Let's say you were drawing to a picture box "renderArea". Set the "AutoRedraw" property to true, then do this:
renderArea.Cls ' Clear the screen
'
' Draw stuff
'
renderArea.Refresh ' Force the picture box to appear
Could you be a bit more specific on what you need to know?
I just released the source to my tetris clone. It's pretty ugly, but you can have a look at it. Might be a bit different though as mine was done in C++ and SDL.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement