aleksandrresetnikov / 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 1.0.0

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

๐ŸŒ‹ Graphic Engine

๐Ÿ’ก Features

Audio Texture Model Font 3D Camera Material Overlay GUI Scene Entity Directed/Pointed Light Content Manager Config Physic

๐Ÿ–ฅ๏ธ 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.
        double 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
        this.Window.TakeScreenshot("path");
    }

    // Just runs when !Game.Headless [Support for servers!]
    protected override void Draw() {
        base.Draw();
        
        // Draw circle if "A" down and way more simple options to draw!
        if (Input.IsKeyDown(KeyboardKey.KEY_A)) {
            this.Graphics.ShapeRenderer.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%