| | |
Image Animation Help
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Dec 2008
Posts: 7
Reputation:
Solved Threads: 0
Hi guys
i'm currently creating a vb6 version of the arcade game "Stacker"
http://en.wikipedia.org/wiki/Stacker_(game)
The above link will give a detailed version of what i'm trying to create however for those who just want a rundown here it is:
There is a row of three cubes which move side to side on the screen, at the first row. When the player pushes the start/stop button, the row of squares will stop. Then, another row of three moving squares appears above the previous row, moving faster than the one before it. If the squares do not align directly above the previous set, any overhanging squares will be removed. If the player misses completely, the game is over. The number of available squares is automatically reduced to two, then one, during the game. The goal is to consistently get the squares directly above the previous set, "stacking" them to the minor prize and ultimately major prize levels.
In this case however the prizes will be replaced by points.
At the moment i'm having trouble figuring out the code for animation reversal when the blocks hit the side of the screen and change direction.
Any help here would be greatly appreciated
and thanks in advance
i'm currently creating a vb6 version of the arcade game "Stacker"
http://en.wikipedia.org/wiki/Stacker_(game)
The above link will give a detailed version of what i'm trying to create however for those who just want a rundown here it is:
There is a row of three cubes which move side to side on the screen, at the first row. When the player pushes the start/stop button, the row of squares will stop. Then, another row of three moving squares appears above the previous row, moving faster than the one before it. If the squares do not align directly above the previous set, any overhanging squares will be removed. If the player misses completely, the game is over. The number of available squares is automatically reduced to two, then one, during the game. The goal is to consistently get the squares directly above the previous set, "stacking" them to the minor prize and ultimately major prize levels.
In this case however the prizes will be replaced by points.
At the moment i'm having trouble figuring out the code for animation reversal when the blocks hit the side of the screen and change direction.
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Dim Block(2) As BlockPart 'Sets the initial value of the block Private Sub Form_Load() Dim i As Long length = 3 For i = 0 To 2 Block(i).X = (95 - 34 * i) Block(i).Y = 410 ImgBlock(i).Left = Block(i).X ImgBlock(i).Top = Block(i).Y Block(i).Facing = 3 Next i End Sub Private Sub TmrMove_Timer() Dim i As Integer 'counter For i = 0 To 2 'for each frame ImgBlock(i).Left = ImgBlock(i).Left + 10 'move it right 10 Next i If ImgBlock(0).Left + ImgBlock(0).Width > ImgBackground.Width Then 'if at the edge of screen TmrMove.Enabled = False 'stop timer End If End Sub Private Sub CmdGo_Click() TmrMove.Enabled = True 'enable the timer End Sub
Any help here would be greatly appreciated
and thanks in advance
![]() |
Similar Threads
- animated pictures and .GIF files (Graphics and Multimedia)
- javascript image animation not working???? (JavaScript / DHTML / AJAX)
- java image animation not working???? (Java)
- Browser's File Interpreters (Computer Science)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Search code in a database
- Next Thread: make a data report with condition
Views: 264 | Replies: 0
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 429 2007 access activex add age append application basic beginner birth bmp c++ calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver struct subroutine table tags textbox timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





