This is a quick test I cooked up to try out 'directional scrolling'. Directional scrolling differs from normal scrolling systems. In your average scrolling game, the arrow keys can be used to move left/right/up/down. In directional scrolling, you use the arrow keys to rotate and move forwards (for example, if making a space shooter game with a scrolling background, you would want the ship to move in the direction it is facing). --------------------------------- INSTRUCTIONS: - Use the left/right arrow keys to rotate. - Use the up arrow to accelerate - Press the 'a' key to bring up key variables. You can change their values with the sliders: - Maximum Velocity > How fast you can go - Acceleration Factor > How quickly you accelerate - Rotation Factor > How fast you rotate - Deceleration Speed > How quickly you stop after releasing the up arrow. --------------------------------- HOW IT WORKS: Whenever an object moves in 2D space, this motion is comprised of two elements: distance travelled along the x-axis, and distance travelled along the y-axis. This is more commonly referred to as a Vector. In the project, when the up arrow is pressed, this vector needs to be calculated. If you draw a straight line coming out from the front of the character, you can turn that into a right angle triangle with the character at one of the corners. The base of the triangle is your x distance, and the height of the triangle is your y distance. We can calculate the lengths of the sides of this triangle by using the Sine (Sin) function for x, and Cosine (Cos) function for y. We then add these Vector units to two variables, xVelocity and yVelocity, and change the scrollX and scrollY variables by these values, respectively.