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.

2D All the way! / i need help with the control input for my pong game.

Author
Message
The Nerd
22
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 16th Nov 2004 03:34
Hi all


Well im trying to make my first game ever a little pong game.
So far i have mde the code to load the media(bats, ball).
Now i have placed the bats and the ball(Download the screenshot to see a pic of how it looks).

Here is the code of my Pong game:



Now i have tried figure out how to make the control input for the bat and i just dont know how to make it so does anyone here know how to make the control input of a sprite so when i hit the Up arrow the bat will go up and when i hit the down arrow the sprite will go down?
If anyone will help me please make a little snippet with a that control code.



-Waggames

wanna join Waggames?
then visit our site at : http://www.freewebs.com/waggames
my old forum name was: The Nerd
DaedalusX
22
Years of Service
User Offline
Joined: 10th Mar 2004
Location:
Posted: 16th Nov 2004 06:29


this should work. up + downkeys for left bat. control and shift key for enemy bat. let me kno if it doesnt work.

Daedalus
The Nerd
22
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 16th Nov 2004 15:24
Thanks man it work!

now i need to make the ball is that hard to make the ball go around on the screen?



Waggames

wanna join Waggames?
then visit our site at : http://www.freewebs.com/waggames
my old forum name was: The Nerd

Login to post a reply

Server time is: 2026-06-11 17:33:50
Your offset time is: 2026-06-11 17:33:50