Skip to content

Getting started

Jacob-Mc-kenzie edited this page Jul 12, 2020 · 1 revision

First up

Refrence CompactGraphics.dll

Then

Declare a graphics object, This will prepare the current Console window for Graphical supremacy.

Graphics graphics = new Graphics();

Finally

Follow the loop of draw, push, repeat.

using CompactGraphics;

static void Main(string[] args)
{
    Graphics graphics = new Graphics();

    //Contunually draw frames
    while (true)
    {
        //draw the frame counter at the top of the screen.
        graphics.Draw($"Fps: {graphics.Fps}", ConsoleColor.White, 0, 0);
        //now that all drawing is done, push the frame to the buffer.
        graphics.pushFrame();
    }
}
Clone this wiki locally