Getting Started - shmellyorc/Box GitHub Wiki

Getting Started

  1. Install the package

    dotnet add package BoxEngine
    
  2. Import the core namespace

    using Box;
    
  3. Configure window resolution, rendering viewport, and initial screens

    var settings = new EngineSettings()
        .WithWindow(1280, 720)
        .WithViewport(320, 180)
        .WithScreens(new BootScreen())
        .Build();
    
  4. Create and start the engine

    [STAThread]
    static void StartGame()
    {
        using var game = new Engine(settings);
        game.Start();
    }
    
    StartGame();
    
  5. What next?

    • Subclass Screen to implement your own screens (e.g., BootScreen).
    • Register additional services via WithServices(...) if needed.
    • Explore core systems: entity factory, coroutines, signal bus, asset hot-reloading, and sprite batching.

For more examples, see the [Box Engine Cookbook].