Ok I have a square. I want to use the 4 directional keyboard buttons to move it around by changing its x and y cooardinates. I can move it anyplace except for diagonally. This is because only the last pressed and held down key is firing the event and keyTyped( ). Therefore, to move diagonally, you have to do something like this: UP, RIGHT, UP,RIGHT...etc rather than keeping the buttons pressed down simultaneously which will result in a non-diagonal movement according to the last pressed button. If anyone can help me by first explainingthe concept of what I should do, then if necessary show me some code I would appreciate it.

Another thing is, when I want to move into a certain direction, let's say to the right, I keep pressing right. However, the first movement is a movement followed by a small delay, then the movement continues normally. If you want to know what I mean just keep holding down a letter button now and see how thefirst typed letter and the rest of the letters are not typed in the same speed. How do I get rid of this to make the movement more appropriate? Concept is alwaysmore important so please don't just paste some code and tell me to use it, thank you.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org