For those users coming from GameMaker: Studio 1.4 it may be a bit confusing using GameMaker Studio 2 at first since there have been a number of changes made to the way that project resources, editing and coding are handled. These changes mean that the neither the IDE nor the GameMaker Language (GML) supports the items listed below. However, that does not mean that you cannot import games made with GameMaker: Studio 1.4 into GameMaker Studio 2, as you can! The functions listed here will be turned into compatibility scripts
In GameMaker: Studio 1.4 you had a separate background resource, where you could add images to be used as backgrounds. In GameMaker Studio 2 all images are considered sprites, and the use you put them too will depend on the layer they are assigned to in the room. This means that there is no longer a "background" resource, and it also means that the following functions are obsolete:
draw_background draw_background_ext draw_background_stretched draw_background_stretched_ext draw_background_part draw_background_part_ext draw_background_general draw_background_tiled draw_background_tiled_ext background_name background_exists background_get_name draw_background draw_background_ext draw_background_stretched draw_background_stretched_ext background_get_width background_get_height background_get_transparent background_get_smooth background_get_preload background_get_uvs background_get_texture background_set_alpha_from_background background_create_from_surface background_create_color background_create_colour background_create_gradient background_add background_replace background_add_alpha background_replace_alpha background_delete background_duplicate background_assign background_save background_prefetch background_prefetch_multi background_flush background_flush_multi room_set_background
As with backgrounds (explained above) the tile resource from GameMaker: Studio 1.4 no longer exists, and instead we have Tile Sets in GameMaker Studio 2. In GameMaker: Studio 1.4, tiles used a background resource and were placed at different depths in the room editor or through code, however the method used was not terribly flexible and was also not that efficient. To address these issues, in GameMaker Studio 2 tilesets are now created from a sprite resource, and can have various different properties (like animation or auto-tiling). They are then placed on a tilemap layer within the room editor or through code. Due to these changes the following functions are now obsolete:
tile_get_x tile_get_y tile_get_left tile_get_top tile_get_width tile_get_height tile_get_depth tile_get_visible tile_get_xscale tile_get_yscale tile_get_alpha tile_get_background tile_set_visible tile_set_background tile_set_region tile_set_position tile_set_depth tile_set_scale tile_set_blend tile_set_alpha tile_get_count tile_get_id tile_get_ids tile_get_ids_at_depth tile_add tile_exists tile_delete tile_layer_hide tile_layer_show tile_layer_delete tile_layer_shift tile_layer_find tile_layer_delete_at tile_layer_depth room_tile_add room_tile_add_ext room_tile_clear
You can find out more about Tile Sets from the manual section on the Tile Set Editor and about how to use them in the room editor from the section on Tile Layers. For more information on the functions that control background layers using code see Tilemap Layers.
The way objects are treated in GameMaker Studio 2 has changed slightly due to the introduction of layers in the room editor. There still exists the "depth" variable, but it is now only really used for compatibility and you can no longer get or set the depth for objects, only instances. This makes the following functions obsolete:
GameMaker: Studio 1.4 had two different sound API's, one which used the legacy sound_ functions (that was only really valid for the HTML5 target platform), and the other which used the audio_ functions. The audio API has been improved and expanded in GameMaker Studio 2, making the legacy functions listed below obsolete:
sound_name sound_exists sound_get_name sound_get_kind sound_get_preload sound_exists sound_restore sound_delete sound_play sound_loop sound_stop sound_stop_all sound_isplaying sound_volume sound_fade sound_global_volume audio_music_gain audio_music_is_playing audio_new_system audio_old_system audio_pause_music audio_play_music audio_resume_music audio_stop_music audio_system
When using 3D models or primitives in GameMaker: Studio 1.4, you had to use the d3d_ functions. These used an obsolete API for drawing and in many cases were not related strictly to Direct 3D API, or even to using 3D itself. With the advent of vertex buffers, matrices and cameras in GameMaker Studio 2, the following functions have been made obsolete:
d3d_start d3d_end d3d_set_perspective d3d_set_hidden d3d_set_depth d3d_set_lighting d3d_set_shading d3d_set_fog d3d_set_culling d3d_set_zwriteenable d3d_set_projection d3d_set_projection_ext d3d_set_projection_ortho d3d_set_projection_perspective d3d_transform_set_identity d3d_transform_set_translation d3d_transform_set_scaling d3d_transform_set_rotation_x d3d_transform_set_rotation_y d3d_transform_set_rotation_z d3d_transform_set_rotation_axis d3d_transform_add_translation d3d_transform_add_scaling d3d_transform_add_rotation_x d3d_transform_add_rotation_y d3d_transform_add_rotation_z d3d_transform_add_rotation_axis d3d_transform_stack_clear d3d_transform_stack_empty d3d_transform_stack_push d3d_transform_stack_pop d3d_transform_stack_top d3d_transform_stack_discard d3d_transform_vertex d3d_light_define_ambient d3d_light_define_direction d3d_light_define_point d3d_light_enable d3d_primitive_begin d3d_primitive_begin_texture d3d_primitive_end d3d_vertex d3d_vertex_color d3d_vertex_colour d3d_vertex_texture d3d_vertex_texture_color d3d_vertex_texture_colour d3d_vertex_normal d3d_vertex_normal_color d3d_vertex_normal_colour d3d_vertex_normal_texture d3d_vertex_normal_texture_color d3d_vertex_normal_texture_colour d3d_draw_block d3d_draw_cylinder d3d_draw_cone d3d_draw_ellipsoid d3d_draw_wall d3d_draw_floor d3d_model_create d3d_model_destroy d3d_model_clear d3d_model_load d3d_model_save d3d_model_draw d3d_model_primitive_begin d3d_model_primitive_end d3d_model_vertex d3d_model_vertex_color d3d_model_vertex_colour d3d_model_vertex_texture d3d_model_vertex_texture_color d3d_model_vertex_texture_colour d3d_model_vertex_normal d3d_model_vertex_normal_color d3d_model_vertex_normal_colour d3d_model_vertex_normal_texture d3d_model_vertex_normal_texture_color d3d_model_vertex_normal_texture_colour d3d_model_block d3d_model_cylinder d3d_model_cone d3d_model_ellipsoid d3d_model_wall d3d_model_floor
With the advent of the camera functions in GameMaker Studio 2, it means that a number of view variables are no longer required, specifically those referring to the view into the room rather than the view_port (which is still used). There are also a few functions for controlling how things are displayed that were available in legacy versions of GameMaker: Studio 1.4 which are also no longer appropriate. These variables and functions are listed below:
view_object view_angle view_xview view_yview view_hview view_wview view_hborder view_vborder view_hspeed view_vspeed display_set_windows_vertex_buffer_method display_get_windows_vertex_buffer_method display_set_windows_alternate_sync display_get_windows_alternate_sync room_set_view
You can find out more about cameras from the manual section on Cameras And The Display.
GameMaker Studio 2 moves a lot of built in functionality from previous versions into extensions, meaning that the following 3rd party support functions are considered obsolete:
ads_enable ads_disable ads_move ads_get_display_width ads_get_display_height ads_interstitial_available ads_interstitial_display ads_setup ads_engagement_available ads_engagement_launch ads_engagement_active ads_event ads_event_preload ads_set_reward_callback playhaven_add_notification_badge playhaven_hide_notification_badge playhaven_position_notification_badge playhaven_update_notification_badge pocketchange_display_reward pocketchange_display_shop analytics_event analytics_event_ext iap_event_queue iap_files_purchased iap_is_downloaded iap_product_files iap_product_status iap_store_status immersion_play_effect immersion_stop
You can get the official YoYo Games extensions for advertising and analytics from their Marketplace Page.
Both GameMaker: Studio 1.4 and GameMaker Studio 2 have a visual scripting Drag and Drop (DnD™) interface for creating your games, however the way it is handled in GameMaker Studio 2 is quite different to the previous methods used. Previously, all DnD™ actions had their own corresponding function which worked "behind the scenes" to get the desired results, however this was not very transparent and added in extra overheads to the function calls, resulting in poorer performance. In GameMaker Studio 2 this has been changed, and now all actions compile to pure code (and can be shown as such if required), meaning that the following action functions are obsolete:
action_path_old action_set_sprite action_draw_font action_draw_font_old action_fill_color action_fill_colour action_line_color action_line_colour action_highscore action_set_relative action_move action_set_motion action_set_hspeed action_set_vspeed action_set_gravity action_set_friction action_move_point action_move_to action_move_start action_move_random action_snap action_wrap action_reverse_xdir action_reverse_ydir action_move_contact action_bounce action_path action_path_end action_path_position action_path_speed action_linear_step action_potential_step action_kill_object action_create_object action_create_object_motion action_create_object_random action_change_object action_kill_position action_sprite_set action_sprite_transform action_sprite_color action_sprite_colour action_sound action_end_sound action_if_sound action_another_room action_current_room action_previous_room action_next_room action_if_previous_room action_if_next_room action_set_alarm action_sleep action_set_timeline action_timeline_set action_timeline_start action_timeline_stop action_timeline_pause action_set_timeline_position action_set_timeline_speed action_message action_show_info action_show_video action_end_game action_restart_game action_save_game action_load_game action_replace_sprite action_replace_sound action_replace_background action_if_empty action_if_collision action_if action_if_number action_if_object action_if_question action_if_dice action_if_mouse action_if_aligned action_execute_script action_inherited action_if_variable action_draw_variable action_set_score action_if_score action_draw_score action_highscore_show action_highscore_clear action_set_life action_if_life action_draw_life action_draw_life_images action_set_health action_if_health action_draw_health action_set_caption action_partsyst_create action_partsyst_destroy action_partsyst_clear action_parttype_create_old action_parttype_create action_parttype_color action_parttype_colour action_parttype_life action_parttype_speed action_parttype_gravity action_parttype_secondary action_partemit_create action_partemit_destroy action_partemit_burst action_partemit_stream action_cd_play action_cd_stop action_cd_pause action_cd_resume action_cd_present action_cd_playing action_set_cursor action_webpage action_splash_web action_draw_sprite action_draw_background action_draw_text action_draw_text_transformed action_draw_rectangle action_draw_gradient_hor action_draw_gradient_vert action_draw_ellipse action_draw_ellipse_gradient action_draw_line action_draw_arrow action_color action_colour action_font action_fullscreen action_snapshot action_effect
You can find out more about the new DnD™ from the manual section Drag And Drop Overview.
When you import a project made with a previous version of GameMaker Studio, any obsolete functions that have been used will still work as they will have been transformed by the IDE automatically into compatibility scripts. What happens is that GameMaker Studio 2 will parse your project for all the obsolete functions and variables that you have used, and then create a series of scripts using those function names. These scripts will contain either the new equivalent function or a short script of code that performs the same action as the obsolete function.
When you first import a GameMaker Studio 2 project you will be shown a compatibility report much like this one:
The main body of the report shows which objects and scripts have been affected and where, while at the end you can find a list of the scripts that have been created for your project. You can click the middle mouse button or press on any of the scripts listed in the report to open it and see what has been done. Note that if you see any scripts created with a double under-bar before their name (for example: __global_object_depths), then these are scripts that have been created by the IDE to help with compatibility and are not scripts that have been converted from obsolete functions, so these should not be tampered with as they are required for the other compatibility scripts to work.
When you have finished revising the compatibility report you can close the workspace, but should you need to revise anything within the report you can find it again by going to the Notes section of the resource tree.
Please note that there are some functions that have been introduced to the GameMaker Language to ensure compatibility with older projects and that will appear in these compatibility scripts. However these functions should never be used in your own projects. You can find a list of these functions from the following section of the manual: