SemiTransparent

Ok, I've taken the plunge and decided to write my own Pong game (you have to start somewhere, right!).

I thought this would be a good starting point as it will get my used to sprites and collision detection..

I've managed to get a sprite working and bouncing of the edge of the graphics viewport but I'm using simple "if ( texturePos.X > viewPoirt.Width )" code to detect the edges of the viewport.

I'd like to encompass my texture in a boundingbox (boundingsphere) and set up 4 planes as the walls.

I'm not much of a star in the maths department and I can't get my head around a plane having 4 co-ordinates...

Would someone be kind enough to help me understand how I describe the planes with 4 co-ordinates Alteratively, if someone be kind enough to offer some code showing how to set up 4 planes to describe the edges of the viewing area so that I can disect it and hopefully gain insight that way.

Kind regards
Mark.




Re: XNA Game Studio Express XNA : Absolute Beginner

Glenn Wilson

I am going to move the thread to the XNA GSE Groups, there you will be able to find heaps of information that will help you get started. Also if you do a quick search for XNA Pong you will find that a lot of people have completed their own version.






Re: XNA Game Studio Express XNA : Absolute Beginner

SemiTransparent

Glen, thanks for not just summarily deleting this post. I appreciate that these forums must see dozens of posts similar to mine and I tried searching for content I though appropriate. I must admit though that I didn't look for the obvious "Pong" threads.






Re: XNA Game Studio Express XNA : Absolute Beginner

Glenn Wilson

You might want to have a look at the Zmans article on Coding4fun, Tiny Tennis using XNA.