Room Transitions

Game Maker Room Transitions

Room Transitions

This extension package adds over 60 room transition effects to Game Maker.

To use this package in a game, select the item Select Extension Packages in the Resources menu. In the form that appears click on the GM Room Transitions item in the right list and press the button to move it to the left list. That is all.

Below you find a list of all constants that define the different transitions. To use a transition simply assign it to the variable transition_kind or use the function tr_set_transition() as described below. Note that a transition only applies to the next time you move to a new room. So you have to set it again before each room change.

The following constants describe the different transitions. They are divided in a number of groups. The create transitions create the new room image from a particular direction. For example, tr_create_left creates the new image from the left to the right. The shift transitions shift the new room into sight. The stretch transitions scale the room into sight and the push transitions push the old room out of the way. The squeeze transitions scale both the new and the old room images while the rotate transitions rotate the new room into sight (or the old one away). The interlace transition create the new room in two phases, first showing half of it and then the rest. And then there are a few funny other transitions. Note that some of the transitions can be influenced by parameters that can be set by functions described below. In particular, for almost every transition it can be indicated that the new room should also be blended with the old room, giving nice visual effect. But best experiment to get the best results.

tr_create_left tr_create_right
tr_create_top
tr_create_bottom
tr_create_left_top
tr_create_right_top
tr_create_left_bottom
tr_create_right_bottom
tr_create_center_hor
tr_create_center_vert
tr_create_center
tr_create_outside_hor
tr_create_outside_vert
tr_create_outside
tr_create_bars_hor
tr_create_bars_vert
tr_create_bars_both

tr_shift_left
tr_shift_right
tr_shift_top
tr_shift_bottom
tr_shift_left_top
tr_shift_right_top
tr_shift_left_bottom
tr_shift_right_bottom

tr_stretch_left
tr_stretch_right
tr_stretch_top
tr_stretch_bottom
tr_stretch_left_top
tr_stretch_right_top
tr_stretch_left_bottom
tr_stretch_right_bottom
tr_stretch_center_hor
tr_stretch_center_vert
tr_stretch_center
tr_stretch_outside_hor
tr_stretch_outside_vert
tr_stretch_outside

tr_push_left
tr_push_right
tr_push_top
tr_push_bottom

tr_squeeze_left
tr_squeeze_right
tr_squeeze_top
tr_squeeze_bottom

tr_rotate_in_left
tr_rotate_in_right
tr_rotate_out_left
tr_rotate_out_right

tr_interlace_left
tr_interlace_right
tr_interlace_top
tr_interlace_bottom

tr_blocks
tr_blend
tr_fade_in
tr_fade_out
tr_fade_outin
tr_melt
tr_diagonal1_in
tr_diagonal1_out
tr_diagonal2_in
tr_diagonal2_out

The following functions exist to set transitions and to modify the way a transition looks.

tr_set_blending(blend) Use this function to indicate that in (almost) all transitions the new room must also be blended with the old room (true) or that it must immediately replace the old room (false, default).
tr_set_bars_number(numb) Use this function to indicate how many bars must be used in the transitions that create bars. Default is 4.
tr_set_rotate_angle(angle) Use this function to indicate over what angle the room must be rotated in the rotate transitions. Default is 360 degrees.
tr_set_blocks_size(size) Use this function to indicate the size of the blocks in the tr_blocks transition. Default is 20.
tr_set_fade_color(col) Use this function to indicate the color to be used in the fade transitions. Default is black.

tr_set_transition(ind) Sets the transition for the next room to ind. This has exactly the same effect as setting the variable transition_kind to ind.
tr_set_random_transition(kind) Sets the next transitions to a random transition of a particular kind. Then following kinds are possible:
tr_all
tr_create
tr_shift
tr_stretch
tr_push
tr_squeeze
tr_rotate
tr_interlace

Best play a bit with all the different possibility. It is also possible to define other transitions yourself as described in the Game Maker help file. This extension package uses transitions with an index between 100 and 200. So for your own transitions better use a higher index.