In my game, i have a class called ‘Inputs’ which contains keylisteners. If a movement key is pressed, this class adjusts the players x,y accordingly.
The actual drawing is done in a class called ‘MapRenderer’ which is responsible for drawing the map and all the sprites (including the player) in their initial positions at the start.
Then the main method of my ‘World’ class is what setups the screen to fullscreen, loads the map, and calls the draw method of the MapRenderer class to get it all going.
My question is, how/where should i redraw the screen after every movement (i.e. everytime a keylistener updates a sprites position)?
Thanks.