From e65687a3d54fe6319b470ac317f24b933a12f6f5 Mon Sep 17 00:00:00 2001 From: YYBartT Date: Fri, 11 Oct 2024 16:45:17 +0200 Subject: [PATCH 01/11] docs(feature): [GX.games] Add a "save as .zip" output type which avoids uploading to the GXC YoYoGames/GameMaker-Bugs#7454 * Compiling page: * Updated screenshot and description as well as other text referring to GX.games target * Renamed GX.Games => GX.games --- Manual/contents/Introduction/Compiling.htm | 15 ++++++++------- .../General/GXgames_Environments.htm | 6 +++--- .../QS_GX.Games_Compile_Options.png | Bin 10876 -> 14949 bytes 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Manual/contents/Introduction/Compiling.htm b/Manual/contents/Introduction/Compiling.htm index 514f02d6e..abefd0f06 100644 --- a/Manual/contents/Introduction/Compiling.htm +++ b/Manual/contents/Introduction/Compiling.htm @@ -26,7 +26,7 @@

Compiling for Testing

Compiling your game for testing can be done by simply pressing the Play button Play Icon at the top of the IDE, which will launch the game for testing using the specified target. You can also run the game in Debug Mode by testing using the Debug button Debug Icon. This will run the game, but also open up the Debug Window, where you can monitor how your game performs and see any issues (see the section on Debugging for more information).

Target Settings

By default GameMaker will run and debug using the built-in Virtual Machine (VM), which is more or less the same as running on the desktop OS being used. However, GameMaker is a cross-platform engine and you can test, debug and compile executable packages of your projects on a number of different target platforms (the exact platforms available will depend on the details of your licence). To change the current target platform you can click  on the Targets button Target Manager Icon to open the Targets Window, which will look something like this (exact details will vary based on your licence type):

-

Target ListAt the top, beside the Targets button, you have the current settings which tells you the platform and the specific settings actually being used, and then the rest of the window is taken up with the details and options for all the available targets which you can select to use instead. Each section of this window is explained below: 

+

Target ListAt the top, beside the Targets button, you have the current settings which tells you the platform and the specific settings actually being used, and then the rest of the window is taken up with the details and options for all the available targets which you can select to use instead. Each section of this window is explained below: 

@@ -71,17 +71,17 @@

Target Settings

There are also a number or preferences that can be set to modify and customise the compile workflow, explained on the following page:

Creating A Final Executable Package

You can click the Create Executable button Compile Icon in the IDE to start the compiler build or select Create Executable from The Build Menu. Either process will start the build process which will depend on the target platform selected.

-

On the GX.games target, it will open a special window allowing you to compile and upload your game to GX.games; on all other targets it will open a file explorer window where you can give the final name that you wish to use for your game executable, before clicking Save to start the compile and build process. Once you have done this, the necessary files will be generated so that you can distribute it as you wish.

+

On the GX.games target, it will open a special window allowing you to compile and upload your game to GX.games; on all other targets as well as when you save locally as zip on GX.games, it will open a file explorer window where you can give the final name that you wish to use for your game executable, before clicking Save to start the compile and build process. Once you have done this, the necessary files will be generated so that you can distribute it as you wish.

You Should Know

Here are some things to keep in mind when creating executables:

@@ -93,8 +93,9 @@

How Different Targets Build

  • GX.games - When compiling for the "GX.games" target, you will see the "GX.games Packaging" window which will first ask you to sign in using your Opera account:You won't need to sign in here if you've already signed into GameMaker using Opera Single Sign-In.

    Next you will be asked the packaging option to use: 
    -
    - After you have signed in, it will start compiling your game and proceed to upload it to GX.games. You can then click on "Edit Game on Opera" to edit it on GX.create and publish it:
    + You'll be asked to sign in if you select any of the upload options, though this isn't needed if you save locally as a ZIP.
    +
    + After you have signed in, GameMaker will start compiling your game and proceed to upload it to GX.games. You can then click on "Edit Game on Opera" to edit it on GX.create and publish it:
    Please refer to this page to learn more about the GX.games upload process, and this page for setting up the various exports, such as YYC and Mobile.
  • Windows - Compiling for the general Windows OS will first request that you choose between creating an Installer or a Zip package, where the installer will be a single executable that will install your game, and the Zip file will be a single *.zip format compressed file with all your game files stored within (the files will need extracted for the game to run). Windows Compile OptionsIf you check the box marked Remember Packaging Option then GameMaker will remember the choice for all future compiles (this can be reset or changed from the Windows Preferences). You can find out more from the YoYo Games Help Center.
    @@ -104,7 +105,7 @@

    How Different Targets Build

  • Ubuntu (Linux) - Compiling for Ubuntu will ask you to choose between creating an .AppImage or a .zip file, containing either an x64 or an ARM executable (however AppImage does not support ARM). You can find out more from the YoYo Games Help Center.
    .AppImage is used for sharing as a package via any distributor except Steam, while .zip is used only for uploading to Steam (as it uses the Steam Runtime specifically). Because of this, the created .zip cannot be opened as a regular zip file.
  • -
  • HTML5 - If you have chosen to build HTML5, then an index.html file (this is the default name, but you can give your own name too in the Platform Preferences) along with a folder containing your game files will be created and saved to the specified location. For your game to work you will need both of these to be uploaded to a server. The index.html can also be customised to show your game with a different background colour, or at a different position etc... but a knowledge of HTML is necessary for this, and you can also specify your own custom index file when you build the package (see the HTML5 Game Options). You can find out more from the YoYo Games Help Center.
  • +
  • HTML5 - If you have chosen to build HTML5, then an index.html file (this is the default name, but you can give your own name too in the Platform Preferences) along with a folder containing your game files will be created and saved to the specified location. For your game to work you will need both of these to be uploaded to a server. The index.html can also be customised to show your game with a different background colour, at a different position, etc. but a knowledge of HTML is necessary for this, and you can also specify your own custom index file when you build the package (see the HTML5 Game Options). You can find out more from the YoYo Games Help Center.
  • Android - For Android devices, you can choose to build an *.apk or an *.aab (Android App Bundle) file from the window that is shown for saving the game:

    Andoird APK or AAB File SelectorThe type of file you choose will depend on the store that you wish to target, with the *.aab file being required for Google Play, while the *.apk file can be used on other stores. You can find out more from the YoYo Games Help Center. diff --git a/Manual/contents/Setting_Up_And_Version_Information/IDE_Preferences/General/GXgames_Environments.htm b/Manual/contents/Setting_Up_And_Version_Information/IDE_Preferences/General/GXgames_Environments.htm index f4c696e74..52dcef64f 100644 --- a/Manual/contents/Setting_Up_And_Version_Information/IDE_Preferences/General/GXgames_Environments.htm +++ b/Manual/contents/Setting_Up_And_Version_Information/IDE_Preferences/General/GXgames_Environments.htm @@ -4,7 +4,7 @@ GX.games Environments - + @@ -14,7 +14,7 @@ -

    GX.Games Environments Preferences

    +

    GX.games Environments Preferences

    Help Prefs

    This section allows you to change the currently selected environment for GX.games. You can choose between the main production environment, and the sandbox environment.

    You can also set a path that contains custom environment JSON files.

    @@ -28,7 +28,7 @@

    GX.Games Environments Preferences

    Next: Help
    -
    © Copyright YoYo Games Ltd. 2023 All Rights Reserved
    +
    © Copyright YoYo Games Ltd. 2024 All Rights Reserved

    GML Code Overview

    -

    This section of the manual contains all the information required to understand and use GML Code. The runtime functions in this language can be used to create your games and is added into objects from the Object Editor, although it can also be used along with GML Visual. Below you can see a typical image of an object with the code editor open on an event:

    -

    Object, Events and Code OverviewEach event has its own tab in the editor and you can add, edit, or remove code from them at any time (for more information on events see Object Events). The code itself must have a basic structure and can contain resource indices, variables, functions, expressions, keywords, etc. all of which are explained in the sections below. If you are a novice to programming or making the switch from GML Visual, it is recommended that you start with the page on Basic Code Structure and then read through all the other pages in this section, testing code from each one within GameMaker itself.

    -

    You can use Feather for intelligent code completion and error reporting in your GML Code scripts.

    +

    This section of the manual contains all the information required to understand and use GML Code. The runtime functions in this language can be used to create your games and is added into objects from The Object Editor, although it can also be used along with GML Visual. Below you can see a typical image of an object with the code editor open on an event:

    +

    Object, Events and Code OverviewEach event has its own tab in the editor and you can add, edit, or remove code from them at any time (for more information on events see Object Events). The code itself must have a basic structure and can contain resource indices, variables, functions, expressions, keywords, etc. all of which are explained in the sections below. If you are a novice to programming or making the switch from GML Visual, it is recommended that you start with the page on Basic Code Structure and then read through all the other pages in this section, testing code from each one within GameMaker itself.

    +

    You can use Feather for intelligent code completion and error reporting in your GML Code scripts.

     

    Basics of GML Code

     

    +

    Language Features

    +

     

     

    -
    © Copyright YoYo Games Ltd. 2022 All Rights Reserved
    +
    © Copyright YoYo Games Ltd. 2024 All Rights Reserved

    Language Features

    The GameMaker Language (GML) has a number of features which are part of the essential structure of all programs written with the language. Each of these will be used in any code you write multiple times, so you should know what they are and how they work before getting started with programming a project.

    - +

     

     

    -

    Arrays

    -

    Arrays can be extremely useful and are an essential part of making games. It is essentially a type of variable that can hold multiple values as a "list" -- consider the following code:

    +

    Arrays

    +

    Arrays are essentially a type of variable that can hold multiple values as a "list". They can be extremely useful and are an essential part of making games. Consider the following code:

    numbers = [ 0, 1, 2, 3, 4, 5 ];

    fruits = [ "Apples", "Oranges", "Mangoes" ];

    -

    Using the [item, item, item] syntax we are creating an array that is stored in a variable. The items stored in an array can later be accessed through that variable using an integer number, starting at 0, which is placed inside [] brackets:

    +

    Using the [item, item, item] syntax we are creating an array that is stored in a variable. The items stored in an array can later be accessed through that variable using an integer number, starting at 0, which is placed inside [ ] brackets:

    first_fruit = fruits[ 0 ];
    second_fruit = fruits[ 1 ];
    // ...and so on.

    @@ -29,16 +29,16 @@

    Arrays

    Before going any further let's clarify what an array actually is and how it's structured. An array is simply a data type that is assigned to a variable, and it can contain not just one value, but multiple values. The image below shows a schematic for a basic array:

    -

    This is called a 1D (one-dimensional) array, and as you can see the array is stored in the variable "a" and contains multiple values. To access the array you would do something like the following:

    +

    This is called a 1D (one-dimensional) array, and as you can see the array is stored in the variable a and contains multiple values. To access the array you would do something like the following:

    var _val = a[0];
    show_debug_message(_val);

    -

    The above code gets the value from position 0 of the array "a" then outputs it to the console, which - based on the contents of the array shown in the image above - would output 125. If you did the following:

    +

    The above code gets the value from position 0 of the array a then outputs it to the console, which - based on the contents of the array shown in the image above - would output 125. If you did the following:

    var _val = a[3];
    show_debug_message(_val);

    -

    The output would show "Hi!".

    -

    As you can see, you give the array a variable name and then a value in square brackets [], where the value is the position in the array to get the data from. So essentially, an array is a container with a number of slots to store values, and each position in the container has a specific number to identify it, which is what we put in the []. It's worth noting that the contents of an array always start at 0 and can never be negative!

    +

    The output would show "Hi!".

    +

    As you can see, you give the array a variable name and then a value in square brackets [ ], where the value is the position in the array to get the data from. So essentially, an array is a container with a number of slots to store values, and each position in the container has a specific number to identify it, which is what we put in the [ ]. It's worth noting that the contents of an array always start at 0 and can never be negative!

           Creating Arrays

    -

    We've shown how to check an array for data, but how do we create the array to start with? First it has to be initialized before we can use it or GameMaker will give us an error. Initializing an array just means that we give each slot of the array an initial value in preparation for it to be used elsewhere in the project code. This is important to remember as it means that you have to do a certain amount of planning before using arrays, but it is easy enough to initialize one using a repeat loop like this:

    +

    We've shown how to check an array for data, but how do we create the array to start with? First it has to be initialised before we can use it or GameMaker will give us an error. Initialising an array just means that we give each slot of the array an initial value in preparation for it to be used elsewhere in the project code. This is important to remember as it means that you have to do a certain amount of planning before using arrays, but it is easy enough to initialise one using a repeat loop like this:

    var i = 9;

    repeat(10)
    @@ -47,25 +47,25 @@

           Creating Arrays

        i -= 1;
    }

    -

    This simple code will initialize a ten-slot array (from 0 to 9) to hold 0, ie: each slot in the array contains the value 0. You will notice that the array has been initialised backwards, with the last value being defined first. This is not strictly necessary but is the optimal way to do it as it will reserve a space in memory that is the exact size of the array, whereas if you initialize an array from 0 upwards, the memory has to be re-allocated for every additional value added (so for a ten-slot array, initialising it in a loop would change the memory allocation ten times). The speed difference is negligible for smaller arrays, but larger ones should be optimised as much as possible in this way.

    -

    NOTE: The HTML5 export is the exception to the above rule, and when targeting that you should initialise arrays in consecutive order from 0 upwards.

    -

    You can also use the GML function array_create() to initialize an array with a fixed size, and you can even create "empty" arrays with no values, for example:

    +

    This simple code will initialise a ten-slot array (from 0 to 9) to hold 0, i.e.: each slot in the array contains the value 0. You will notice that the array has been initialised backwards, with the last value being defined first. This is not strictly necessary but is the optimal way to do it as it will reserve a space in memory that is the exact size of the array, whereas if you initialise an array from 0 upwards, the memory has to be re-allocated for every additional value added (so for a ten-slot array, initialising it in a loop would change the memory allocation ten times). The speed difference is negligible for smaller arrays, but larger ones should be optimised as much as possible in this way.

    +

     The HTML5 export is the exception to the above rule, and when targeting that you should initialise arrays in consecutive order from 0 upwards.

    +

    You can also use the GML function array_create to initialise an array with a fixed size, and you can even create "empty" arrays with no values, for example:

    my_array = [];

    -

    This tells GameMaker that the variable "my_array" is an array, and you can then add values to it at any time in the future. However, if you try to access a value in an empty array then you will get an error.

    +

    This tells GameMaker that the variable my_array is an array, and you can then add values to it at any time in the future. However, if you try to access a value in an empty array then you will get an error.

    If you already know which items you want to put into the array, you can add comma-separated values between the brackets when declaring the array:

    my_array = ["Steve", 36, "ST-3V3 - Steve Street"];

           Array Bounds

    You should always take care to only access valid array positions, as trying to access a value outside of an array will also give an error. For example, this will cause the project to crash when run:

    my_array = array_create(5, 0);
    var _val = my_array[6];

    -

    The array was only initialised with 5 positions, but we've tried to get position 7 - since arrays are numbered from 0, array[6] is position 7 - therefore the game generates an error and crashes.

    +

    The array was only initialised with 5 positions, but we've tried to get position 7 - since arrays are numbered from 0, my_array[6] is position 7 - therefore the game generates an error and crashes.

           Using Arrays

    Now how do we use an array practically? Exactly the same as we would use a normal variable, as shown in the following examples:

    // Add two array values together
    total = array[0] + array[5];

    // Check an array value
    - if array[9] == 10
    + if (array[9] == 10)
    {
        // Do something
    }
    @@ -73,16 +73,16 @@

           Using Arrays

    // Draw an array value
    draw_text(32, 32, array[3]);

    -

    Since arrays are numbered sequentially, this means you can loop through them to perform extra actions too, just like we did to initialize it:

    -

    var total = 0;
    +

    Since arrays are numbered sequentially, this means you can loop through them to perform extra actions too, just like we did to initialise it:

    +

    var _total = 0;

    for (var i = 0; i < 10; ++i)
    {
    -     total += array[i];
    -     draw_text(32, 32 + (i * 32), array[i]);
    +     _total += array[i];
    +     draw_text(32, 32 + (i * 32), array[i]);
    }

    - draw_text(32, 32 + (i * 32), total); + draw_text(32, 32 + (i * 32), _total);

    The above code will add up all the values in our array, draw each one of them and then draw the total value at the end.

           Deleting Arrays

    @@ -103,7 +103,7 @@

           Deleting Arrays

    We now know what a 1-dimensional array is, but in GameMaker you can have arrays with multiple dimensions, which are essentially structured as an array inside an array inside an array... For example, the following is a 2D (two-dimensional) array:

    array[0][0] = 5;

    -

    This is essentially telling GameMaker that the array is actually comprised of various 1D arrays. Here's an extended example:

    +

    This is essentially telling GameMaker that the array is actually comprised of various 1D arrays. Here's an extended example:

    array[0][0] = 0;
    array[0][1] = 1;
    array[0][2] = 2;
    @@ -112,23 +112,23 @@

           Deleting Arrays

    array[1][1] = 4;
    array[1][2] = 5;

    -

    In the above code, array[0] holds another array, and so does array[1].

    +

    In the above code, array[0] holds another array, and so does array[1].

    Alternatively, to access 2D arrays you can also use the following syntax: 

    array[0, 0] = 5;

     The above syntax only works for 2D arrays.

    -

    A multi-dimension array needs to be initialised before use, the same as a single 1D array, and can hold real numbers, strings, and any other data type, just like any variable, making them ideal candidates for any game that needs to store large amounts of data in an easily accessible way (remember, you can loop through an array easily).

    -

    You can also initialize a multi-dimensional array within one statement by nesting 1-dimensional arrays:

    +

    A multi-dimensional array needs to be initialised before use, the same as a single 1D array, and can hold real numbers, strings, and any other data type, just like any variable, making them ideal candidates for any game that needs to store large amounts of data in an easily accessible way (remember, you can loop through an array easily).

    +

    You can also initialise a multi-dimensional array within one statement by nesting 1-dimensional arrays:

    two_dimensional_array = 
    [
        ["Apple", 10, 2],
        ["Orange", 5, 2],
        ["Mango", 15, 4],
        // ...and so on.
    - ]

    -

    Multi-dimension arrays are also not limited to just two dimensions, and you can have 3, 4 or more dimensions to an array as required in your code, just by adding [n] further arguments, eg:

    + ];

    +

    Multi-dimensional arrays are also not limited to just two dimensions, and you can have 3, 4 or more dimensions to an array as required in your code, just by adding [n] further arguments, e.g.:

    array[0][0][0] = 1;     // A three dimensional array
    array[0][0][0][0] = 1;  // A four dimensional array
    - // etc...

    + // Etc.

    It should be noted too that the length of each dimension in an array can be different, so you can have the initial array dimension with a length of 3, but the second dimension entry can be a different length for each slot in the first dimension; for example:

    array[2][2] = "3";
    array[2][1] = "2";
    @@ -142,10 +142,10 @@

           Deleting Arrays

    array[0][1] = 2;
    array[0][0] = 1;

    -

    In the above code, array[0] has 2 slots, array[1] has 4 slots and array[2] has 3 slots.

    +

    In the above code, array[0] has 2 slots, array[1] has 4 slots and array[2] has 3 slots.

           Extended Example

    Here is one final example of how this may be used in an actual game: Say you want to spawn four different enemies at four different points in your game depending on a random value. Well, we can use an array with 2 dimensions to do this and save writing out a load of code.

    -

    First we should initialize the array we are going to use in the Create event of our "controller" object (note the use of comments to remind you what each array entry does):

    +

    First we should initialise the array we are going to use in the Create event of our "controller" object (note the use of comments to remind you what each array entry does):

    enemy[3][2] = 448;       //y position
    enemy[3][1] = 32;        //x position
    enemy[3][0] = obj_Slime; //Object
    @@ -165,7 +165,7 @@

           Extended Example

    //Use the array to create the object
    instance_create_layer(enemy[i][1], enemy[i][2], "Enemy_Layer", enemy[i][0]);

    -

    That short code will now spawn a random enemy in the game room, and it uses far less code than an "if / then / else" structure or even a "switch", and as the array is initialized all together in the create event it is MUCH easier to edit and change any of those values as they are not hard-coded into the rest of the project code.

    +

    That short code will now spawn a random enemy in the game room, and it uses far less code than an "if / then / else" structure or even a "switch", and as the array is initialised all together in the Create event it is MUCH easier to edit and change any of those values as they are not hard-coded into the rest of the project code.

     

    Also see: Array Functions

    @@ -185,22 +185,22 @@

    Arrays as Function Arguments


    show_debug_message(my_array); // Prints [2, 4, 6];

    -

    In previous GameMaker versions, this was not the case, as modifying an array inside a function would create a copy instead. This deprecated behaviour can still be enabled if desired: read the "Copy on Write" section below for more information.

    -

    Copy on Write

    +

    In previous GameMaker versions, this was not the case, as modifying an array inside a function would create a copy instead. This deprecated behaviour can still be enabled if desired: read the "Copy on Write" section below for more information.

    +

    Copy on Write 

    The Copy on Write behaviour is deprecated, and is only used when "Enable Copy on Write behaviour for Arrays" is enabled in the General Game Options. This section describes the behaviour of arrays when this option is enabled.

    -

    As described in the previous section, arrays can be passed into functions as arguments. To do this, you simply have to specify the array variable (no need for each of the individual positions, nor the [] brackets) and the entire array will be passed by reference into the function:

    +

    As described in the previous section, arrays can be passed into functions as arguments. To do this, you simply have to specify the array variable (no need for each of the individual positions, nor the [ ] brackets) and the entire array will be passed by reference into the function:

    my_array = [1, 2, 4, 8, 16];

    do_something(my_array);

    However, when Copy on Write is enabled, changing any of the array's values inside the function creates a temporary copy with your modifications. The original array is not modified. This behaviour is called Copy on Write.

    -

    To actually modify the original array that was passed into the function, you must either return it back, or use the @ accessor.

    +

    To actually modify the original array that was passed into the function, you must either return it back, or use the @ accessor.

    For example, the function called above, do_something(), may do something simple like this:

    do_something = function(array)
    {
        array[1] = 200;
    }

    -

    Now you would expect my_array to hold the values 1, 200, 4, etc., which would normally be correct -- but when Copy on Write is enabled, the original array remains unaffected.

    +

    Now you would expect my_array to hold the values 1, 200, 4, etc., which would normally be correct - but when Copy on Write is enabled, the original array remains unaffected.

    To work around this, you can make the function return the modified array copy, and then apply it back to the original variable:

    my_array = [1, 2, 4, 8, 16];

    @@ -214,8 +214,8 @@

    Copy on Write

        return array;
    }

    -

    NOTE The above code is not necessary if you are not changing any of the array's values, but rather referencing them. Referencing an array will not copy it and will be faster to parse.

    -

    The second solution is to use the @ accessor to change the array values directly, which saves the CPU overhead of having to make a temporary copy. This means that you do not need to return the array from the function and can edit it directly:

    +

     The above code is not necessary if you are not changing any of the array's values, but rather referencing them. Referencing an array will not copy it and will be faster to parse.

    +

    The second solution is to use the @ accessor to change the array values directly, which saves the CPU overhead of having to make a temporary copy. This means that you do not need to return the array from the function and can edit it directly:

    do_something = function(array)
    {
        array[@ 1] = 200;
    @@ -224,19 +224,18 @@

    Copy on Write

    Again, all of this is not necessary if Copy on Write is disabled (which is the default and recommended option).

    Find out more information on accessors and how they work, along with an example for arrays, from the following page:

     

     

    -

     

    part_system_create_layer

    -

    This function creates a new particle system on a given layer and returns its handle.

    -

    You give the unique layer ID as returned by the function layer_create or the name of the layer to use as a string - for example "instance_layer" - and then flag the system as being persistent or not.

    +

    This function creates a new particle system on the given layer and returns its handle.

    +

    You give the unique layer ID as returned by the function layer_create or the name of the layer to use as a string - for example "instance_layer" - and then flag the system as being persistent or not.

    Optionally you can provide a Particle System Asset created using The Particle System Editor. Doing so will create the system defined in that asset, with all of its emitters.

    A system not flagged as persistent is automatically destroyed at the end of the room it was created in (this is the same as if you had called the function part_system_destroy and will also destroy any emitters associated with the system). However, when flagged as persistent, the system will be carried to the next room when the room is changed, and if the following room does not have a layer with the same name or depth as the one assigned, then a new layer will be created for the system that is persisting across the rooms, and it will be named the same as the original layer. When changing rooms, if there is another layer in the following rooms with the same name, then the persisted instance will be assigned to the layer with that name regardless of the depth of the layer. Finally, if a persisted system moves to a room with a layer at the same depth as the layer the system was created on, it will not be assigned to this layer, but instead a new layer will be created at the same depth (with the same name as the original layer).

     If you flag the particle system as persistent, it will need to be cleaned up manually using part_system_destroy when not in use, otherwise you risk a memory leak that will negatively impact your final game.

    @@ -39,7 +39,7 @@

    Syntax:

    persistent Boolean - Flag the particle system as persistent (set to true) or not (set to false) + Flag the particle system as persistent (set to true) or not (set to false) partsys @@ -53,8 +53,8 @@

    Returns:

    Particle System Instance

     

    Example:

    -

    global.p_sys = part_system_create_layer("effects_layer", true, ps_Explosion);

    -

    The above code will create a new particle system on the given layer from the ps_Explosion asset, and flag it as persisting over subsequent rooms. The ID for the particle system is stored in a global scope variable p_sys for future reference.

    +

    global.part_sys = part_system_create_layer("effects_layer", true, ps_explosion);

    +

    The above code creates a new particle system on the given layer from the ps_explosion asset, and flags it as persisting over subsequent rooms. The ID of the particle system is stored in a global scope variable part_sys for future reference.