Examples

Graphics (Basic)

Animation

Animation

Animation by changing the source region of an image using SubImage.

Blur

Blur

Blurring an image by rendering the same image multiple times.

Filter

Filter

Demonstrates the difference between a nearest filter and a linear filter.

Flood Fill

Flood Fill

Filling images with solid colors by a composition mode.

Font

Font

Rendering glyphs of a TrueType font using text.Draw.

HSV

HSV

Changing hue-saturation-value by specifying a color matrix.

Infinite Scroll

Infinite Scroll

Infinite scroll by changing the rendering position frame by frame.

Game of Life

Game of Life

Drawing Conway's game of life using ReplacePixels.

Mandelbrot

Mandelbrot

Plotting a Mandelbrot set with ReplacePixels and complex numbers.

Mosaic

Mosaic

Mosaic effect accomplished by shrinking an image once and then enlarging it with a nearest filter.

Noise

Noise

Rendering noise with ReplacePixels.

Particles

Particles

Rendering bunch of images with geometry/color matrices.

Polygons

Polygons

Rendering polygons with DrawTriangles.

Sprites

Sprites

Rendering many images very fast with automatic batching.

Tiles

Tiles

Rendering tiles with DrawImage, specifying sub-images.

Graphics (Advanced)

Airship

Airship

Mode 7-style airship effect, such as that in FINAL FANTASY 6, with pseudo-raster scrolling.

Drag & Drop

Drag & Drop

Handling user input to implement drag & drop.

Hi-DPI

Hi-DPI

Hi-DPI rendering by specifying a special scale.

Masking

Masking

Masking with DrawImage and a composition mode.

Paint

Paint

A drawing tool that uses an offscreen image as a canvas.

Perspective

Perspective

Pseudo-raster scrolling by rendering thin parts of an image.

Ray Casting

Ray Casting

Rendering regions with ray casting.

Input

Gamepad

Gamepad

Reading and displaying gamepad states, such as pressed buttons and axis values.

Keyboard

Keyboard

Reading and displaying states of keys on a keyboard.

Typewriter

Typewriter

Typewriter-like application with InputChars.

Mouse Wheel

Mouse Wheel

Detecting the mouse wheel with Wheel.

Audio

Audio

Audio

An audio player that plays music and features a seek bar.

Piano

Piano

A very simple piano that plays PCM notes.

Sine Wave

Sine Wave

An infinite sine wave.

Games

2048

2048

Use the arrow keys to combine pairs of like numbers. Try to get to 2048!

Blocks

Blocks

A classic falling block puzzle. Use the arrows to move the blocks and the spacebar to rotate them. Complete a row to remove it from the screen.

Flappy

Flappy

Now with 100% more gopher! Press the spacebar to jump. Stay airborne as long as possible!