Why another 2D API?

NAS2D isn't just another 2D renderer. It's a complete set of tools, functions and classes that let you jump into building a game right away.

NAS2D started its life as the core code for The Legend of Mazzeroth. We had looked at, considered and ruled out several other frameworks. Either they were too low-level, were in a language that we didn't want to use or were lacking in features we really needed.

So we set about developing LoM using a few low-level libraries. After awhile, we realized that the core code, once written, didn't change too much and that others could find it useful. And thus, NAS2D was born.


These are screenshots from several projects using NAS2D.

  • slide
  • slide
  • slide
  • slide

Virtual Filesystem

Seamless virtual filesystem that works with flat files, archives or a mix of both! Supports common archive formats including ZIP, 7z, WAD, PAK, GRP and HOG.

OpenGL Renderer

Highly portable OpenGL renderer that takes advantage of modern rendering techniques to provide high performance 2D graphics and specialized visual effects via fragment shaders.

Audio Mixer

Provides access to any number of audio channels and one music channel.

Supports WAV, OGG, FLAC for sound and music playback. Additional support for IT, XM, S3M and MOD for music playback.

Image Formats

Supports a wide variety of image formats including: BMP, GIF, JPEG, LBM, PCX, PNG, PNM, TGA, TIFF, WEBP, XCF, XPM, XV

Where can I get the source code?

The code is currently hosted on GitHub. You can get access here: https://github.com/lairworks/nas2d-core