Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / simple Pong

Author
Message
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 13th Apr 2006 19:28
yeah i know, just another pong without media, but i was bored:p


Too Sexy
flashing snall
19
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 14th Apr 2006 03:07
how do you get the ounce to work, good game, ai could be better...

dont assume cause ull make an ass out of you and me!
Evil Booger
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: My evil lair
Posted: 14th Apr 2006 06:38
you can change the ai difficulty...

boogers will take over the world
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 14th Apr 2006 10:32
Quote: "how do you get the ounce to work, good game, ai could be better..."

here nx# and ny# are the unit vectors of speed which is added to the balls position, now if sprite hits to the player stick or enemy stick, we just get the inverse of nx# to bounce the ball and on the top and bottom sides we get the inverse of ny# shown below



ai could be better yes, but than it wouldnt be a simple pong game:p aand yes you can change the difficulty level with a variable..



1.0 is very clever means 1.0 is faster than the balls speed so it will catch the ball everytime, no chance to miss it..

Too Sexy

Login to post a reply

Server time is: 2024-11-23 07:40:45
Your offset time is: 2024-11-23 07:40:45