Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed May 1, 2024
2 parents 076ad17 + 44f5a6b commit 6174c66
Show file tree
Hide file tree
Showing 19 changed files with 78 additions and 832 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name: "RoboHelp"
runs-on: windows-2019
env:
LANGUAGE: ${{ vars.LANGUAGE }}
LANGUAGE_MAIN: ${{ vars.LANGUAGE_MAIN }}
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ <h4>リターンです。</h4>
<p> </p>
<h4></h4>
<p class="code">var obj = asset_get_index(&quot;obj_Enemy_&quot; + string(global.Level));<br />
if (obj &gt; -1) <br />
<br />
if (object_exists(obj))<br />
{<br />
    instance_create_layer(random(room_width), random(room_height), obj, &quot;Enemy_Layer&quot;);<br />
}</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>bbox_bottom</title>
<meta name="generator" content="Adobe RoboHelp 2020" />
<meta name="generator" content="Adobe RoboHelp 2022" />
<link rel="stylesheet" href="../../../../../assets/css/default.css" type="text/css" />
<script src="../../../../../assets/scripts/main_script.js"></script>
<meta name="rh-authors" content="Mark Alexander" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>bbox_left</title>
<meta name="generator" content="Adobe RoboHelp 2020" />
<meta name="generator" content="Adobe RoboHelp 2022" />
<link rel="stylesheet" href="../../../../../assets/css/default.css" type="text/css" />
<script src="../../../../../assets/scripts/main_script.js"></script>
<meta name="rh-authors" content="Mark Alexander" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>bbox_right</title>
<meta name="generator" content="Adobe RoboHelp 2020" />
<meta name="generator" content="Adobe RoboHelp 2022" />
<link rel="stylesheet" href="../../../../../assets/css/default.css" type="text/css" />
<script src="../../../../../assets/scripts/main_script.js"></script>
<meta name="rh-authors" content="Mark Alexander" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>bbox_top</title>
<meta name="generator" content="Adobe RoboHelp 2020" />
<meta name="generator" content="Adobe RoboHelp 2022" />
<link rel="stylesheet" href="../../../../../assets/css/default.css" type="text/css" />
<script src="../../../../../assets/scripts/main_script.js"></script>
<meta name="rh-authors" content="Mark Alexander" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ds_queue_head</title>
<meta name="generator" content="Adobe RoboHelp 2020" />
<meta name="generator" content="Adobe RoboHelp 2022" />
<link rel="stylesheet" href="../../../../assets/css/default.css" type="text/css" />
<script src="../../../../assets/scripts/main_script.js"></script>
<meta name="rh-authors" content="Mark Alexander" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ds_queue_tail</title>
<meta name="generator" content="Adobe RoboHelp 2020" />
<meta name="generator" content="Adobe RoboHelp 2022" />
<link rel="stylesheet" href="../../../../assets/css/default.css" type="text/css" />
<script src="../../../../assets/scripts/main_script.js"></script>
<meta name="rh-authors" content="Mark Alexander" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>draw_sprite</title>
<meta name="generator" content="Adobe RoboHelp 2020" />
<meta name="generator" content="Adobe RoboHelp 2022" />
<link rel="stylesheet" href="../../../../assets/css/default.css" type="text/css" />
<script src="../../../../assets/scripts/main_script.js"></script>
<meta name="rh-authors" content="Mark Alexander" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>draw_flush</title>
<meta name="generator" content="Adobe RoboHelp 2019" />
<meta name="generator" content="Adobe RoboHelp 2022" />
<link rel="stylesheet" href="../../../assets/css/default.css" type="text/css" />
<script src="../../../assets/scripts/main_script.js"></script>
<meta name="rh-authors" content="Mark Alexander" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ <h4>Example:</h4>
            {<br />
                type: &quot;range&quot;,<br />
                name: &quot;speed&quot;,<br />
                &quot;label&quot;: &quot;Rotation speed&quot;,<br />
                label: &quot;Rotation speed&quot;,<br />
                value: 50,<br />
                min: 0,<br />
                max: 200,<br />
Expand Down Expand Up @@ -189,7 +189,7 @@ <h4>Example:</h4>
<div>Next: <a href="wallpaper_set_subscriptions.htm">wallpaper_set_subscriptions</a></div>
</div>
</div>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2023 All Rights Reserved</span></h5>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2024 All Rights Reserved</span></h5>
</div>
<!-- KEYWORDS
wallpaper_set_config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Dynamic Textures</title>
<meta name="generator" content="Adobe RoboHelp 2020" />
<meta name="generator" content="Adobe RoboHelp 2022" />
<link rel="stylesheet" href="../../assets/css/default.css" type="text/css" />
<script src="../../assets/scripts/main_script.js" type="module"></script>
<meta name="rh-authors" content="Gurpreet S. Matharoo" />
Expand Down Expand Up @@ -71,7 +71,7 @@ <h2>More Functions</h2>
<div>Next: <a data-xref="{title}" href="Texture_Pages.htm">Texture Pages</a></div>
</div>
</div>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2022 All Rights Reserved</span></h5>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2024 All Rights Reserved</span></h5>
</div>
<!-- KEYWORDS
Dynamic Texture Pages
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Adobe RoboHelp 2022" />
<title>Texture Compression</title>
<meta name="topic-status" content="Draft" />
<link rel="stylesheet" type="text/css" href="../../assets/css/default.css" />
<meta name="topic-comment" content="Overview page for texture compression" />
<meta name="template" content="../../assets/masterpages/Manual_Page.htt" />
<meta name="search-keywords" content="texture,compression,BCN,BC3,BC7,ASTC,GPU" />
<meta name="rh-index-keywords" content="Texture Compression" />
</head>
<body>
<h1><span data-field="title" data-format="default">Texture Compression</span></h1>
<p>Texture compression is image compression applied to textures specifically.</p>
<p>A game&#39;s textures can take up a large part of memory, in RAM as well as in VRAM.<span> For example, a texture image of 2048 x 2048 pixels that contains all four channels (R, G, B and A) takes up (2048 x 2048) pixels x 4 channels/pixel x 1 bytes/channel = 16777216 bytes, or 16MB of video memory. </span>All this data needs to be loaded into RAM and then sent to VRAM.</p>
<p><span></span>Textures can be compressed to reduce their size, which minimises the amount of data that needs to be moved from RAM memory to VRAM when textures are prefetched (as the available &quot;bandwidth&quot; is limited). Additionally, if your game does many texture lookups and t<span>he platform it&#39;s running on does not have sufficient graphics memory bandwidth to handle the texture reading at a high frame rate, the game may slow down.</span></p>
<p><span data-keyref="GameMaker Name">GameMaker</span> has two ways to allow for texture compression and decompression. Texture compression is set per <a href="../Texture_Groups.htm">texture group</a> and works differently according to the format used: </p>
<ul class="colour">
<li><strong>BZ + </strong><strong>QOI</strong><strong>QOI</strong>, <strong>PNG</strong> - The asset compiler compresses all textures in the texture group to the given format and stores them with the game. When they are loaded from disk into RAM, they remain compressed while in RAM. When a texture from this texture group format is then fetched into VRAM, it is decompressed on the CPU and this decompressed data stored in VRAM.</li>
<li><strong>Custom</strong> - GPU texture compression. The textures are generated at compile time using an external tool that compresses the textures to a format optimised for decompressing on the GPU and are then stored with the game. When a texture of this format is loaded into RAM, it remains compressed there. When it&#39;s fetched into VRAM, the texture data still remains compressed. The texture is decompressed by the GPU in real time when it performs texel lookups on the texture.</li>
</ul>
<p>The following image shows a comparison of different texture formats: </p>
<figure><img alt="" class="center" height="314" src="../../assets/Images/Scripting_Reference/GML/Reference/Drawing/texture_compression_comparison_default_bcn7_bcn3.png" width="462" />
<figcaption>A comparison of different texture group formats.<br />
From left to right: BZ2 + QOI (no GPU texture compression), BC7 and BC3.</figcaption>
</figure>
<h3 id="gpu_compressed_textures">GPU Compressed Textures</h3>
<p>The textures are stored in a compressed format in VRAM and are decompressed in real time by the GPU.</p>
<p>Custom GPU texture compression is done using an extension: <a href="https://github.com/YoYoGames/GM-GPUTextureCompression">GM-GPUTextureCompression</a>. To generate GPU textures, you should first add this extension to your project.</p>
<p>After adding the extension, to enable GPU compressed textures for a texture group: </p>
<ul class="colour">
<li>Set the <a href="../Texture_Groups.htm#texture_group_format">Texture Group Format</a> to <strong>Custom</strong>.</li>
<li>Enter the tool to use, along with the settings under <a href="../Texture_Groups.htm#custom_options">Custom Options</a>. For example, to generate medium quality BC7 compressed textures, set this to <span class="inline2">BCN -u2</span>.</li>
</ul>
<p>When the game is compiled, the textures are generated by the external tool, which is executed through the extension. The tool compresses the textures to a format optimised for decompressing on the GPU.</p>
<p>For full information on the available texture formats that are supported, see the <a href="https://github.com/YoYoGames/GM-GPUTextureCompression/wiki/config">wiki</a>.</p>
<p class="note"><span data-conref="../../assets/snippets/Tag_warning.hts"> </span> Certain texture formats are only supported on certain platforms. You should make sure to select an appropriate one for the platform that you&#39;re compiling to. An error message is shown in <a data-xref="{title}" href="../../Introduction/The_Output_Window.htm">The Output Window</a> if the extension isn&#39;t present or any of the settings is incorrect.</p>
<p>GPU compressed textures are compressed using <em>block compression</em>. This is the most common form of GPU compression and is supported in some format on almost all modern platforms. When the GPU texture is generated from the original image using e.g. BCN compression, it is subdivided into fixed-size blocks of 4x4 pixels or texels (other compression algorithms support different block sizes). The information in the pixels in this block is converted to a 128 bit value. When the GPU reads back this value, it restores the colour value of the requested pixel from it as precisely as possible. See <a href="https://en.wikipedia.org/wiki/S3_Texture_Compression">S3_Texture_Compression</a> for more information.</p>
<p> </p>
<p> </p>
<div class="footer">
<div class="buttons">
<div class="clear">
<div>Back: <a data-xref="{title}" href="../Texture_Groups.htm">Texture Groups</a></div>
<div>Next: <a data-xref="{title}" href="Dynamic_Textures.htm">Dynamic Textures</a></div>
</div>
</div>
<h5><span data-conref="../../assets/snippets/Copyright_Notice_AutoUpdate.hts"> </span></h5>
</div>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Manual/contents/assets/Images/Settings/Texture_Groups.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions Manual/contents/assets/snippets/How_Textures_Work.hts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Adobe RoboHelp 2020" />
<meta name="generator" content="Adobe RoboHelp 2022" />
<meta name="topic-comment" content="This is placed on the main Texture Groups page and the Dynamic Textures page" />
<title>How_Textures_Work</title>
<link rel="stylesheet" type="text/css" href="../css/default.css" />
</head>
<body>
<p>A Texture Group is loaded into RAM when the game starts, unless it&#39;s a <a href="../../Settings/Texture_Information/Dynamic_Textures.htm">Dynamic Texture Group</a>, which is loaded later.</p>
<p>While in the RAM, the Texture Group stays compressed, as it was on disk.</p>
<p>When an image from a Texture Group is drawn, or one of the <a href="../../GameMaker_Language/GML_Reference/Drawing/Textures/texture_prefetch.htm">pre-fetch</a> functions is run, then the Texture Group is decompressed and loaded into VRAM (video memory).</p>
<p class="note"><span data-conref="Tag_note.hts"> </span> Texture decompression is asynchronous on all platforms except GX.games, which might cause stutters as textures are decompressed in-game. To avoid this, ensure your textures are prefetched during loading screens or another inactive parts of your game.</p>
<p>While in RAM memory, the Texture Group stays compressed, as it was on disk.</p>
<p>When an image from a Texture Group is drawn or one of the <a href="../../GameMaker_Language/GML_Reference/Drawing/Textures/texture_prefetch.htm">pre-fetch</a> functions is run, all texture pages of the Texture Group are loaded into <a class="glossterm" data-glossterm="VRAM" href="#">VRAM</a>. For most texture group formats the texture is first decompressed before being loaded into VRAM. If you&#39;re using a <strong>Custom</strong> texture group format, however, the texture is decompressed in real time on the GPU.</p>
<p class="note"><span data-conref="Tag_note.hts"> </span> Texture decompression is asynchronous on all platforms except GX.games, which might cause stutters as textures are decompressed in-game. To avoid this, ensure your textures are prefetched during loading screens or other inactive parts of your game.</p>
<p>You can <a href="../../GameMaker_Language/GML_Reference/Drawing/Textures/texture_flush.htm">flush</a> a Texture Group to remove it from VRAM (this doesn&#39;t remove them from RAM).</p>
</body>
</html>
Loading

0 comments on commit 6174c66

Please sign in to comment.