176 lines
7.5 KiB
HTML
176 lines
7.5 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
|
|
<html>
|
|
<head>
|
|
<title>Splash screens</title>
|
|
<link href="style.css" rel="stylesheet" type="text/css">
|
|
</head>
|
|
<body background="images/back.gif">
|
|
<!--START-->
|
|
|
|
<h3>Splash screens</h3>
|
|
|
|
|
|
<b><i>This functionality is only available in the Pro Edition of Game Maker.</i></b>
|
|
|
|
<p>
|
|
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 <i>Game Maker</i> such splash screens with text, images or video can be
|
|
shown at any moment during the game.
|
|
|
|
<p>
|
|
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.)
|
|
|
|
<p>
|
|
The following functions can be used to display the splash screens:
|
|
|
|
<p>
|
|
<blockquote>
|
|
<tt><b>splash_show_video(fname,loop)</b></tt>
|
|
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.<br>
|
|
<tt><b>splash_show_text(fname,delay)</b></tt>
|
|
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.)<br>
|
|
<tt><b>splash_show_image(fname,delay)</b></tt>
|
|
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.<br>
|
|
<tt><b>splash_show_web(url,delay)</b></tt>
|
|
Shows a web page splash screen. url is the url of the webpage (starting
|
|
with <tt>http://</tt>) 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 <tt>working_directory + "\index.html"</tt>.
|
|
delay is the delay in milli seconds before returning
|
|
to the game.<br>
|
|
</blockquote>
|
|
|
|
<p>
|
|
You can change the way the splash screens are displayed using the functions below:
|
|
|
|
<p>
|
|
<blockquote>
|
|
<tt><b>splash_set_main(main)</b></tt>
|
|
Indicated whether the splash screen must be shown in the main
|
|
game window (true, default) or in a separate window (false).<br>
|
|
<tt><b>splash_set_scale(scale)</b></tt>
|
|
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).<br>
|
|
<tt><b>splash_set_cursor(vis)</b></tt>
|
|
Sets whether the cursor should be visible in the splash screen.
|
|
Default it is visible. For movies the cursor cannot be switched off.<br>
|
|
<tt><b>splash_set_color(col)</b></tt>
|
|
Sets the color of the area surrounding the image or video.<br>
|
|
<tt><b>splash_set_caption(cap)</b></tt>
|
|
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.<br>
|
|
<tt><b>splash_set_fullscreen(full)</b></tt>
|
|
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.<br>
|
|
<tt><b>splash_set_border(border)</b></tt>
|
|
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.<br>
|
|
<tt><b>splash_set_size(w,h)</b></tt>
|
|
Sets the size of the splash window. This only has effect when
|
|
is a separate normal splash window is used. Default size is 640x480.<br>
|
|
<tt><b>splash_set_position(x,y)</b></tt>
|
|
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.<br>
|
|
<tt><b>splash_set_adapt(adapt)</b></tt>
|
|
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.<br>
|
|
<tt><b>splash_set_top(top)</b></tt>
|
|
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.<br>
|
|
<tt><b>splash_set_interrupt(interrupt)</b></tt>
|
|
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.<br>
|
|
<tt><b>splash_set_stop_key(stop)</b></tt>
|
|
Indicates whether to stop the display of the splash screen when the player pressed
|
|
the Escape key. Default the value is true.<br>
|
|
<tt><b>splash_set_stop_mouse(stop)</b></tt>
|
|
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.<br>
|
|
<tt><b>splash_set_close_button(show)</b></tt>
|
|
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.<br>
|
|
</blockquote>
|
|
|
|
<p>
|
|
There is one particular type of splash info, which is the game information that the
|
|
user can enter in <i>Game Maker</i>. 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.
|
|
|
|
<p>
|
|
<blockquote>
|
|
<tt><b>show_info()</b></tt>
|
|
Displays the game information window.<br>
|
|
<tt><b>load_info(fname)</b></tt>
|
|
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.
|
|
</blockquote>
|
|
|
|
|
|
|
|
<!--END-->
|
|
</body>
|
|
</html>
|
|
|
|
<!-- KEYWORDS
|
|
videos
|
|
movies
|
|
playing videos
|
|
showing videos
|
|
splash screens
|
|
credits
|
|
information
|
|
|
|
splash_show_video()
|
|
splash_show_text()
|
|
splash_show_web()
|
|
splash_show_image()
|
|
splash_set_caption()
|
|
splash_set_fullscreen()
|
|
splash_set_border()
|
|
splash_set_size()
|
|
splash_set_position()
|
|
splash_set_adapt()
|
|
splash_set_top()
|
|
splash_set_color()
|
|
splash_set_main()
|
|
splash_set_scale()
|
|
splash_set_cursor()
|
|
splash_set_interrupt()
|
|
splash_set_stop_key()
|
|
splash_set_stop_mouse()
|
|
splash_set_close_button()
|
|
|
|
show_info()
|
|
load_info()
|
|
|
|
--> |