Home | Customize | Blog | Extras | Log In | Info
Manual | D&D icons | GML Parser | Archive | Iso City
Username: Password:  
About | Features | Directory | Banners | Contact

Designing Games with GameMaker
Designing Games with GameMaker

Splash screens

This functionality is only available in the Standard Edition of GameMaker.

Many games have so-called splash screens. These screens show a video, an image, or some text. Often they are used at the beginning of the game (as an intro), the beginning of a level, or at the end of the game (for example the credits). In GameMaker such splash screens with text, images or video can be shown at any moment during the game.

Default these splash screens are shown inside the game window, but it is also possible to show them in a separate window. The game is interrupted while the splash screen is shown. The player can return to the game by pressing the escape key or by clicking with the mouse in the window. (These settings can be changed; see below.)

The following functions can be used to display the splash screens:

splash_show_video(fname,loop) Shows a video splash screen. fname is the name of the video file. Whether a particular movie file is supported depends on the drivers on the machine. Typically you can use .avi, .mpg, and .wmv files but avoid special codecs. You best put this file in the folder of the game yourself or in a subfolder. loop indicates whether to loop the video.
splash_show_text(fname,delay) Shows a text splash screen. fname is the name of the text file. You can either display standard text files (.txt) or rich text files (.rtf). Only part of the rich text features are taken into account. E.g. images and other embedded objects are not shown. delay indicates the delay in milliseconds before returning to the game. use 0 or a negative value to wait until the player presses the escape key or clicks with the mouse in the window. (Note that no scrollbar will be shown nor is there another way to scroll the text. So the text must fit the window.)
splash_show_image(fname,delay) Shows an image splash screen. fname is the name of the image file. Many image types are supported (for example .bmp, .jpg, .tif, and .wmf) but no animated images. delay is the delay in milli seconds before returning to the game.
splash_show_web(url,delay) Shows a web page splash screen. url is the url of the webpage (starting with http://) or it is the file name for a local html file. Note however that you must provide the full path for this to work. So you best e.g. use as url something like working_directory + "\index.html". delay is the delay in milli seconds before returning to the game.

You can change the way the splash screens are displayed using the functions below:

splash_set_main(main) Indicated whether the splash screen must be shown in the main game window (true, default) or in a separate window (false).
splash_set_scale(scale) Sets the scale factor to be used when displaying a splash video or image. When using a value of 0 the scale factor is chosen such that the window is filled (default).
splash_set_cursor(vis) Sets whether the cursor should be visible in the splash screen. Default it is visible. For movies the cursor cannot be switched off.
splash_set_color(col) Sets the color of the area surrounding the image or video.
splash_set_caption(cap) Sets the caption for the splash window. This only has effect when is a separate splash window is used. Default the empty string is used.
splash_set_fullscreen(full) Indicates whether to use a full screen window or not. This only has effect when is a separate splash window is used. Default a normal window is used.
splash_set_border(border) Indicates whether the window should have a border. This only has effect when is a separate normal splash window is used. Default a border is used.
splash_set_size(w,h) Sets the size of the splash window. This only has effect when is a separate normal splash window is used. Default size is 640x480.
splash_set_position(x,y) Sets the position of the splash window. This only has effect when is a separate normal splash window is used. Default Windows determines the position.
splash_set_adapt(adapt) Indicated whether the size of the window must be adapted to the scaled size of the video or image. This only has effect when is a separate splash window is used. Default adapt is true.
splash_set_top(top) Indicates whether the window should stay on top of other windows. This only has effect when is a separate splash window is used. Default the value is true.
splash_set_interrupt(interrupt) Indicates whether the game play should be interrupted while showing the splash window. This only has effect when is a separate splash window is used. Default the value is true.
splash_set_stop_key(stop) Indicates whether to stop the display of the splash screen when the player pressed the Escape key. Default the value is true.
splash_set_stop_mouse(stop) Indicates whether to stop the display of the splash screen when the player pressed the mouse inside the splash screen. Default the value is true.
splash_set_close_button(show) Indicates whether to show a close button in the top right corner of the splash screen. This is useful when running games in full screen mode or without a border. Default the value is true.

There is one particular type of splash info, which is the game information that the user can enter in GameMaker. You can display it using the following function. You can also load a separate info file. This is closely related to the displaying of the text splash screen but the display is governed by the settings provided when defining the game information and not by the settings above. It is also displayed in a different window, so it is possible to display both the game information and a splash screen at the same moment. These functions also work in the Lite Edition.

show_info() Displays the game information window.
load_info(fname) Loads the game information from the file named fname. This should be a rich text file (.rtf). This makes it possible to show different help files at different moments. Note that contrary to the spash screens, this rtf file cannot contain images.

Search Search


Alternative versions Alternative versions

You can also read this manual on one single long page (± 1.5 mb)

Also available in: Dutch French German

ZIP Download helpfile

Advertisement Advertisement

GameMaker Manual