Go Back   CodingForums.com > :: Server side development > Java and JSP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-19-2004, 05:27 PM   PM User | #1
warhammerdude20
Regular Coder

 
Join Date: Dec 2003
Posts: 132
Thanks: 0
Thanked 0 Times in 0 Posts
warhammerdude20 is an unknown quantity at this point
first java game question

hello,

i am making my first java game(pong) and i am about 1/2 there.

i am now just trying to get a ball to move around with the keyboard in preperation for the paddles. everything works fine exept for this:

public boolean keyDown(Event e,int key){
if(key==Event.LEFT) x_speed=1;
return true;
}

x_speed is the variable that moves the ball around horazontally.

why doesnt this work? the whole program is in the attachment and what it does is make a ball bounce around and when you press the left button, it should stop...

i hope im making sense...

Di
Attached Files
File Type: zip pong.zip (713 Bytes, 173 views)
warhammerdude20 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:39 PM.


Advertisement
Log in to turn off these ads.