80 lines
2.9 KiB
HTML
80 lines
2.9 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
|
|
<html>
|
|
<head>
|
|
<title>Changing Resources</title>
|
|
<link href="style.css" rel="stylesheet" type="text/css">
|
|
</head>
|
|
<body background="images/back.gif">
|
|
<!--START-->
|
|
|
|
<h1>Changing resources</h1>
|
|
|
|
<i><b>This functionality is only available in the Pro Edition of Game Maker.</b></i>
|
|
|
|
<P>
|
|
It is possible to create new resources during the game. Also you can change existing
|
|
resources. This chapter describes the possibilities. Be warned though. <b>Changing
|
|
resources easily leads to serious errors in your games!!!</b> You must follow the
|
|
following rules when changing resources:
|
|
|
|
<ul>
|
|
<li>Don't change resources that are being used. This will lead to errors! For example,
|
|
don't change a sprite that is being used by an instance.</li>
|
|
<li>When you save the game during playing, added and changed resources are NOT stored
|
|
with the save game. So if you load the saved game later, these might not be there anymore.
|
|
In general, when you manipulate resources you can no longer use the built-in system for
|
|
loading and saving games.</li>
|
|
<li>When you restart the game during playing, the changed resources are NOT restored to
|
|
their original shape. In general, when you manipulate resources you can no longer use the
|
|
action or function to restart the game.</li>
|
|
<li>Resource manipulation can be slow. For example, changing sprites or backgrounds is
|
|
relatively slow. So don't use it during the game play.</li>
|
|
<li>Creating resources during game play (in particular sprites and background) easily
|
|
uses huge amount of memory. So be extremely careful with this. For example, if you have a
|
|
32 frame 128x128 animated sprite and you decide to create 36 rotated copies of it you will
|
|
use up 36x32x128x128x4 = 72 MB of memory!</li>
|
|
<li>Make sure you delete resources you no longer need. Otherwise the system soon runs
|
|
out of memory.</li>
|
|
</ul>
|
|
|
|
In general, you should not change any resources during game play. Better create and change
|
|
the resources at the beginning of the game or maybe at the beginning of a room.
|
|
|
|
<!--HELPONLY-->
|
|
|
|
<P>
|
|
Information on changing resources can be found in the following pages:
|
|
|
|
<P>
|
|
<p>
|
|
<blockquote>
|
|
<a href="409_01_sprites.html">Sprites</a><br>
|
|
<a href="409_02_sounds.html">Sounds</a><br>
|
|
<a href="409_03_backgrounds.html">Backgrounds</a><br>
|
|
<a href="409_04_fonts.html">Fonts</a><br>
|
|
<a href="409_05_paths.html">Paths</a><br>
|
|
<a href="409_06_scripts.html">Scripts</a><br>
|
|
<a href="409_07_timelines.html">Time lines</a><br>
|
|
<a href="409_08_objects.html">Objects</a><br>
|
|
<a href="409_09_rooms.html">Rooms</a><br>
|
|
</blockquote>
|
|
|
|
<p>
|
|
|
|
<!--ENDHELPONLY-->
|
|
|
|
|
|
<!--END-->
|
|
</body>
|
|
</html>
|
|
|
|
<!-- KEYWORDS
|
|
resources
|
|
changing resources
|
|
adding resources
|
|
deleting resources
|
|
creating resources
|
|
setting resource properties
|
|
|
|
--> |