Skip to content

relidaar/EndlessEngine

Repository files navigation

Endless Engine

Contributors Forks Issues MIT License

Report Bug · Request Feature

Endless Engine is a simple cross-platform 2D rendering engine.

Table of Contents

Getting Started

Prerequisites

.NET Version

  1. Clone the repo
    git clone https://github.com/relidaar/EndlessEngine.git
  2. Change your directory
    cd EndlessEngine

Usage

(Back to top)

public class Game : IDisposable
{
    private readonly IGraphicsFactory _graphics;
    private readonly IWindow _window;
    private readonly IRenderer _renderer;

    public Game(int windowWidth, int windowHeight, string windowTitle)
    {
        _graphics = new OpenGLGraphicsFactory();
        _window = _graphics.CreateWindow(windowWidth, windowHeight, windowTitle, false);
        _renderer = _graphics.CreateRenderer();
        _renderer.Init();
        
        // Initialize your game entities here
            
        OnUpdate();
    }
        
    private void OnUpdate()
    {
        _window.OnKeyPressed += (sender, e) =>
        {
            switch (e.Key)
            {
                // Register your handlers here
            }
        };
    
        // Write your update logic here
    }

    public void Run()
    {
        while (_window.IsOpen)
        {
            _renderer.Clear();
                
            // Create your game logic here
                
            _window.Display();
        }
    }

    public void Dispose()
    {
        _window?.Dispose();
    }
}
var game = new Game(800, 600, "Sample Game");
game.Run();

Roadmap

(Back to top)

See the open issues for a list of proposed features (and known issues).

Contributing

(Back to top)

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

(Back to top)

Distributed under the MIT License. See LICENSE for more information.

Contact

(Back to top)

Project Link: https://github.com/relidaar/EndlessEngine

LinkedIn

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published