# Movement

Long considered the buggiest part of the game, we think we mostly have it figured out now :D The Schemaverse itself is a big x,y plane. You can travel to any portion of it as long as you have the fuel and time to get there.

## The Movement Process

There are two elements to movement, the first being how you command your ship and the second being how the game progresses ship movement based on those settings. You can change the target_speed and target_direction of your ship at any time. The system will continuesly try to meet these settings by burning fuel.

## Speed

A ships speed is how far it will move in one tic.

## Acceleration / Deceleration

Acceleration and deceleation will decrease a ships fuel by the exact amount of change. This is especially important to know when closing in on your destination. If you do have any enough fuel to stop your ship, it will continue on past the destination.

## Direction

A ships direction is a value between 0 and 360. Best way to describe this is to show this diagram:

Everything makes sense now? Wonderful.

### SHIP_COURSE_CONTROL(Ship ID, Target Speed, Target Direction, Destination)

This function is used to set the path of your ship. Once this function is executed, the ship will do two things each tic:
• Burn all fuel available to the ship to attempt to reach the target_speed and target_direction
• Slow down (and hopefully stop) if fuel is available once the destination is within reached
This function can also be called as SCC( ) if you want to save some keystrokes or screen space.

### Examples

The SCC( ) function is actually a bit versatile in how it can be used. Depending what variables you use with it, it may do some heavy lifting for you.
Move your ship, Torontonian, to the centre of the universe at the ships Max Speed
```SELECT SHIP_COURSE_CONTROL(id, max_speed, null, POINT(0,0))
FROM my_ships WHERE name='Torontonian'; ```

Move all your ships in the direction of 7 at a target speed of 7. No you don't actually want to do this...
` SELECT SHIP_COURSE_CONTROL(id, 7, 7 , null) FROM my_ships `

Move your Attack Fleet to the point (1337,1337). But do it while conserving fuel so you can stop!
```SELECT
id,
name,
SHIP_COURSE_CONTROL(id, current_fuel / 2 , null , POINT(1337, 1337))
FROM
my_ships
WHERE
name='Attack Fleet'; ```