Skip to content
Hardware accelerated 2D library
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
aiv-fast2d-android-template
aiv-fast2d-android
aiv-fast2d-check-texture
aiv-fast2d-example-android-obsolete
aiv-fast2d-example-android additional textures for postprocessing May 24, 2019
aiv-fast2d-example-ios
aiv-fast2d-example-units
aiv-fast2d-example-uwp
aiv-fast2d-example
aiv-fast2d-getpixels
aiv-fast2d-ios
aiv-fast2d-uwp
aiv-fast2d
.gitignore
Aiv.Fast2D Android Game.zip
Aiv.Fast2D.Android.nuspec
Aiv.Fast2D.iOS.nuspec
Aiv.Fast2D.nuspec
Android.md
Joysticks.md
LICENSE
Makefile
Postprocessing.md
README.md
aiv-fast2d.sln

README.md

aiv-fast2d

Hardware accelerated 2D library, used by the first year students of "Accademia Italiana Videogiochi"

Supports Windows, MacOSX, Linux, Android and iOS

It is the base for aiv-fast3d too, that adds support for 2.5d and 3d games

// open a window and get a OpenGL context
Window window = new Window(1024, 576, "Title");

// open a window in full screen mode
Window window = new Window(1920, 1080, "Title", true);

// open a window in fullscreen mode with the current native resolution
Window window = new Window("Title");
// load a Texture in the graphics card
Texture texture = new Texture("path_to_image_file");
// create a mesh formed by two triangles and use it as a sprite
// the mesh returned is a 100x100 pixels quad
Sprite sprite = new Sprite(100, 100);

// move the sprite
sprite.position = new Vector2(x, y);
//rotate the sprite on the z axis (in degrees)
sprite.EulerRotation = 90;
// scale a sprite
sprite.scale = new Vector2(0.5f, 0.5f);
// draw a sprite/mesh with the specified texture
sprite.DrawTexture(texture);
// draw only a part of the the texture in the sprite/mesh
sprite.DrawTexture(texture, xOffset, yOffset, width, height);
You can’t perform that action at this time.