Skip to content

MrScautHD/Sparkle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Welcome to Sparkle 🎉

A fast, Cross-platform .NET 8 C# 12 game engine.

grafik

discord sponsor

🪙 Installation - Nuget

dotnet add package Sparkle --version 4.0.1

⭐ Getting Started

We trust you'll relish your time with Sparkle! To kick things off, head over to our Wiki for a seamless start.

📚 Libraries - Nuget

💻 Platforms

windows

Windows

  • Using OpenGL-4.3

Linux

Linux

  • Using OpenGL-4.3

macOS

MacOS

  • Using OpenGL-3.3

🧑 Contributors

🖥️ Basic Example

public class GameTest : Game {

    public Texture2D Texture;
    
    public GameTest(GameSettings settings) : base(settings) {
        
        // Create your own config file!
        JsonConfig config = new JsonConfigBuilder("config", "test")
            .Add("Hello", "Hello World!")
            .Add("Bye", 1000)
            .Build();

        Logger.Info(config.GetValue<string>("Hello"));
    }

    protected override void Init() {
        base.Init();
    }

    protected override void Load() {
        base.Load();
        
        // Load resources.
        this.Texture = this.Content.Load(new TextureContent("icon.png"));
    }

    protected override void Draw() {
        base.Draw();
        
        // Draw circle if "A" down.
        if (Input.IsKeyDown(KeyboardKey.A)) {
            Graphics.DrawCircle(new Vector2(50, 50), 20, Color.Blue);
        }

        // Draw texture if "B" down.
        if (Input.IsKeyDown(KeyboardKey.B)) {
            Graphics.DrawTexture(this.Texture, Vector3.Zero, Color.White);
        }
    }
}

💸 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 8 C# 12 game engine.

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages