GML Scripts Library
Welcome to the GML Scripts Library, it’s the one stop shop for all your GameMaker Scripts. I have worked with GameMaker for over a decade and have provided my own collection of useful scripts.
Welcome
The mission of GML Scripts Library is to provide and collate the highest quality GameMaker Studio scripts available. These scripts are completely free for use in your GameMaker projects. Credit is never required but is always appreciated.
If you have a useful script, or have improved an existing one, please consider contacting me here , then I’ll happily add the script to our ever growing database.
Would you like to view more GameMaker resources? View our main resources page.
Script Repository
Here you’ll find links to the various categories of scripts. They are organized similarly to the GML Reference. In addition to basic usage notes, detailed commentaries accompany a growing number of scripts.
Computation
- Base Conversion
- Bitwise
- Data Encoding
- Data Encryption
- Data Hashing
- Date-Time
- Geometry
- Parametic Functions
- bias
- boxstep
- gain
- gammacorrect
- map_range
- pulse
- smoothstep
- spline
- spline4
- step
- Probability
- combination
- erf
- exp_dist
- factorial
- gauss
- permutation
- random_weighted
- roll_dice
- Real Numbers
- acos
- asin
- factor
- factor_quadratic
- fibonacci
- gcd
- is_even
- is_factor
- is_odd
- is_power
- lcm
- next_pow2
- round_fixed
- select
- select_index
- select_relative
- select_relative_wrap
- sum_interval
- toggle(b)
- Strings
- number_format
- speakable_password
- string_add_spaces
- string_extract
- string_left
- string_limit
- string_lpad
- string_ltrim
- string_nato
- string_parse
- string_parse_number
- string_parse_single
- string_random
- string_remove_whitespace
- string_reverse
- string_right
- string_rpad
- string_rpos
- string_rtrim
- string_shuffle
- string_split
- string_stagger_case
- string_trim
- string_ucfirst
- string_ucwords
- string_wordwrap
Data Structures
- Arrays
- array_select_relative
- array_select_relative_wrap
- explode
- explode_real
- implode
- implode_real
- Grids
- ds_grid_delete_column
- ds_grid_delete_row
- ds_grid_draw
- ds_grid_duplicate
- ds_grid_filter_gaussian
- ds_grid_filter_gaussian_wrap
- ds_grid_flood_fill
- ds_grid_get_bicubic
- ds_grid_get_bilinear
- ds_grid_mirror
- ds_grid_swap_columns
- ds_grid_swap_rows
- ds_grid_translate
- Lists
- ds_list_add_list
- ds_list_add_map
- ds_list_cv
- ds_list_flip
- ds_list_geometric_mean
- ds_list_max
- ds_list_mean
- ds_list_median
- ds_list_min
- ds_list_pop_standard_deviation
- ds_list_range
- ds_list_select_relative
- ds_list_select_relative_wrap
- ds_list_standard_deviation
- ds_list_standard_score
- ds_list_sum
- ds_list_sum_of_squares
- ds_list_sum_squares
- ds_list_variance
- ds_list_vmr
- Maps
- ds_map_clone
- ds_map_deep_clone
- ds_map_default_value
- ds_map_load
- ds_map_mirror
- ds_map_save
Files
- Input and Output
- file_bin_read_word
- file_bin_seek_relative
- file_bin_write_word
- file_text_open_read_all
- file_text_open_write_all
- save_screenshot
Gameplay
- Artificial Intelligence
- intercept_course
- motion_predict
- Collisions
- collision_line_first
- collision_normal
- collision_triangle
- range_finder
- Instances
- Movement
- ease_towards_direction
- jump_to_mouse
- move_bounce_rectangle
- move_follow
- move_to_line
- turn_towards_direction
Graphics
- Backgrounds
- draw_background_tiled_area
- draw_background_tiled_area_ext
- Colour
- Drawing
- draw_arc
- draw_button
- draw_chord
- draw_crosshair
- draw_crosshair_ext
- draw_crosshair_width
- draw_crosshair_width_ext
- draw_curve
- draw_pie
- draw_rectangle_dashed
- draw_rectangle_dashed_color
- draw_rectangle_inverted
- draw_roundrect_ext
- Shaders
- shader_set_uniform_color
- shader_set_uniform_rgba
- Sprites
- draw_sprite_flip_ext
- draw_sprite_halfpixel
- draw_sprite_hud
- draw_sprite_inverted
- draw_sprite_inverted_ext
- draw_sprite_percent
- draw_sprite_rectangle
- draw_sprite_shear
- draw_sprite_stretched_direction
- draw_sprite_tiled_area
- draw_sprite_tiled_area_ext
- draw_sprite_wave
- draw_sprite_wave_ext
- motion_blur
- Surfaces
- draw_surface_center
- draw_surface_center_ext
- draw_surface_center_rotate
- surface_create_clear
- Text
- draw_text_hud
- draw_text_shadow
- string_limit_width
- string_wordwrap_width
3D
- Models
- d3d_model_load
- d3d_model_copy
Interaction
- Gamepad
- joystick_get_button
- Mouse
- draw_get_button
Platform
- Device
- device_is_desktop
- device_is_web
Resources
- Management
- map_backgrounds
- map_fonts
- map_objects
- map_paths
- map_rooms
- map_sounds
- map_sprites
- map_timelines
- Sprites
- sprite_desaturate
- sprite_edit_begin
- sprite_invert_color
- sprite_replace_color
- sprite_replace_color_blend
Related links
