Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - PM-Heavy

Pages: [1]
1
Graphics / [Solved] Problems with collision detection
« on: July 16, 2008, 01:36:24 pm »
Right now I'm using Hiura's method, except the ball is a square.  That's why I wrote my own ball and paddle classes, I wanted functions to return the top/right/bottom/left of the sprites.

I don't plan on ever rotating the sprites, so I may try Puck's way.  I'll also check out the wiki.  I've got a few friends who know some French, so they might be able to help me if Google translate can't.  :)

Thanks a lot guys  :D

2
Graphics / [Solved] Problems with collision detection
« on: July 15, 2008, 08:41:09 pm »
Sorry if this isn't the right forum, I'm not sure where it best fits.

I'm working on a pong clone, but am having problems getting collision detection for the left paddle working.  The code is the same for both paddles, but it doesn't always work for the left paddle.  Some times the ball goes right through it, sometimes it works.  I'm using the first approach given in  this article, but with 'if' statements instead of a function.  I had the game working with SFML 1.2, but I wanted to rewrite it with 1.3.  I've created my own Ball and Paddle classes derived from sf::Sprite, and am using sf::Vector2 to get positions of the sides.

I can post the code if it will help, but someone will have to tell me how.

Thanks in advance for any help.

Pages: [1]
anything