Doprez.Stride
2.1.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Doprez.Stride --version 2.1.0
NuGet\Install-Package Doprez.Stride -Version 2.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Doprez.Stride" Version="2.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Doprez.Stride --version 2.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Doprez.Stride, 2.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Doprez.Stride as a Cake Addin #addin nuget:?package=Doprez.Stride&version=2.1.0 // Install Doprez.Stride as a Cake Tool #tool nuget:?package=Doprez.Stride&version=2.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Doprez.Stride
A bundle of Stride related libraries.
Build Status
Installation
Nuget method
- Simple just ad the nuget package to your package!
- this is limited to only extensions since Stride does not know how to read the ScriptComponents
Download method 1
- Download the project
- add the csproj as a reference to your game solution
- done
- sometimes multiple project references can cause reload issues in Gamestudio, if so use Download method 2.
Download method 2
- Download the project
- copy the folders (Components, Extensions, DoprezMath, Utilities and Interfaces) into a folder in your project, I usually name it Core.
Examples
Player Controller Example
public class PlayerController : SyncScript
{
[DataMember(0)]
public Keys ForwardKey { get; set; }
[DataMember(1)]
public Keys BackwardKey { get; set; }
[DataMember(2)]
public Keys RightKey { get; set; }
[DataMember(3)]
public Keys LeftKey { get; set; }
[DataMember(100)]
public Keys Interact { get; set; }
[DataMember(200)]
public Keys JumpKey { get; set; }
private PlayerMover _playerMover;
private Raycast _raycast;
public override void Start()
{
_playerMover = Entity.GetComponent<PlayerMover>();
_raycast = Entity.GetComponent<Raycast>();
Input.Mouse.LockPosition(true);
}
public override void Update()
{
MovePlayer();
RotateCamera();
Jump();
PlayerRaycast();
}
private void MovePlayer()
{
Vector2 movement = Vector2.Zero;
if (Input.IsKeyDown(ForwardKey))
{
movement.Y += 1;
}
if (Input.IsKeyDown(BackwardKey))
{
movement.Y -= 1;
}
if (Input.IsKeyDown(RightKey))
{
movement.X += 1;
}
if (Input.IsKeyDown(LeftKey))
{
movement.X -= 1;
}
_playerMover.MovePlayer(movement);
}
private void RotateCamera()
{
_playerMover.UpdateCameraRotation(Input.Mouse.Delta * 100);
}
private void Jump()
{
if (Input.IsKeyPressed(JumpKey))
{
_playerMover.Jump();
}
}
//Example of the Raycast Component usage to store a HitResult in the result variable
private void PlayerRaycast()
{
if (Input.IsKeyPressed(Interact))
{
var result = _raycast.RayCast(_playerMover.CameraPivot);
}
}
}
Helpful Extensions
EntityComponent
- DestroyEntity() provides a quick way to remove an entity from the scene.
- GetYAngleToTarget(OtherEntity) get the angle to the target entity.
- GetComponent() similar to Unity. Unlike Strides default Get() this one will also be able to grab non EntityComponent classes like Interfaces.
- GetComponents() similar to Unity. Unlike Strides default Get() this one will also be able to grab non EntityComponent classes like Interfaces as an IEnumerable.
- WorldPosition() an easier way to get the world position.
ModelComponent
- GetMeshHeight() will get the Y height of a model.
ScriptComponent
- DeltaTime() a faster way to get delta time.
- GetCamera() Gets the camera with the name main in the Scene
- GetCamera(string name) Gets the camera with a custom name in the Scene
- GetFirstCamera() Gets the first camera available in the GraphicsCompositor
PhysicsComponent
- All WIP as they dont seem to consitantly work.
Game
- FPS() a quick way to get FPS
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Stride.Core (>= 4.1.0.1898)
- Stride.Engine (>= 4.1.0.1898)
- Stride.Navigation (>= 4.1.0.1898)
- Stride.Particles (>= 4.1.0.1898)
- Stride.Physics (>= 4.1.0.1898)
- Stride.UI (>= 4.1.0.1898)
- Stride.Video (>= 4.1.0.1898)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Doprez.Stride:
Package | Downloads |
---|---|
Doprez.Stride.AI
AI libraries to be used within Stride games |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.0.0 | 234 | 12/15/2023 |
2.1.0 | 158 | 9/21/2023 |
2.0.0 | 172 | 7/12/2023 |
1.2.5 | 193 | 4/21/2023 |
1.2.4 | 262 | 4/12/2023 |
1.2.3 | 178 | 4/5/2023 |
1.2.2 | 214 | 3/27/2023 |
1.2.1 | 217 | 3/10/2023 |
1.2.0 | 244 | 3/1/2023 |
1.1.2 | 226 | 2/25/2023 |
1.1.1 | 303 | 2/9/2023 |
1.1.0 | 262 | 2/8/2023 |
1.0.9 | 404 | 1/27/2023 |
1.0.8 | 449 | 9/5/2022 |
1.0.7 | 421 | 9/4/2022 |
1.0.6 | 438 | 8/29/2022 |
1.0.5 | 424 | 8/29/2022 |
1.0.4 | 453 | 8/15/2022 |
1.0.3 | 443 | 8/14/2022 |
1.0.2 | 425 | 8/14/2022 |
1.0.1 | 443 | 8/14/2022 |
1.0.0 | 445 | 8/13/2022 |