Browse Source

Merge pull request #458 from stride3d/master

Deploy latest documentation updates to staging
Vaclav Elias 1 week ago
parent
commit
43c8f3c04a

+ 2 - 3
en/ReleaseNotes/ReleaseNotes.md

@@ -6,14 +6,14 @@ Stride contributors are thrilled to announce the release of Stride 4.3, now full
 
 Read the full blog post here: [Announcing Stride 4.3](https://www.stride3d.net/blog/announcing-stride-4-3-in-dotnet-10/)
 
-A massive thank you to the open-source Stride community for your dedicated contributions. This release saw over 75 contributions from more than 22 amazing contributors, each playing a crucial role in making Stride 4.3 a reality.
+A massive thank you to the open-source Stride community for your dedicated contributions.
 
 ## What's new in this release
 Stride 4.3 includes numerous enhancements and improvements. Here’s what to expect:
 
 - **.NET 10 Integration**: Stride 4.3 is now fully aligned with .NET 10, harnessing its performance improvements and efficiency gains for game development. This means faster execution times, reduced memory footprint, and access to the latest C# features, making your development smoother and more efficient. [Learn more](https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-10/)
  
-- **C# 14 Features**: With C# 14, Stride users can write cleaner, more concise code thanks to new language features. These improvements reduce boilerplate and enhance readability. [Discover C# 14](https://learn.microsoft.com/en-gb/dotnet/csharp/whats-new/csharp-14)
+- **C# 14 Features**: With C# 14, Stride users can write cleaner, more concise code thanks to new language features. These improvements reduce boilerplate and enhance readability. [Discover C# 14](https://devblogs.microsoft.com/dotnet/introducing-csharp-14/)
 
 ## What has changed since Stride 4.2
 
@@ -82,7 +82,6 @@ Although there have been [many fixes](https://github.com/stride3d/stride/pulls?p
 
 ### Also good to know
 
-[WIP]
 We are already hard at work on a bunch of ongoing projects for version 4.4 and beyond;
 - Continuing work to allow for building games *from* other platforms
 - Converting our Windows-only GameStudio to cross-platform through Avalonia

+ 5 - 1
en/contributors/documentation/major-release-workflow.md

@@ -20,10 +20,14 @@ Assuming the transition is from version `4.1` to `4.2`, and that the Stride sour
    - `dotnet-version:` Update to the related .NET version
 1. Merging `master` to `staging` branch will automatically trigger deployment to our [staging environment](https://stride-doc-staging.azurewebsites.net/latest/en/)
 1. ⚠️ Merging `master` to `release` branch will automatically trigger deployment to our production website
+1. It might take up to 24 hours for the CDN to refresh. The best approach is to contact the core contributors and request a CDN reset
 
 > [!CAUTION]
 > ⚠️ You must manually rename the existing folder on the server from `4.1` to `4.1-backup`, otherwise, the deployment to production will delete this folder while deploying to the `4.2` folder. Once `4.2` is deployed, it is safe to rename `4.1-backup` back to `4.1`. Any further deployments will affect only the `4.2` folder.
 
+> [!CAUTION]
+> There is a rule `<action type="Rewrite" url="4.3/{R:1}" />` in the root `web.config` that might need adjustment, even though it already points to **4.3**. Changing it to **4.2** will correctly show the 4.2 docs as the default, as expected. After switching it back to **4.3**, if the site still displays **4.2**, try appending `?randomtext` to the end of the URL. This forces an uncached version, which should finally display the **4.3** docs. At that point, the **4.3** rewrite rule is confirmed to work for uncached pages, meaning the CDN needs to be reset.
+
 The `BuildDocs.ps1` script will manage the deployment to the `4.2` folder while maintaining accessibility to previous versions. Note, that the deployment profile must be set to not delete existing items.
 
 ## Other locations to update
@@ -44,4 +48,4 @@ The `BuildDocs.ps1` script will manage the deployment to the `4.2` folder while
    - Update Visual Studio version
 1. Modify `includes\docs-prerequisites.md` 
    - Update SDK and .NET version references
-   - Update Visual Studio version 
+   - Update Visual Studio version 

+ 3 - 0
en/contributors/major-release-workflow.md

@@ -16,6 +16,9 @@
 1. Bump engine version ([example commit](https://github.com/Eideren/xenko/commit/6fb6580b3c60b98d16e2f01d0cce449d568886da))
 1. If there is a .NET SDK version upgrade:
    - Aside from usual changes ([example PR](https://github.com/stride3d/stride/pull/2888)), one important thing is to update the prerequisites installer ([example commit](https://github.com/stride3d/stride/commit/65e93bef9dd301007e65e0c2c684dd6cbc3906a8)) and `global.json` ([example commit](https://github.com/stride3d/stride/commit/4333cd2e28c3ecbbc8462635b80e038cd6cb3ec7))
+   - Also, add the new .NET Framework in VSPackage StrideCommandsProxy.cs ([example commit](https://github.com/stride3d/stride/commit/dc8ba75d3b127ee39c9650c9c5cbf07a1d730b0c#diff-ed3d93093709147db6205c48c4015b60d98f44ad8d555e94d825e44f5999efb3R181))
+1. If there is a new Visual Studio released:
+   - Assuming there is no major breaking changes, simply updating the vsixmanifest so that it can do VS2022, VS2026 and any new versions is enough.
 1. Optional: Update Stride development NuGet packages version in all samples in `https://github.com/stride3d/stride/tree/master/samples`
    - This is especially useful if there are asset upgrader taking a lot of time; otherwise, the default project upgrader will still be run on sample creation
    - Open `samples\Stride.Samples.sln` with GameStudio. Let upgrade run, and do a "save all" from GameStudio; if there is any error opening the project, fix them and reset files before reopening (do not save incomplete `csproj` changes without asset upgrades)

+ 2 - 1
en/manual/graphics/index.md

@@ -25,10 +25,11 @@ The graphics module provides a set of methods to display the game. Although Stri
 * [Textures](textures/index.md)
 * [Lights and shadows](lights-and-shadows/index.md)
 * [Post effects](post-effects/index.md)
+* [Window Configuration](window-configuration.md)
 * [Graphics compositor](graphics-compositor/index.md)
 * [Effects and shaders](effects-and-shaders/index.md)
 * [Low-level API](low-level-api/index.md)
 * [Rendering pipeline](rendering-pipeline/index.md)
 * [Sprite fonts](sprite-fonts.md)
 * [Voxel Cone Tracing GI](lights-and-shadows/voxel-cone-tracing-gi.md)
-* [Graphics API](graphics-api.md)
+* [Graphics API](graphics-api.md)

+ 125 - 0
en/manual/graphics/window-configuration.md

@@ -0,0 +1,125 @@
+# Window Configuration
+
+<span class="badge text-bg-primary">Beginner</span>
+
+Properties of the game's window can be controled through code.
+
+Currently, this cannot be configured in Game Studio, so a simple alternative is to have a [`Startup Script`](../scripts/types-of-script#startup-scripts) in the root scene of your project, that changes values of `Game.Window`.
+
+> [!Note]
+> The best solution would be to change these properties before the window is opened, by overriding the `Game` class, but this is outside of the scope of this page.
+
+```csharp
+using Stride.Engine;
+
+namespace MyGame
+{
+    public class WindowSetupScript : StartupScript
+    {
+        public override void Start()
+        {
+            // Set window properties here
+            
+            // Example
+            Game.Window.IsBorderLess = true;
+        }
+    }
+}
+```
+
+## Making the window resizable
+
+To allow for window resizing, set `AllowUserResizing` to `true`.
+
+```csharp
+Game.Window.AllowUserResizing = true
+```
+
+## Fullscreen
+
+To enter fullscreen mode, set `IsFullscreen` to `true`.
+
+```csharp
+Game.Window.IsFullscreen = true
+```
+
+By default, Stride uses **exclusive fullscreen**. This can be changed to **borderless fullscreen** by setting `FullscreenIsBorderlessWindow` to `true`.
+
+```csharp
+Game.Window.FullscreenIsBorderlessWindow = true;
+```
+
+The main difference between these two fullscreen modes is that **exclusive fullscreen** renders the game directly to the screen, while **borderless fullscreen** resizes the window to take up the entire display.
+
+> [!Note]
+> **Exclusive fullscreen** can slightly improve performence, but is generally disliked by most players due to making switching between different applications slower and more cumbersome.
+
+## Resolution
+
+Resolution can be set using the `SetSize` method and read using the `ClientBounds` property.
+
+```csharp
+// Setting the window size to 1920x1080
+Game.Window.SetSize(new Int2(1920, 1080));
+
+// Reading window size and position
+var newBounds = Game.Window.ClientBounds;
+```
+
+The size of the entire screen can be found in `Game.GraphicsDevice`.
+
+```csharp
+// List of all connected displays
+var monitors = Game.GraphicsDevice.Outputs;
+
+// Reading the size and position of the first connected display
+var bounds = monitors[0].DesktopBounds;
+```
+
+Each output also contains a list of supported display modes for the monitor. This is useful for **creating a resolution dropdown** in a settings menu of your game.
+
+```csharp
+var supportedDisplayModes = monitors[0].SupportedDisplayModes;
+
+// Create a list of avaliable resolutions
+var resolutions = new List<Int2>();
+foreach (var mode in supportedDisplayModes)
+{
+    var res = new Int2(mode.Width, mode.Height);
+    if (!resolutions.Contains(res))
+        resolutions.Add(res);
+}
+```
+
+## Title
+
+The window title can be changed using the `Title` property.
+
+```csharp
+Game.Window.Title = "My Title Here";
+```
+
+## Other window properties
+
+Here are other miscellaneous window properties. 
+
+```csharp
+// Changes window opacity
+Game.Window.Opacity = 0.6f;
+
+// Removes window borders
+Game.Window.IsBorderless = true;
+
+// Changes mouse visibility
+Game.Window.IsMouseVisible = false;
+
+// Changes the position of the window
+Game.Window.Position = new Int2(50, 50);
+
+
+// True when the window has focus
+var hasFocus = Game.Window.IsFocused;
+
+// True when the window is minimized
+var minimized = Game.Window.IsMinimized;
+```

+ 7 - 7
en/manual/physics/script-a-trigger.md

@@ -12,7 +12,7 @@ In this tutorial, we'll create a [trigger](triggers.md) that doubles the size of
 
 Follow the instructions in the [Create a bouncing ball](create-a-bouncing-ball.md) tutorial. This creates a simple scene in which a ball falls from midair, hits the ground, and bounces.
 
-## 3. Add a trigger 
+## 2. Add a trigger 
 
 Now we'll add a trigger between the ball and the ground, so the ball passes through it.
 
@@ -36,7 +36,7 @@ Now we'll add a trigger between the ball and the ground, so the ball passes thro
 
    This gives the trigger a box shape.
 
-## 4. Give the trigger a model
+## 3. Give the trigger a model
 
 Right now, the trigger is invisible at runtime. To better show how the trigger works, we'll make it a transparent box. This has no effect on how the trigger works; it just means we can easily see where it is at runtime.
 
@@ -86,7 +86,7 @@ Right now, the trigger is invisible at runtime. To better show how the trigger w
 
     Now the trigger area will be visible at runtime.
 
-## 5. Position the trigger 
+## 4. Position the trigger 
 
 We need to position the trigger between the ground and the sphere, so the ball falls through it.
     
@@ -94,7 +94,7 @@ In the **Property Grid**, under **Transform**, set the **Position** to: *X:0, Y:
 
 Now the trigger entity is between the ground and the sphere.
 
-## 6. Change the sphere size with script
+## 5. Change the sphere size with script
 
 If we run the project now (**F5**), the ball bounces off the trigger, but nothing happens.
 
@@ -162,7 +162,7 @@ Let's write a script to change the size of the ball when it enters the trigger.
 
 4. Reload the assemblies.
 
-## 7. Add the script
+## 6. Add the script
 
 Finally, let's add this script to the trigger entity as a component.
 
@@ -180,7 +180,7 @@ Finally, let's add this script to the trigger entity as a component.
 
    ![Set contact handler](media/physics-tutorials-create-a-trigger-select-handler-component.png)
 
-## 8. Run the project
+## 7. Run the project
 
 Run the project (**F5**) to see the trigger in action.
 
@@ -197,4 +197,4 @@ The ball falls through the trigger, doubles in size, exits the trigger, and retu
 * [Tutorial: Create a bouncing ball](create-a-bouncing-ball.md)
 * [Colliders](colliders.md)
 * [Collider shapes](collider-shapes.md)
-* [Scripts](../scripts/index.md)
+* [Scripts](../scripts/index.md)

+ 1 - 1
en/manual/scripts/custom-assets.md

@@ -24,7 +24,7 @@ Here's how it looks like in a default game project:
 </Project>
 ```
 > [!Warning]
-> Make sure that the version specified for `Stride.Core.Assets` matches the other package's versions.
+> Make sure that the `TargetFrameworks` and all package versions match your current Stride version. The example above shows version 4.2.0.1 for reference.
 
 Inside the same project, create a new csharp file and replace its content with the following:
 ```cs

+ 3 - 1
en/manual/toc.yml

@@ -289,6 +289,8 @@ items:
             href: graphics/post-effects/light-streaks.md
           - name: Local reflections
             href: graphics/post-effects/local-reflections.md
+      - name: Window Configuration
+        href: graphics/window-configuration.md
       - name: Graphics compositor
         href: graphics/graphics-compositor/index.md
         items:
@@ -636,4 +638,4 @@ items:
         href: troubleshooting/unable-to-resolve-stride-game-studio.md
 
   - name: Glossary
-    href: glossary/index.md
+    href: glossary/index.md