Hey, I'm making a maze game, where the user is a picture I've got, and they have to move the picture using the arrow keys to get to the end of the maze. How do i make a picture into a character like that? Also, how do I assign the arrow keys to his movement?

For moving the picture around via the keys, look into KeyListeners. As far as the picture goes, you'll have to make the picture an object. The object draws the image to the screen. When keys are pressed, the KeyListener event methods within your object's class should redraw the picture the appropriate amount of pixels away. For example, if you want him to move 25 pixels every time the key is pressed, have it change the picture's location on the screen to compensate for those 25 pixels, then redraw.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.