I\'m developing a very simple version of R-Type as work for the university, but despite it works, the craft velocity is a lot of slow, so the movement is ugly and clumsy. I
fondo
should already be scaled to 1200x600.super.paint(g)
needed? You might also use paintComponent
.The event handling (you seem to be moving by 1 pixel on key down), must be done correctly. I would have set the direction and speed (1px), and leave it to a swing timer to do the continuous moving.
Repainting best is done resilient/flexible: repaint(20L)
(50 frames per second);
events like key-down maybe with EventQueue.invokeLater(new Runnable() { ... });
.
Especially you might use repaint with the changed area.