NAS2D is an open source, object oriented 2D game development framework written in portable C++. It was designed to make the development of games and other applications that need a 2D interface easier by providing a high-level API. It handles the low-level tasks of setting up and managing the video display, input, sound mixing, file loading, etc.

One of the primary goals of NAS2D is to be cross-platform. A lot of effort has gone into the code to make it as platform independent as possible. The few areas that are different from platform to platform are hidden from the interface and is virtually transparent to the user.

What Platforms are Supported

NAS2D has been tested and verified working on the following platforms:

  • Windows
  • macOS Mojave - Ventura (10.14, 10.15, 11, 12, 13)
  • Linux (Debian and Arch distributions including Ubuntu and Manjaro)
  • NetBSD

Other platforms have been tested but are not officially supported.

NAS2D's History

NAS2D was born from the development efforts of another LairWorks project, The Legend of Mazzeroth. After several months of development it became clear that core code that LoM was built on didn't change very much. We cleaned it up, pulled it out of the LoM project, repackaged it and the first version of NAS2D was released.

Since its initial development and release, NAS2D has evolved considerably to take advantage of new language features of C++14, C++17 and C++20. It is very stable and performant.

Future Features

NAS2D's development has generally slowed down as it's met the goals of its current needs in LairWorks projects. Some planned features include:

  • Vertex/Fragment Shader Support
  • UTF-8 Enabled Text Rendering
  • Filesystem rebuilt using entirely C++17 <filesystem> features to be able drop the PhysicsFS dependency
  • Rebuild Delegate/Signal classes to use modern features introduced in C++17 (e.g., std::function)
  • Remove XML namespace (e.g., NAS2D::XML) and related exposed library functions (will require client code to provide their own serialization/deserialization implementations)
  • Replace internal use of XML with JSON
  • Better support for rendering graphics primitives


NAS2D is licensed under the zlib license.