JPanel image movement problem
807606May 25 2007 — edited May 26 2007Hi.
I had an end year project in my Computer Science class (highschool) and me and my partner chose to make a birds eye view game where you would move up, down, left, and right and attack enemies. The controls and movement were supposed to have been reminiscent of Legend of Zelda 1 on the nes.
Our problem is how the character is moving so far. When you press any of the arrow keys, he starts moving until you let go. But instead of moving smoothly, he starts and stops abruptly and quickly and then moves normally.
I used a buffered image object for the character and had him drawn on the JPanel, and on keyPress() it would increase/decrease the y or x accodringly. The only problem was the movement.
Any suggestions?