More

Variables

Here are some of the GameMaker variables you'll be using:

  • x
  • y
  • hspeed 
  • vspeed 
  • speed
  • direction
  • image_index
  • mouse_x
  • mouse_y
  • room_height
  • room_width

(x,Y)

The Origin (0,0) of the plane is usually in the upper left corner.

  • x = positive number = to the right
  • x = negative number = to the left
  • y = positive number = down
  • y = negative number = up

Hspeed, vspeed

This also applies to GameMaker variables for horizontal speed (hspeed) and vertical speed (vspeed):

  • hspeed > 1,  = to the right
  • hspeed < -1, = to the left
  • vspeed > 1 = down 
  • vspeed < -1, = up 

Which way is up?

Directions are measured in degrees, where 0 degrees is to the right, 90 degrees is straight up, 180 degrees is to the left, 270 degrees is straight down.