Skip to content

Commit 43c8f3c

Browse files
authored
Merge pull request #458 from stride3d/master
Deploy latest documentation updates to staging
2 parents 89cbf78 + e38da58 commit 43c8f3c

8 files changed

Lines changed: 148 additions & 14 deletions

File tree

en/ReleaseNotes/ReleaseNotes.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ Stride contributors are thrilled to announce the release of Stride 4.3, now full
66

77
Read the full blog post here: [Announcing Stride 4.3](https://www.stride3d.net/blog/announcing-stride-4-3-in-dotnet-10/)
88

9-
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.
9+
A massive thank you to the open-source Stride community for your dedicated contributions.
1010

1111
## What's new in this release
1212
Stride 4.3 includes numerous enhancements and improvements. Here’s what to expect:
1313

1414
- **.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/)
1515

16-
- **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)
16+
- **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/)
1717

1818
## What has changed since Stride 4.2
1919

@@ -82,7 +82,6 @@ Although there have been [many fixes](https://github.com/stride3d/stride/pulls?p
8282

8383
### Also good to know
8484

85-
[WIP]
8685
We are already hard at work on a bunch of ongoing projects for version 4.4 and beyond;
8786
- Continuing work to allow for building games *from* other platforms
8887
- Converting our Windows-only GameStudio to cross-platform through Avalonia

en/contributors/documentation/major-release-workflow.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ Assuming the transition is from version `4.1` to `4.2`, and that the Stride sour
2020
- `dotnet-version:` Update to the related .NET version
2121
1. Merging `master` to `staging` branch will automatically trigger deployment to our [staging environment](https://stride-doc-staging.azurewebsites.net/latest/en/)
2222
1. ⚠️ Merging `master` to `release` branch will automatically trigger deployment to our production website
23+
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
2324

2425
> [!CAUTION]
2526
> ⚠️ 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.
2627
28+
> [!CAUTION]
29+
> 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.
30+
2731
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.
2832

2933
## Other locations to update
@@ -44,4 +48,4 @@ The `BuildDocs.ps1` script will manage the deployment to the `4.2` folder while
4448
- Update Visual Studio version
4549
1. Modify `includes\docs-prerequisites.md`
4650
- Update SDK and .NET version references
47-
- Update Visual Studio version
51+
- Update Visual Studio version

en/contributors/major-release-workflow.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
1. Bump engine version ([example commit](https://github.com/Eideren/xenko/commit/6fb6580b3c60b98d16e2f01d0cce449d568886da))
1717
1. If there is a .NET SDK version upgrade:
1818
- 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))
19+
- Also, add the new .NET Framework in VSPackage StrideCommandsProxy.cs ([example commit](https://github.com/stride3d/stride/commit/dc8ba75d3b127ee39c9650c9c5cbf07a1d730b0c#diff-ed3d93093709147db6205c48c4015b60d98f44ad8d555e94d825e44f5999efb3R181))
20+
1. If there is a new Visual Studio released:
21+
- Assuming there is no major breaking changes, simply updating the vsixmanifest so that it can do VS2022, VS2026 and any new versions is enough.
1922
1. Optional: Update Stride development NuGet packages version in all samples in `https://github.com/stride3d/stride/tree/master/samples`
2023
- 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
2124
- 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)

en/manual/graphics/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ The graphics module provides a set of methods to display the game. Although Stri
2525
* [Textures](textures/index.md)
2626
* [Lights and shadows](lights-and-shadows/index.md)
2727
* [Post effects](post-effects/index.md)
28+
* [Window Configuration](window-configuration.md)
2829
* [Graphics compositor](graphics-compositor/index.md)
2930
* [Effects and shaders](effects-and-shaders/index.md)
3031
* [Low-level API](low-level-api/index.md)
3132
* [Rendering pipeline](rendering-pipeline/index.md)
3233
* [Sprite fonts](sprite-fonts.md)
3334
* [Voxel Cone Tracing GI](lights-and-shadows/voxel-cone-tracing-gi.md)
34-
* [Graphics API](graphics-api.md)
35+
* [Graphics API](graphics-api.md)
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# Window Configuration
2+
3+
<span class="badge text-bg-primary">Beginner</span>
4+
5+
Properties of the game's window can be controled through code.
6+
7+
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`.
8+
9+
> [!Note]
10+
> 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.
11+
12+
```csharp
13+
using Stride.Engine;
14+
15+
namespace MyGame
16+
{
17+
public class WindowSetupScript : StartupScript
18+
{
19+
public override void Start()
20+
{
21+
// Set window properties here
22+
23+
// Example
24+
Game.Window.IsBorderLess = true;
25+
}
26+
}
27+
}
28+
```
29+
30+
## Making the window resizable
31+
32+
To allow for window resizing, set `AllowUserResizing` to `true`.
33+
34+
```csharp
35+
Game.Window.AllowUserResizing = true
36+
```
37+
38+
## Fullscreen
39+
40+
To enter fullscreen mode, set `IsFullscreen` to `true`.
41+
42+
```csharp
43+
Game.Window.IsFullscreen = true
44+
```
45+
46+
By default, Stride uses **exclusive fullscreen**. This can be changed to **borderless fullscreen** by setting `FullscreenIsBorderlessWindow` to `true`.
47+
48+
```csharp
49+
Game.Window.FullscreenIsBorderlessWindow = true;
50+
```
51+
52+
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.
53+
54+
> [!Note]
55+
> **Exclusive fullscreen** can slightly improve performence, but is generally disliked by most players due to making switching between different applications slower and more cumbersome.
56+
57+
## Resolution
58+
59+
Resolution can be set using the `SetSize` method and read using the `ClientBounds` property.
60+
61+
```csharp
62+
// Setting the window size to 1920x1080
63+
Game.Window.SetSize(new Int2(1920, 1080));
64+
65+
// Reading window size and position
66+
var newBounds = Game.Window.ClientBounds;
67+
```
68+
69+
The size of the entire screen can be found in `Game.GraphicsDevice`.
70+
71+
```csharp
72+
// List of all connected displays
73+
var monitors = Game.GraphicsDevice.Outputs;
74+
75+
// Reading the size and position of the first connected display
76+
var bounds = monitors[0].DesktopBounds;
77+
```
78+
79+
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.
80+
81+
```csharp
82+
var supportedDisplayModes = monitors[0].SupportedDisplayModes;
83+
84+
// Create a list of avaliable resolutions
85+
var resolutions = new List<Int2>();
86+
foreach (var mode in supportedDisplayModes)
87+
{
88+
var res = new Int2(mode.Width, mode.Height);
89+
if (!resolutions.Contains(res))
90+
resolutions.Add(res);
91+
}
92+
```
93+
94+
## Title
95+
96+
The window title can be changed using the `Title` property.
97+
98+
```csharp
99+
Game.Window.Title = "My Title Here";
100+
```
101+
102+
## Other window properties
103+
104+
Here are other miscellaneous window properties.
105+
106+
```csharp
107+
// Changes window opacity
108+
Game.Window.Opacity = 0.6f;
109+
110+
// Removes window borders
111+
Game.Window.IsBorderless = true;
112+
113+
// Changes mouse visibility
114+
Game.Window.IsMouseVisible = false;
115+
116+
// Changes the position of the window
117+
Game.Window.Position = new Int2(50, 50);
118+
119+
120+
// True when the window has focus
121+
var hasFocus = Game.Window.IsFocused;
122+
123+
// True when the window is minimized
124+
var minimized = Game.Window.IsMinimized;
125+
```

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ In this tutorial, we'll create a [trigger](triggers.md) that doubles the size of
1212

1313
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.
1414

15-
## 3. Add a trigger
15+
## 2. Add a trigger
1616

1717
Now we'll add a trigger between the ball and the ground, so the ball passes through it.
1818

@@ -36,7 +36,7 @@ Now we'll add a trigger between the ball and the ground, so the ball passes thro
3636

3737
This gives the trigger a box shape.
3838

39-
## 4. Give the trigger a model
39+
## 3. Give the trigger a model
4040

4141
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.
4242

@@ -86,15 +86,15 @@ Right now, the trigger is invisible at runtime. To better show how the trigger w
8686

8787
Now the trigger area will be visible at runtime.
8888

89-
## 5. Position the trigger
89+
## 4. Position the trigger
9090

9191
We need to position the trigger between the ground and the sphere, so the ball falls through it.
9292

9393
In the **Property Grid**, under **Transform**, set the **Position** to: *X:0, Y:3, Z:0*
9494

9595
Now the trigger entity is between the ground and the sphere.
9696

97-
## 6. Change the sphere size with script
97+
## 5. Change the sphere size with script
9898

9999
If we run the project now (**F5**), the ball bounces off the trigger, but nothing happens.
100100

@@ -162,7 +162,7 @@ Let's write a script to change the size of the ball when it enters the trigger.
162162

163163
4. Reload the assemblies.
164164

165-
## 7. Add the script
165+
## 6. Add the script
166166

167167
Finally, let's add this script to the trigger entity as a component.
168168

@@ -180,7 +180,7 @@ Finally, let's add this script to the trigger entity as a component.
180180

181181
![Set contact handler](media/physics-tutorials-create-a-trigger-select-handler-component.png)
182182

183-
## 8. Run the project
183+
## 7. Run the project
184184

185185
Run the project (**F5**) to see the trigger in action.
186186

@@ -197,4 +197,4 @@ The ball falls through the trigger, doubles in size, exits the trigger, and retu
197197
* [Tutorial: Create a bouncing ball](create-a-bouncing-ball.md)
198198
* [Colliders](colliders.md)
199199
* [Collider shapes](collider-shapes.md)
200-
* [Scripts](../scripts/index.md)
200+
* [Scripts](../scripts/index.md)

en/manual/scripts/custom-assets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Here's how it looks like in a default game project:
2424
</Project>
2525
```
2626
> [!Warning]
27-
> Make sure that the version specified for `Stride.Core.Assets` matches the other package's versions.
27+
> 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.
2828
2929
Inside the same project, create a new csharp file and replace its content with the following:
3030
```cs

en/manual/toc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@ items:
289289
href: graphics/post-effects/light-streaks.md
290290
- name: Local reflections
291291
href: graphics/post-effects/local-reflections.md
292+
- name: Window Configuration
293+
href: graphics/window-configuration.md
292294
- name: Graphics compositor
293295
href: graphics/graphics-compositor/index.md
294296
items:
@@ -636,4 +638,4 @@ items:
636638
href: troubleshooting/unable-to-resolve-stride-game-studio.md
637639

638640
- name: Glossary
639-
href: glossary/index.md
641+
href: glossary/index.md

0 commit comments

Comments
 (0)