https://github.com/pierocastillo/redux
[READONLY] The offical repository is this: https://github.com/Redux-Engine/Redux, full C# based.
https://github.com/pierocastillo/redux
Last synced: over 1 year ago
JSON representation
[READONLY] The offical repository is this: https://github.com/Redux-Engine/Redux, full C# based.
- Host: GitHub
- URL: https://github.com/pierocastillo/redux
- Owner: PieroCastillo
- License: mit
- Created: 2021-02-12T02:01:10.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-16T04:02:29.000Z (over 5 years ago)
- Last Synced: 2024-04-13T21:48:09.559Z (over 2 years ago)
- Language: C#
- Homepage:
- Size: 28.3 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Redux
A 3D game engine, full C# based.
# Objectives:
- Use Vulkan only.
- Be easy to use.
- The objects control the Render, a sample:
```C#
public class CustomComponent : Component
{
public void Render(RenderContext context)
{
context.DrawEsphere(bounds: this.Hitbox, radius: 30d, texture: new ImageTexture(@"Assets/Image.png"));
}
}
```
- Has the Avalonia/WPF model or be an AvaloniaControl(more possible this)
With Avalonia/WPF model:
```c#
public class MainWindow : Redux.Window
{
protected override void Loaded()
{
Content = new MainView();
}
}
```
As Avalonia Control
```c#
//GameView inherits Avalonia.Control
public class MainGameView : Redux.Avalonia.GameView
{
// something
}
```
- Can import OBJ/FBX files
```c#
public class CustomComp : Component
{
readonly Redux3DModel model = new Redux3DModel(@"assets/model.obj");
protected override Size Measure(Size availableSize) => model.Measure(avaiableSize);
public override void Render(RenderContext context)
{
context.DrawModel(bounds: this.HitBox, model: model, texture: model.Texture);
}
}
```
- Supports Non-FPS-dependent Animation System
```c#
public class CustomComp : Component
{
protected override void Loaded()
{
base.Loaded();
var anim = new Animation();
anim.Clock = ReduxLocator.Current.GetService();
anim.Duration = new TimeSpan(hours: 0, minutes: 0, seconds: 30);
var points = this.AsModel().GetPoints(); //returns Redux.Points
var topP = points.TryGetPointRelativeFrom(x: 30,y: 20,z: 30); //get a point if that exist, if not, creates a new point.
anim.Frames = new AnimationFrames()
{
new AnimationFrame(cue: 0) { topP.X = 30, topP.Y = 20, topP.Z = 30 },
new AnimationFrame(cue: 100) { topP.X = 130, topP.Y = 120, topP.Z = 130 }
}
this.Animations.Insert(0, anim);
}
protected override void OnPointerEnter(ReduxEventsArgs e)
{
var anim = this.Animations[0];
anim.Starts();
}
}
```