Gammer0909 / Sparkle

A fast, Cross-platform .NET 7 C# 11 game engine.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logo

Welcome to Sparkle πŸŽ‰

A fast, Cross-platform .NET 7 C# 11 game engine.

grafik

ko-fi

πŸͺ™ Installation - Nuget

dotnet add package Sparkle --version 2.0.0

πŸ“š Libraries (https://www.nuget.org/packages)

πŸŒ‹ Graphic Engine

Soon...

πŸ’‘ Features [TAGS]

OpenGL Angle Game Engine Renderer Graphics C#11 Net7 dotnet Modern Sparkle 2D 3D Raylib Fast Physics XNA Cross-platform Audio

πŸ–₯️ Example

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);
        }
    }
}

πŸ’Έ Sponsors

Please consider SPONSOR me to further help development and to allow faster issue triaging and new features to be implemented.

About

A fast, Cross-platform .NET 7 C# 11 game engine.

License:MIT License


Languages

Language:C# 100.0%