GameMaker Studio 2 has a whole collection of functions available for drawing different forms and shapes. These functions should only ever be used in the draw event of an instance (you can use them elsewhere but you won't see anything!) and create purely graphic effects, which means that they do not generate collision events as those can only be done through the sprite or collision mask that has been assigned to an instance. All these functions are affected by the current draw colour, alpha and blend mode (see the section on Colour).
The following drawing functions exist for drawing basic shapes. Note that these functions are slow to call and only supplied as basic drawing tools:
- draw_arrow
- draw_circle
- draw_circle_colour
- draw_ellipse
- draw_ellipse_colour
- draw_line
- draw_line_colour
- draw_line_width
- draw_line_width_colour
- draw_point
- draw_point_colour
- draw_rectangle
- draw_rectangle_colour
- draw_roundrect
- draw_roundrect_colour
- draw_roundrect_ext
- draw_roundrect_colour_ext
- draw_triangle
- draw_triangle_colour
The following functions are also included in GameMaker Studio 2 to set drawing precision and draw some very specific things: