I want to move 2 characters simultaneously on screen when their respective keys are pressed.
I am making a java swing game. Wherein I want take inputs from 2 players using "AWSD" and another using "up down right left arrow" . I want both the character to move simultaneously when pressed their respective keys.I thought of making 2 threads and calling them everytime the key is pressed, but isn't working as expected. Any Solutions?