Creating a fully-functional pong game. A step-by-step guide to creating a pong game in VB.NET
Posted 25 May 2015 - 06:11 AM
And one more thing i want to ask is, will the computer ever loose the game... ..it might be good if it does...if no..no problem..thanxx for the great tutorial...
Posted 25 May 2015 - 07:13 AM
Dim speed As Single = 10 ' Ball Speed
What happens if you change that value..?
Several people have mentioned changing the speed or allowing the computer to lose. Read the entire thread.
But I wanna increase this value when the game is on...I don't know how to do it...
Posted 25 May 2015 - 07:17 AM
Note that you do not have to quote the previous post in full, there is a REPLY button further down the page.
This post has been edited by andrewsw: 25 May 2015 - 07:23 AM
Posted 25 May 2015 - 10:38 PM
I want that as the ball bounces off the surface...the speed increases by 1...So, I added that line...but nothing happens..
If gameBall.Location.Y < 0 Then gameBall.Location = New Point(gameBall.Location.X, 0) yVel = -yVel speed+=1 End If
I think, every time the ball will bounce off the top wall...the speed of the ball will increase by 1..but nothings seems to happen...
Sorry, I am new to this site (in fact it's the second day... )...and I find it very helpful...
Posted 27 May 2015 - 12:32 AM
'bouncing the ball from top If Ball.Bounds.IntersectsWith(PictureBox1.Bounds) Then Ball.Location = New Point(Ball.Location.X, 45) yVel = -yVel If Game_Timer.Interval > 0 Then Game_Timer.Interval -= 5 End If End If '----
Now I am thinking how can I code so that the computer also looses some points