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 explaining
the 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 the
first 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 always
more important so please don’t just paste some code and tell me to use it, thank you.