Drawing
Sprites, sprite sheets, primitives, text with shadows, tints, blend modes and render targets.
Draw reference
A lightweight C++20 library for 2D games. Runs on desktop and in the browser.

Sprites, sprite sheets, primitives, text with shadows, tints, blend modes and render targets.
Draw reference
Mix buses, ducking, doppler, occlusion and voice priority, controlled through sound handles.
Sound reference
Keyboard, mouse and up to 8 controllers. Bind named actions to all of them at once.
Actions reference
A fixed-timestep loop, scene switching and game objects with physics and z-ordering.
Scene reference
Follow a target, stay inside the world, shake the screen and convert between world and screen space.
Camera reference
Particle emitters, easing functions and a small UI toolkit with keyboard navigation.
Particles reference
A complete program: open a window and move a circle with the arrow keys. The same code runs on desktop and in the browser.
#include <asw/asw.h>
int main() {
asw::core::init(320, 240, 2);
asw::Vec2<float> position(160.0f, 120.0f);
asw::core::run([&]() {
asw::core::update();
const float dt = asw::core::get_delta_time();
if (asw::input::get_key(asw::input::Key::Left)) position.x -= 120.0f * dt;
if (asw::input::get_key(asw::input::Key::Right)) position.x += 120.0f * dt;
asw::display::clear(asw::color::black);
asw::draw::circle_fill(position, 12.0f, asw::color::cornflowerblue);
asw::display::present();
});
asw::core::shutdown();
}These are the example programs from the ASW repository. Play them in your browser →