pong

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Lithumist
Posts: 4
Joined: Fri Aug 28, 2009 2:38 pm

pong

Post by Lithumist »

please can someone tell me how i would go about createing a 2d pong game in irrlicht.

I would like to know a game is constructed, what do i do first, are there any good ways of doing things ect...
Ravi08
Posts: 249
Joined: Thu Jul 17, 2008 12:25 pm

Post by Ravi08 »

u should look at the tuts especially the 6th tuthttp://irrlicht.sourceforge.net/tutorials.html
Lithumist
Posts: 4
Joined: Fri Aug 28, 2009 2:38 pm

Post by Lithumist »

Thanks :D


But what i would really like to know is how some one would make a game like this, not the actual code
mtbal
Posts: 9
Joined: Wed Aug 26, 2009 8:41 pm

Post by mtbal »

There will be three steps to making this.

1)Get all your graphics going.
This could be as simple as a black screen, a white circle, and a block for a paddle.
2)Get the ball and paddle moving.
See below*
3)Make it check to see if the ball misses the paddle.

That's the bare necessities, other things could be sound, a score counter, multilayer. (the possibilities are endless)

*This will require trig. You would start the ball moving at a certain angle (calculating the movement with sin & cos). When you want the ball to bounce, you find the opposite angle relative to the side it bounced off of, and that is the new angle. If the ball hits something other than the paddle or the top or bottom of the screen, then it doesn't bounce, and the player loses. If you want some more detailed info, (algorithms etc) just say so!

If you get this going, you could use matrices and calculate 3d pong! (the ball could bounce away from you!)

Good Luck!
Lithumist
Posts: 4
Joined: Fri Aug 28, 2009 2:38 pm

Post by Lithumist »

Thanks that really helps :D
Post Reply