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.
Here is the you see how the game is now:
Game 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.
You can download the full source code
here [ March 12, 2005: Message edited by: Tomm Schuman ]
[ March 12, 2005: Message edited by: Tomm Schuman ]
[ March 12, 2005: Message edited by: Tomm Schuman ]