🪙 Installation - Nuget
dotnet add package Sparkle --version 2.0.0
📚 Libraries (https://www.nuget.org/packages)
OpenGL
Angle
Game Engine
Renderer
Graphics
C#11
Net7
dotnet
Modern
Sparkle
2D
3D
Raylib
Fast
Physics
XNA
Cross-platform
Audio
public class GameTest : Game {
public GameTest(GameSettings settings, Scene scene) : base(settings, scene) {
// Create your own config file!
Config config = new ConfigBuilder("config", "test")
.Add("Hello", "Hello World!")
.Add("Bye", 1000)
.Build();
Logger.Info(config.GetValue<string>("Hello"));
}
protected override void Init() {
base.Init();
// Simple logger.
Logger.Debug("Debug text!");
Logger.Info("Info text!");
Logger.Warn("Warn text!");
Logger.Error("Error text!");
// Simple time.
float deltaTime = Time.DeltaTime;
double totalTime = Time.TotalTime;
// Stop the time!
Time.WaitTime(10);
// Load resources.
Texture2D texture = this.Content.Load<Texture2D>("icon.png");
// Create your own Scene.
SceneManager.SetScene(new TestScene("earth"));
// Open a url.
this.OpenURL("https://www.youtube.com/");
// Take a screenshot
Window.TakeScreenshot("path");
}
protected override void Draw() {
base.Draw();
// Draw circle if "A" down and way more simple options to draw!
if (Input.IsKeyDown(KeyboardKey.KEY_A)) {
ShapeHelper.DrawCircle(new Vector2(50, 50), 20, Color.BLUE);
}
}
}
Please consider SPONSOR me to further help development and to allow faster issue triaging and new features to be implemented.