Search found 3 matches

by Marksie
Sat Jun 18, 2016 4:39 am
Forum: Game Development
Topic: My Pong Game
Replies: 3
Views: 7295

Re: My Pong Game

I have implemented some basic code to get the computer paddle moving:

Code: Select all

//Move the computer controlled paddle

		//Move the paddle up
		if (BallPos.y < PaddlePos.y)
		{
			PCrectangle.move(0, -1);
		}

		//Move the paddle down
		if (BallPos.y > PaddlePos.y)
		{
			PCrectangle.move(0, 1);
		}
by Marksie
Sat Jun 18, 2016 4:05 am
Forum: Game Development
Topic: My Pong Game
Replies: 3
Views: 7295

Re: My Pong Game

OK I have gotten up early this morning and decided to crack on with this modern day masterpiece. I have gotten the ball moving, so far it heads towards the left hand side of the screen. I have added some basic collision detection as per below, this means that if the ball hits my paddle it changes th...
by Marksie
Fri Jun 17, 2016 4:44 pm
Forum: Game Development
Topic: My Pong Game
Replies: 3
Views: 7295

My Pong Game

Hi all, I have just set up SFML on Visual Studio and I am attempting my first ever graphical game. I have decided to jump in right at the deep end and go for Pong. Please see below for my progress so far. Pong1.PNG So far I can move the left hand paddle up and down. No collision detection so it just...