RetroReborn.Physics
2.1.0-alpha.15
dotnet add package RetroReborn.Physics --version 2.1.0-alpha.15
NuGet\Install-Package RetroReborn.Physics -Version 2.1.0-alpha.15
<PackageReference Include="RetroReborn.Physics" Version="2.1.0-alpha.15" />
<PackageVersion Include="RetroReborn.Physics" Version="2.1.0-alpha.15" />
<PackageReference Include="RetroReborn.Physics" />
paket add RetroReborn.Physics --version 2.1.0-alpha.15
#r "nuget: RetroReborn.Physics, 2.1.0-alpha.15"
#:package RetroReborn.Physics@2.1.0-alpha.15
#addin nuget:?package=RetroReborn.Physics&version=2.1.0-alpha.15&prerelease
#tool nuget:?package=RetroReborn.Physics&version=2.1.0-alpha.15&prerelease
RetroReborn.Physics
AABB 2D physics for the RetroReborn engine. Static and dynamic bodies, collision detection, and MTV resolution.
Install
dotnet add package RetroReborn.Physics
What's included
| Type | Description |
|---|---|
IPhysicsWorld |
Owns all bodies. Steps simulation and resolves collisions. |
IStaticBody |
Immovable body at a fixed world position. |
IDynamicBody |
Movable body with per-axis velocity (pixels/sec). |
BoundingBox |
Axis-aligned bounding box in local space (Width × Height, both > 0). |
Usage
services.AddRetroRebornPhysics();
IPhysicsWorld world = services.GetRequiredService<IPhysicsWorld>();
// Add bodies
IStaticBody wall = world.AddStaticBody(0f, 100f, new BoundingBox(200f, 16f));
IDynamicBody player = world.AddDynamicBody(50f, 50f, new BoundingBox(16f, 16f));
// Set velocity (pixels per second)
player.VelocityX = 60f;
player.VelocityY = 0f;
// In your update loop
world.Step(deltaTime);
// Read resolved position back
float x = player.X;
float y = player.Y;
Step moves each dynamic body by velocity × deltaTime, then resolves AABB overlaps against all static bodies using minimum translation vector (MTV). Velocity is not zeroed on collision — the caller decides whether to zero, reflect, or ignore it.
Clear() removes all bodies from the world.
Notes
RetroReborn.Physicshas no dependency on MonoGame and can be used without callingAddRetroRebornMonoGame().- This package provides a lightweight hand-rolled AABB solver. Full rigid-body physics via
Aether.Physics2Dis not yet integrated.
Changes
See CHANGELOG.md.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|
2.1.0: Added ICamera (transient), CameraProfile, PresentationFrame redesign, MonoGame.Extended camera, IDisposable on GPU resources, input validation with descriptive exceptions, DI wiring for Game/Localisation/Pilgrimage, ComponentTypes/SpriteProperties/TransformProperties constants. See CHANGELOG.md for breaking changes and migration guidance.