Nov 162013

This time lets see how, without any external texture, we will animate forms and use collision detection.

To illustrate this, lets make a Pong game.

We will need to draw 3 rectangles : 2 bars and one ball.
The update method will manage check the keyboard, move the positions of each rectangle and check collision thru the intersect rectangle method.

The code : XNA_DEMO_17
up/down for player2, z/s for player1 : as simple as that.

See below a short video.


 Posted by at 18 h 58 min

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>



Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.