# ASGL2 > ASGL2 is a small 2D game library for C# and .NET 10 built on SDL2. The same game code and assets run on Windows and Linux. Game loop and states, sprites, tile maps (JSON, made with the bundled map editor), camera, particles, input, sound effects and streamed music, embedded assets, a UI toolkit and a software 3D renderer. The API reference is generated from the library's XML doc comments, one page per source area. Start with the guides, then open the page for the area you need. NuGet package: ASGL2 (the SDL2 native libraries are not included; see the package readme). ## Start here - [Guides](md/API.md): game loop and states, rendering, sharp text and fullscreen, tile maps, input, audio and music, embedded assets, UI, 3D, working with AI assistants, Windows and Linux - [Package readme](md/README.md): the SDL2 native libraries for Windows and Linux, a first game, upgrading from 2.x, what is new in 3.0 and 3.1 - [AGENTS.md](AGENTS.md): for changing the ASGL2 repository itself: layout, build commands, conventions ## API reference - [Core](md/Core.md): The game loop, states, timers and base game objects. - [Graphics](md/Graphics.md): The 2D renderer, sprites, sprite sheets, parallax, star fields and the follow camera. - [Text](md/Text.md): TrueType text through SDL2_ttf: UTF-8, fonts from files or memory, sharp at any window scale. - [Input](md/Input.md): Keyboard, mouse and text input, with per-tick pressed/released edges and swappable sources. - [Audio](md/Audio.md): Sound effects with pooled overlapping playback and per-play volume, streamed music (MusicPlayer) and pitch-bendable loops via SDL2_mixer (WAV, OGG, MP3, FLAC). - [Tilemaps](md/Tilemaps.md): Tile layers, collision, animated tiles, isometric maps and the .tilemap.json format. - [Animation](md/Animation.md): Frame animation for sprites. - [Motion](md/Motion.md): Waypoint paths, oscillators and phase machines. - [Effects](md/Effects.md): Particles and floating text. - [Collision](md/Collision.md): Convex polygons, hitboxes and tile move results. - [Math](md/Math.md): Small math helpers. - [Data](md/Data.md): Scores, best times, settings files and embedded resources (ResourceInfo, ResourceLoader). - [Net](md/Net.md): TCP transport: server, client, polled events and message reader/writer. - [UI](md/UI.md): ASGL2.UI, a retained widget toolkit drawn with SDL. - [Graphics3D](md/Graphics3D.md): A software 3D renderer on SDL_RenderGeometry: meshes, objects, camera, OBJ loading. - [Interfaces](md/Interfaces.md): The interfaces the engine types implement. ## Example games - Pip's Run (Side-scrolling platformer): Follow camera with look-ahead and shake, animated tiles, 4-layer parallax, levels made in the MapEditor. - GalagaTest (Fixed formation shooter): Game states, waypoint dive paths, oscillators, star field, effects and pooled sound. - StarStrike (Horizontal bullet-hell): Auto-scrolling parallax and aimed, fanned and ring bullet patterns up to a 5th-wave boss. - PacDemo (Maze chase): Classic ghost targeting AI on a generated .tilemap.json maze. - AsteroidsTest (Vector arcade): Every shape is a ConvexPolygon: drawn as an outline and collision-tested with the same object. - PoleRacer (Pseudo-3D racer): Scanline road with curves and hills, roadside billboards, lap timer with saved best lap. - IsoMeadow (Isometric sandbox): Isometric tile maps with overhanging art, world-pixel collision and a clamped follow camera. - Blackjack21 (Card table, 2-player LAN): Server-authoritative networked play over ASGL2.Net, with simulated-keyboard input for testing. - Demo3D (Software 3D scene): Spinning textured primitives, OBJ models and mesh level of detail, with a fly camera. - UIDemo (Widget showcase): Every ASGL2.UI widget on four pages: basics, text and numbers, lists, dialogs. - MapEditor (Tool: tile map editor): Paint layers, place spawns, define animated tiles and save the .tilemap.json files the games load. ## Optional - [Everything in one file](llms-full.txt)