I have a problem in the movement in my game. I want it so that when the left key is pressed the player turns left and when the right key is pressed the player turns right. Then when the up key is pressed the player moves in the direction he's heading and when the down key is pressed the player moves the opposite way.
Is there anyway to make it possible to see the console from a webpage? Because I have some println statements which print out different values from the calculation. It could be easier to see whats wrong if you see them.
Here is the code I use to calculate the x and y cordinates based on the way the player is heading. The problem is somewhere in the if statements because the player will move 90 degrees okay but then the player moves very weird and starts another 90 degree turn. So please could someone help me making this work.
If you are running this as an applet in a browser under Windows, the Java plug-in usually adds an icon to the system tray next to the clock in the lower right corner. You can right click on this and open a console where your output will be displayed.