I am working on a game for learning purposes, I want to make it only with the .NET-Framework and a Windows Forms project in C#.

I want to get the 'screen' (Something that can be displayed on the window) as an `int[]`. Modify the array and reapply the altered array to the 'screen' in a buffered manner (So that it doesn't flicker).

I am currently using a `Panel`, which I draw a `Bitmap` on with `Graphics`. The `Bitmap` is converted to an `int[]` which I then can modify and reapply to the `Bitmap` and redraw. It works, but is very slow, especially because I have to scale up the image every frame because my game is only 300x160 and the screen 900x500.

Build up:

```
    // Renders 1 frame
    private void Render()
    {    
        // Buffer setup
        _bufferedContext = BufferedGraphicsManager.Current;
        _buffer = _bufferedContext.Allocate(panel_canvas.CreateGraphics(), new Rectangle(0, 0, _scaledWidth, _scaledHeight));

        _screen.clear();

        // Get position of player on map
        _xScroll = _player._xMap - _screen._width / 2;
        _yScroll = _player._yMap - _screen._height / 2;

        // Indirectly modifies the int[] '_pixels'
        _level.render(_xScroll, _yScroll, _screen);
        _player.render(_screen);

        // Converts the int[] into a Bitmap (unsafe method is faster)
        unsafe
        {
            fixed (int* intPtr = &_screen._pixels[0])
            {
                _screenImage = new Bitmap(_trueWidth, _trueHeight, _trueWidth * 4, PixelFormat.Format32bppRgb, new IntPtr(intPtr));
            }
        }

        // Draw generated image on buffer
        Graphics g = _buffer.Graphics;
        g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;

        g.DrawImage(_screenImage, new Rectangle(0, 0, 900, 506));

        // Update panel buffered
        _buffer.Render();
    }

```

Is there a faster way without external libraries to make this work?