A high-performance game engine built on MonoGame, featuring an Entity Component System (ECS) architecture.
$ dotnet add package Gm.EngineA high-performance game engine built on MonoGame, featuring an Entity Component System (ECS) architecture.
dotnet add package Gm.Engine
using Gm.Engine;
using Gm.Engine.Ecs;
using Gm.Engine.Drawing;
using Gm.Engine.Input;
// Create a new game world
var world = new World();
// Add systems
world.AddSystem(new InputManager());
world.AddSystem(new DrawingSystem());
// Create an entity
var entity = world.CreateEntity();
// Add components
entity.AddComponent(new Position { X = 100, Y = 100 });
entity.AddComponent(new Sprite { Texture = content.Load<Texture2D>("sprite") });
// Update loop
protected override void Update(GameTime gameTime)
{
world.Update(gameTime);
base.Update(gameTime);
}
// Draw loop
protected override void Draw(GameTime gameTime)
{
world.Draw(gameTime);
base.Draw(gameTime);
}
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.