GameMaker: Studio

Working on a set of opening screens for my project and am unfamiliar on how to add transition effects such as a fade to black for the next screen for example. Moving to the next room/screen is something I understand but would like it to be a smoother transition. Just looking for some some light to be shed to help out. Any help is appreciated! Thanks guys

If you were looking for built-in room transitions, the old ones from GM 8.1 were removed from Studio due to cross-platform incompatibilities. In any case, you'll need to code your own. For a fade in/out effect, I just draw a solid rectangle over the entire game window and increase/decrease the draw alpha as time passes (I just tie the draw alpha to alarm[] variables).

Make a big black rectangle, about the size of your screen resolution. Call it obj_fade_out.In obj_fade_out's CREATE event put the following:image_alpha = 0.05 //this is the start fade for going into the next room.

In obj_fade_out's STEP event put the following:if (image_alpha is less than 1)//note: can't use less than or greater than symbols in this description, just place the correct symbol in the place of the words.{ image_alpha += 0.05 //smaller value here increases fade time.}

if (image_alpha is greater than or equal to 1))//note: can't use less than or greater than symbols in this description, just place the correct symbol in the place of the words.{ instance_destroy()}

In obj_fade_out's DESTROY event put the following:{room_goto(room_name) //or if you have a standard hierarchy of rooms, use room_goto_next()}

Now when you want to fade out of a room just create this object in the centre like so:instance_create(room_width/2, room_height/2, obj_fade_out)

Now on the room CREATE of the next room you'll have the following to fade in.instance_create(room_width/2, room_height/2, obj_fade_in)

Now create an object called obj_fade_in, give it the same big black rectangle as a sprite.Then do the following:obj_fade_in's CREATE event:image_alpha = 1 //make it nice and opaque

obj_fade_in's STEP event:if (image_alpha is greater than 0))//note: can't use less than or greater than symbols in this description, just place the correct symbol in the place of the words.{ image_alpha -= 0.05 //smaller value here increases fade in time.}

if (image_alpha == 0){ instance_destroy()}

That's pretty much it. You'll now have a basic fade in and out. Just remember to create an instance of obj_fade_out whenever you want to move to the next room, and an instance of obj_fade_in in the room CREATE of every room you want to fade in to.