Commit 343063d
authored
feat: Game launcher and docs improvements (#292)
* feat: ClickHandlerComponent.cs - Enhance cube creation logic
- Added a new using directive for `Stride.CommunityToolkit.Mathematics` to access additional mathematical functions.
- Modified the `CreateCube()` method call to utilize `_random.NextPoint()` for generating a random point within a specified bounding box, improving randomness.
- Adjusted the y-coordinate to position the cube at a height of 10 units above the ground.
* refactor: ScreenPositionToWorldPositionRaycast removed
* feat: Profile added
* feat!: ShapeUpdater.cs - Improve debug text positioning
- Added two new constant integer variables: `TextIncrement` set to 16 and `StartTextPositionY` set to 32 for better text positioning in debug output.
- Modified the text position for debug print statements to utilize `StartTextPositionY`, enhancing maintainability and readability.
- Introduced additional debug print statements to provide more context about the application's state, including a message for faster count adjustment with the shift key.
- Updated the wording of the fill mode debug print statement for consistency and clarity.
- Adjusted the vertical positioning of debug print statements to use the new `TextIncrement` variable, facilitating easier layout adjustments.
- Removed an unused closing brace at the end of the file to correct a formatting error.
* refactor: Empty lines removed
* refactor: Code readability improvements
* refactor: Code clean up
* refactor: Update DebugRenderStage organization
- Changed `DebugRenderStage` from an internal enum within `ImmediateDebugRenderFeature` to a standalone internal enum for better organization.
- Removed the `partial` keyword from the `ImmediateDebugRenderFeature` class, indicating it is now fully defined in one file.
- Replaced references to `ImmediateDebugRenderFeature.DebugRenderStage` with `DebugRenderStage` in `ImmediateDebugRenderSystem` for improved readability.
- Removed the `using static` directive for `ImmediateDebugRenderFeature` in `ImmediateDebugRenderStageSelector.cs` to clarify code dependencies.
* docs: XML comments added
* refactor: Empty line removed
* feat: New example project added
* refactor: Code improvements
* refactor: Code clean up
* refactor: Examples experience improvements
* docs: XML comments added
* docs: XML comments added
* docs: XML comments addee
* feat: Benchmark project updated
* feat: FastList benchmark added
* feat: New test added
* feat: Another test added
* feat: Benchmark input updated
* refactor: ShapeUpdater.cs - Optimize shape management
- Replaced `FastList<T>` with `List<T>` for better performance.
- Introduced `EnsureSize<T>()` method to manage list capacity efficiently.
- Modified initialization of primitive properties to use spans for faster access.
- Streamlined logic for updating and rendering shapes to enhance performance and readability.
- Simplified `Clamp()` method to a more concise expression-bodied format.
* feat: Target framework updated
* refactor: Performance updates
* refactor: Readability updates
* refactor: Code readability updates
* fix: ImmediateDebugRenderSystem.cs - Correct vertex pairing
- Modify the `ImmediateDebugRenderSystem` class to fix the processing of vertex pairs in the rendering loop.
- Change the reference for the second vertex (`v2`) from the same vertex as `v1` to the next vertex in the array.
- Ensure that pairs of vertices are correctly formed for drawing lines, allowing for proper rendering of line segments between distinct vertex pairs.
* refactor : CurrentRenderMode.cs - Rename enum for clarity
- Renamed the enum `CurRenderMode` to `CurrentRenderMode`.
* refactor: Bullet replaced with Bepu
* refactor: Code readability improvements
* docs: XML comment added
* refactor: Performance updates
* refactor: ImmediateDebugRenderFeature - Improve null safety
- Updated `ImmediateDebugRenderFeature` to use nullable types for several buffer fields, enhancing handling of uninitialized states and preventing null reference exceptions.
- Added XML documentation comments to the constructor, clarifying its purpose and ensuring the feature is rendered last.
- Enhanced `UpdateBufferIfNecessary()` to check for empty data, allowing early returns and avoiding unnecessary updates.
- Updated references in `CheckBuffers()` to use the null-forgiving operator (`!`), indicating expected non-null buffers.
- Modified `SetPrimitiveRenderingPipelineState()` and `SetLineRenderingPipelineState()` to use the null-forgiving operator for `pipelineState`, `primitiveEffect`, and `lineEffect`.
- Cleared `lineVertices` and `instances` lists at the start of the `Prepare()` method to prevent data retention from previous frames.
- Safely disposed of buffers in `Unload()` using the null-conditional operator (`?.`) to avoid exceptions if buffers are null.
- Overall, these changes improve the robustness and clarity of the `ImmediateDebugRenderFeature` class, making it safer and easier to maintain.
* feat: ListExtensions.cs - Add list extension methods
- Introduced a new static class `ListExtensions` in the namespace `Stride.CommunityToolkit.Collections`.
- Added the `EnsureSize(List<T> list, int size)` method to ensure a list has at least a specified number of items by adding default values if necessary.
- Implemented the `SetCount(List<T> list, int size)` method to adjust the list's count to a specified size, either by adding default values or removing excess items.
- Included null and range checks in both methods to ensure safe operations on the list.
* refactor: Code improvements
* refactor: Simplify collection handling in ShapeUpdater and ImmediateDebugRenderFeature
- Added `Stride.CommunityToolkit.Collections` namespace to both `ShapeUpdater.cs` and `ImmediateDebugRenderFeature.cs` for enhanced collection functionalities.
- Removed the custom `EnsureSize()` method in `ShapeUpdater.cs` and replaced it with direct calls to `EnsureSize()` on the collections: `_primitivePositions`, `_primitiveRotations`, `_primitiveVelocities`, `_primitiveRotVelocities`, and `_primitiveColors`.
- Streamlined `ImmediateDebugRenderFeature.cs` by removing the custom `EnsureSize()` method and using `EnsureSize()` directly on `instances` and `lineVertices`.
- Eliminated the `SetCount()` method in `ImmediateDebugRenderFeature.cs`, replacing it with direct calls to `SetCount()` on `transforms` and `colors` lists.
- These changes enhance code clarity and maintainability by leveraging the capabilities of the `Stride.CommunityToolkit.Collections` library.
* refactor: Folder structure improvements
* refactor: Text renderes moved to Renderers folder
* docs: XML comments updates
* refactor: File and folder structure updates to remove circular dependencies
* refactor: Empty lines removed
* refactor: Typo fixes
* docs: XML comments added
* refactor: DebugPrimitveType added
* docs: XML comments added
* refactor: ImmediateDebugRenderSystem.cs - Simplify debug message storage
- Replaced `FastList<DebugRenderable>` with `List<DebugRenderable>` for `renderMessages` and `renderMessagesWithLifetime` to simplify data structure.
- Updated list handling to use `CollectionsMarshal.AsSpan` for improved performance during iteration.
- Adjusted comments and logic related to the lifetime management of render messages to align with the new list implementation.
* refactor: Common functionality merged
* refactor: DebugRenderable.cs moved to a separate file
* refactor: Renderable.cs added
* docs: XML example updates
* refactor: Code readability improvements and old code removed
* docs: Examples docs updated
* refactor: Provider folder renamed to Core
* docs: Improvements
* fix: Grammar corrected
* docs: Title corrected
* refactor: Code readability updates
* docs: Docs improvements
* docs: Project names updated
* docs: References correction
* docs: Windows package included in the note
* docs: Addititional docs added
* fix: ImGuiSystem.cs - Clean up using directives and fields
- Deleted the private field `DebugTextSystem? debug;` to simplify the class.
- Changed `vertexBinding` from a nullable type (`VertexBufferBinding?`) to a non-nullable type (`VertexBufferBinding`) to ensure it is always initialized.
* docs: Comment removed
* docs: Docs improvements
* docs: Grammar and content improvements
* docs: Update documentation for clarity and new examples
- Updated documentation across multiple files: `advance-examples.md`, `basic-examples.md`, `other-examples.md`, `create-project.md`, and `index.md`.
- Added new examples in `advance-examples.md`, including "ImGui UI," "Box2D.NET Physics," and "Mesh Outline," with some entries reorganized for clarity.
- Enhanced `other-examples.md` with the addition of "Debug Shapes Usage" and "Stride + SignalR."
- Restructured `create-project.md` for improved readability, including renumbering steps and adding clarifying details.
- Simplified language in `index.md` to better communicate the benefits of the code-only approach over Stride Game Studio.
- Overall, these changes aim to enhance the clarity, organization, and accessibility of the documentation for users of the Stride Game Engine.
* chore: Release notes added
* docs: Docs grammar and wording improvements
* fix: Release notes correction
* fix: List corrected1 parent 21bc49e commit 343063d
File tree
164 files changed
+3017
-2012
lines changed- docs
- contributing
- documentation
- examples
- toolkit
- includes/manual
- examples
- manual
- code-only
- examples
- media
- entity-extensions
- physics-extensions
- release-notes
- tutorials/textures
- examples/code-only
- Example.Common
- Example01_Basic2DScene
- Example01_Basic3DScene_BulletPhysics
- Example01_Basic3DScene_FSharp
- Example01_Basic3DScene_MeshLine
- Example01_Basic3DScene_VBasic
- Example01_Basic3DScene
- Example01_Material
- Example02_GiveMeACube
- Example03_StrideUI_CapsuleAndWindow
- Example04_MyraUI
- Example05_CylinderMesh
- Example05_PartialTorus_FSharp
- Example05_PartialTorus
- Example05_ProceduralGeometry
- Example06_ImageProcessing
- Example07_CubeClicker
- Scripts
- Example08_DebugShapes_Usage
- Example08_DebugShapes
- Scripts
- Example09_Renderer
- Example10_StrideUI_DragAndDrop_BulletPhysics
- Example10_StrideUI_DragAndDrop
- Example11_ImGui
- Example12_Particles
- Example13_MeshOutline
- Example13_RootRendererShader
- Example14_Raycast
- Example15_Constraint_Simple
- Example15_Constraint
- Example16_CollisionGroup
- Example16_CollisionLayer
- Example17_SignalR_Blazor
- Components
- Example17_SignalR
- Builders
- Core
- Managers
- Scripts
- Example18_Box2DPhysics
- Box2DPhysics
- Core
- Results
- Events
- Queries
- Helpers
- Physics
- Reusable/Events
- Example_2D_Playground
- Example_Bepu_Playground
- Example_CubicleCalamity_BulletPhysics
- Example_CubicleCalamity
- src
- Stride.CommunityToolkit.Benchmarks
- FastList
- Stride.CommunityToolkit.Bepu
- Stride.CommunityToolkit.Bullet
- Stride.CommunityToolkit.DebugShapes
- Code
- Effects
- Stride.CommunityToolkit.Examples
- Core
- Providers
- Stride.CommunityToolkit.ImGui
- Stride.CommunityToolkit
- Collections
- Engine
- Renderers
- Rendering/Compositing
- Scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
164 files changed
+3017
-2012
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
| |||
337 | 339 | | |
338 | 340 | | |
339 | 341 | | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
340 | 346 | | |
341 | 347 | | |
342 | 348 | | |
| |||
384 | 390 | | |
385 | 391 | | |
386 | 392 | | |
| 393 | + | |
387 | 394 | | |
388 | 395 | | |
389 | 396 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | | - | |
31 | | - | |
| 30 | + | |
| 31 | + | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
15 | 14 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
9 | 8 | | |
| 9 | + | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 17 | + | |
17 | 18 | | |
18 | | - | |
| 19 | + | |
19 | 20 | | |
20 | | - | |
| 21 | + | |
21 | 22 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 23 | + | |
| 24 | + | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | | - | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments