Drawing Basic Forms

This section shows the functions available for drawing basic shapes and forms.

GameMaker: Studio 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 colour And Blending).

Drawing Shapes

The following drawing functions exist that can be used to draw basic shapes:

  1. draw_arrow
  2. draw_circle
  3. draw_circle_colour
  4. draw_ellipse
  5. draw_ellipse_colour
  6. draw_line
  7. draw_line_colour
  8. draw_line_width
  9. draw_line_width_colour
  10. draw_point
  11. draw_point_colour
  12. draw_rectangle
  13. draw_rectangle_colour
  14. draw_roundrect
  15. draw_roundrect_colour
  16. draw_roundrect_ext
  17. draw_roundrect_colour_ext
  18. draw_triangle
  19. draw_triangle_colour

Further Drawing Functions

The following functions are also included in GameMaker: Studio to help better control what you draw on the screen:

  1. draw_set_circle_precision
  2. draw_button
  3. draw_healthbar
  4. draw_path

Back: Drawing
© Copyright YoYo Games Ltd. 2018 All Rights Reserved