I was watching your tutorial and noticed that you created the Input class witch is largely unneeded. You can do the same thing it does more efficiently with
while (Keyboard.next()) {
char key = Keyboard.getEventCharacter();
boolean state = Keyboard.getEventKeyState(); // If the key is held down (true) or released (false)
// TODO: Handle key clicks
}
Another thing to look into is using
int NUM_KEYCODES = Keyboard.getKeyCount();
instead of the current constant.
I was watching your tutorial and noticed that you created the Input class witch is largely unneeded. You can do the same thing it does more efficiently with
Another thing to look into is using
instead of the current constant.