VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This is v2.0. This version of the game is a 1 player game where you are a space ship trying to kill

by Harn (8 Submissions)
Category: Games
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 12th October 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This is v2.0. This version of the game is a 1 player game where you are a space ship trying to kill all of these aliens coming at you. It has

Rate This is v2.0. This version of the game is a 1 player game where you are a space ship trying to kill






If KeyCode = vbKeyW Then
p2 = 1

End If
If KeyCode = vbKeyD Then
p2 = 2

End If
If KeyCode = vbKeyA Then
p2 = 3
End If
If KeyCode = vbKeyS Then
p2 = 4

End If



If KeyCode = vbKeyTab Then
    Line2(slug).X1 = Image2.Left + 660
    Line2(slug).X2 = Image2.Left + 660
    Line2(slug).Y1 = Image2.Top
    Line2(slug).Y2 = Image2.Top + 100
    Line2(slug).Visible = True
    slug = slug + 1
    If slug = 40 Then slug = 0
    End If
    



End Sub


Private Sub Timer1_Timer()
Dim i As Integer
Dim b As Integer
Dim o As Integer
Dim hits As Integer
Dim score2 As Integer
Dim death As Integer
Dim nm As String

    For i = 0 To 40 'each line
       
        Line2(i).Y1 = Line2(i).Y1 - 300
        Line2(i).Y2 = Line2(i).Y2 - 300

        
        For b = 0 To 54
            If Image3(b).Left < Line2(i).X1 And _
                Image3(b).Left + 1605 > Line2(i).X1 And _
                Image3(b).Top < Line2(i).Y1 And _
                Image3(b).Top + 870 > Line2(i).Y1 Then
                score = score + 1
                Label1 = score
                death = death + 1
                Line2(i).X1 = -100
                Line2(i).X2 = -100
                Image3(b).Left = -3000
                
            End If
        Next b
    Next i
    
   
    
    If score >= 54 Then
                        MsgBox "You win!"
                        nm = InputBox("Enter your name for a chance for a high score")
                        MsgBox nm & " " & score + joop
                        If death + (125 - joop) > oldscore Then
                            Open "S:\temp.txt" For Output As #1
                            Print #1, nm
                            Print #1, death + (125 - joop)
                            Close #1
                            MsgBox "You got the high score!"
                        Else
                            MsgBox "You failed."
                        End If
                        End
    End If
                  
    For b = 0 To 40
          
         If Abs(Image2.Left + 660 - (Image3(b).Left + 800)) < 1460 And _
             Abs(Image2.Top + 760 - (Image3(b).Top + 435)) < 1195 Then
                    
                   joop = joop + 1
                   Label2 = (100 - joop)
                 End If
                 Next b
   If joop >= 125 Then
      MsgBox "You lose!"
      End
       End If
                   
    

End Sub

Private Sub Timer2_Timer()
If p1 = 1 Then
image1.Top = image1.Top - 100
End If
If p1 = 2 Then
image1.Left = image1.Left + 100
End If
If p1 = 3 Then
image1.Left = image1.Left - 100
End If
If p1 = 4 Then
image1.Top = image1.Top + 100
End If



If p2 = 1 Then
Image2.Top = Image2.Top - 100
End If
If p2 = 2 Then
Image2.Left = Image2.Left + 100
End If
If p2 = 3 Then
Image2.Left = Image2.Left - 100
End If
If p2 = 4 Then
Image2.Top = Image2.Top + 100
End If
End Sub


Private Sub Timer3_Timer()
For h = 0 To 54
Image3(h).Top = Image3(h).Top + 100
If Image3(h).Top > Form1.Height Then
    Image3(h).Top = 0 - Image3(h).Height
    Image3(h).Left = Image3(h).Left + Rnd * 100 - 50
End If
Next h

End Sub


Download this snippet    Add to My Saved Code

This is v2.0. This version of the game is a 1 player game where you are a space ship trying to kill Comments

No comments have been posted about This is v2.0. This version of the game is a 1 player game where you are a space ship trying to kill. Why not be the first to post a comment about This is v2.0. This version of the game is a 1 player game where you are a space ship trying to kill.

Post your comment

Subject:
Message:
0/1000 characters