Skip to content

Commit a1c95f9

Browse files
authored
Merge pull request #481 from stride3d/master
Deploy latest documentation updates to staging
2 parents 66f37ef + 06d8644 commit a1c95f9

1 file changed

Lines changed: 34 additions & 29 deletions

File tree

  • en/manual/stride-for-godot-developers

en/manual/stride-for-godot-developers/index.md

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,20 @@
44

55
The Stride editor is **Game Studio**. This is the equivalent of the Godot Editor.
66

7+
![Godot layout](media/stride-vs-godot-godotlayout.webp)
8+
9+
![Stride Game Studio layout](media/stride-vs-godot-stridelayout.webp)
10+
11+
You can customize the Game Studio layout by dragging tabs, similar to Visual Studio.
12+
13+
For more information about Game Studio, see the [Game Studio](../game-studio/index.md) page.
14+
15+
## Code Editor
16+
717
### Godot
818

919
Godot provides a built-in code editor that supports its own scripting language, GDScript, as well as C# and VisualScript. The Godot editor is more tightly integrated with the engine and is generally kept up-to-date with new features.
1020

11-
In summary, while both Stride and Godot offer integrated code editors, Stride's editor is best considered a supplementary tool rather than a complete IDE. It is advised to use specialized IDEs for more complex development tasks in Stride. Godot's editor, on the other hand, is robust enough for full-scale development if you are using GDScript or C#.
12-
1321
### Stride
1422

1523
Stride comes with an integrated C# code editor within Game Studio. Although functional, this editor is not a high-priority feature and may not receive frequent updates. As such, it is generally recommended to use dedicated IDEs for code editing. Some popular choices include:
@@ -19,14 +27,7 @@ Stride comes with an integrated C# code editor within Game Studio. Although func
1927
- Visual Studio Community: Free for small teams and individual developers.
2028
- Visual Studio Professional and Enterprise: Paid versions with additional features and services.
2129

22-
![Godot layout](media/stride-vs-godot-godotlayout.webp)
23-
24-
![Stride Game Studio layout](media/stride-vs-godot-stridelayout.webp)
25-
26-
You can customize the Game Studio layout by dragging tabs, similar to Visual Studio.
27-
28-
For more information about Game Studio, see the [Game Studio](../game-studio/index.md) page.
29-
30+
In summary, while both Stride and Godot offer integrated code editors, Stride's editor is best considered a supplementary tool rather than a complete IDE. It is advised to use specialized IDEs for more complex development tasks in Stride. Godot's editor, on the other hand, is robust enough for full-scale development if you are using GDScript or C#.
3031

3132
## Terminology
3233

@@ -46,7 +47,7 @@ For more information about Game Studio, see the [Game Studio](../game-studio/ind
4647
- **Assets**
4748
- In Godot, you can store assets anywhere.
4849
- In Stride, assets are stored in the `Assets` folder.
49-
- Stride and Godot use the standard C# solution structure. A key difference is that Stride uses a multi-project architecture with the following projects:
50+
- Stride and Godot use the standard C# solution structure. A key difference is that **Stride uses a multi-project architecture with the following projects**:
5051
- `MyPackage.Game` contains your source code.
5152
- `MyPackage.Platform` contains additional code for the platforms your project supports. Game Studio creates folders for each platform (for example, `MyPackage.Windows`, `MyPackage.Linux`, etc.). These folders are usually small and only contain the program entry point.
5253
- Any additional subprojects. Stride scans subprojects the same way it scans the main project to find `DataContract` classes and features for the editor and game.
@@ -134,27 +135,29 @@ Stride uses position, rotation, and scale to refer to the local position, rotati
134135
|----------------------------|------------------------------|
135136
| `position` | `Transform.Position` |
136137
| `quaternion` / `basis` | `Transform.Rotation` |
137-
| `rotation` / `rotation_degrees` | `Transform.RotationEulerXYZ` |
138+
| `rotation_degrees` | `Transform.RotationEulerXYZ` |
138139
| `scale` | `Transform.Scale` |
139140

140141
> [!TIP]
141142
> In Godot, `Node3D.rotation` is Euler angles in **radians**, and Godot also exposes convenience properties like `rotation_degrees`.
143+
>
144+
> In order to get and set rotation using degrees use the utility methods [`MathUtil.DegreesToRadians`](xref:Stride.Core.Mathematics.MathUtil.DegreesToRadians) and [`MathUtil.RadiansToDegrees`](xref:Stride.Core.Mathematics.MathUtil.RadiansToDegrees) with `Transform.RotationEulerXYZ`.
142145
143146

144147
#### World Position/Rotation/Scale
145148

146149
In Godot, world-space transform values are typically accessed via `global_*` properties or `global_transform`. In comparison to Godot, many of the Transform component's properties related to its location in the world are accessed via Stride's [WorldMatrix](xref:Stride.Engine.TransformComponent.WorldMatrix).
147150

148-
| Godot (4.x, Node3D) | Stride |
149-
|-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|
150-
| `global_position` (== `global_transform.origin`) | `Transform.WorldMatrix.TranslationVector` |
151-
| `global_rotation` (Euler, radians) | Decompose from `Transform.WorldMatrix` |
152-
| `global_scale` | Decompose from `Transform.WorldMatrix` |
153-
| `global_transform` | `Transform.WorldMatrix` |
154-
| `global_transform.basis` (rotation/scale/shear in global space) | Use direction vectors and decomposition on `Transform.WorldMatrix` |
155-
| Decompose from `global_transform` / `global_transform.basis` (rotation/scale etc.) | `Transform.WorldMatrix.DecomposeXYZ(out Vector3 rotation)` |
156-
| Decompose translation/scale | `Transform.WorldMatrix.Decompose(out Vector3 scale, out Vector3 translation)` |
157-
| Decompose translation/rotation/scale | `Transform.WorldMatrix.Decompose(out Vector3 scale, out Quaternion rotation, out Vector3 translation)` |
151+
| Godot (4.x, Node3D) | Stride |
152+
|---------------------|--------|
153+
| `global_position` / `global_transform.origin` | `Transform.WorldMatrix.TranslationVector` |
154+
| `global_rotation` (Euler, radians) | Decompose from `Transform.WorldMatrix` |
155+
| `global_scale` | Decompose from `Transform.WorldMatrix` |
156+
| `global_transform` | `Transform.WorldMatrix` |
157+
| `global_transform.basis` (rotation/scale/shear in global space) | Use direction vectors and decomposition on `Transform.WorldMatrix` |
158+
| Decompose from `global_transform` / `global_transform.basis` (rotation/scale etc.) | `Transform.WorldMatrix.DecomposeXYZ(out Vector3 rotation)` |
159+
| Decompose translation/scale | `Transform.WorldMatrix.Decompose(out Vector3 scale, out Vector3 translation)` |
160+
| Decompose translation/rotation/scale | `Transform.WorldMatrix.Decompose(out Vector3 scale, out Quaternion rotation, out Vector3 translation)` |
158161

159162
> [!NOTE]
160163
> `WorldMatrix` is only updated after the entire Update loop runs, which means that you may be reading outdated data if that object's or its parent's position changed between the previous frame and now.
@@ -244,8 +247,8 @@ public override void Update()
244247

245248
| Godot | Stride |
246249
|---|---|
247-
| `delta` in `_Process(double delta)` | `Game.UpdateTime.Elapsed.TotalSeconds` |
248-
| `delta` in `_PhysicsProcess(double delta)` | `Game.UpdateTime.Elapsed.TotalSeconds` |
250+
| `delta` in `_Process(double delta)` | `Game.UpdateTime.WarpElapsed.TotalSeconds` |
251+
| `delta` in `_PhysicsProcess(double delta)` | `simTimeStep` in `SimulationUpdate(BepuSimulation simulation, float simTimeStep)` |
249252
| `Engine.time_scale` | `Game.UpdateTime.Factor` |
250253

251254
## Physics
@@ -260,7 +263,7 @@ In Stride, there are three main types of colliders:
260263
- **Rigidbodies:** Dynamic colliders that are subject to physics simulations, such as gravity or force.
261264
- **Characters:** Special colliders designed to work with character controllers.
262265

263-
In Stride, collision handling is done through physics components and script logic that handle collision events and triggers. For details, see [Physics](../physics/index.md), [Triggers](../physics/triggers.md), and [Raycasting](../physics/raycasting.md).
266+
In Stride, collision handling is done through physics components and script logic that handle collision events and triggers. For details, see [Physics](../physics/index.md), [Triggers](../physics/triggers.md), and [Physics Queries](../physics/raycasting.md).
264267

265268
### Godot
266269

@@ -281,9 +284,9 @@ For example, instead of inheriting from `CharacterBody3D` in Godot, in Stride yo
281284

282285
```csharp
283286
// Example of searching for a CharacterComponent in Stride
284-
public class MyScript : SyncScript
287+
public class MyScript : StartupScript
285288
{
286-
public override void Update()
289+
public override void Start()
287290
{
288291
var characterComponent = Entity.Get<CharacterComponent>();
289292

@@ -582,7 +585,9 @@ add_child(node)
582585

583586
---
584587

585-
In Stride, you can instantiate entities using prefabs like so:
588+
In Stride, you can instantiate entities using prefabs. However unlike Godot, a prefab in Stride **can contain multiple entities at it's root**, meaning that instantiating will return **multiple entity instances**.
589+
590+
In Stride, an entity can be instantiated like so:
586591

587592
```cs
588593
// Public member fields and properties displayed in the Game Studio Property Grid
@@ -704,4 +709,4 @@ System.Diagnostics.Debug.WriteLine("hello");
704709

705710
## See also
706711

707-
* [Best Practice](../scripts/best-practice.md)
712+
* [Best Practice](../scripts/best-practice.md)

0 commit comments

Comments
 (0)