Why build a C# 2D library instead of using a big engine?
Vincent DeCampo, the developer behind Z8E Studios, says the usual advice for getting a C# 2D game running on Windows and Linux stopped fitting almost immediately. The standard recommendation is to use Unity or MonoGame, and he acknowledges that for many people that is the right call. But after 35 years of programming, he wanted a foundation he understood and controlled completely.
"Using a big engine means being beholden to another company: its licensing terms, its pricing changes, its roadmap," he said. "We've all watched engine terms change under developers who had already shipped. I didn't want my game's future to depend on someone else's business decisions."
So he built ASGL2, a free, open-source (MIT) 2D game library for C# and .NET 10, built on SDL2. SDL2 handles windows, graphics, audio, input, and the platform differences underneath, which let him focus on the parts that make a game: tile maps, animation, collision, a camera, particles, a UI toolkit, and a map editor. The same code and assets build for Windows and Linux, a hard requirement because he is targeting Steam on both. His Metroidvania, Last Launch, is the proof: it ships as a single executable with a Windows installer and a Linux .deb package.
What beginners miss when starting a 2D game in C#
Most articles stop at opening a window and drawing a sprite. DeCampo says that is about 5% of a game. What actually trips people up comes later.
- Shipping, not just running. Getting from "it runs on my machine" to a build a stranger can install is its own project: bundling native libraries, embedding assets, and building an installer for Windows and a package for Linux. "Plan for it from day one, not the week before launch," he said.
- Timing. If game logic runs at whatever speed the monitor refreshes, the game plays differently on every machine. He runs logic at a fixed rate (60 Hz) and draws separately.
- Input is bigger than it looks. Keyboard, mouse, gamepads, rebinding controls, and two players sharing a keyboard for co-op. "Nobody writes about that until they need it."
- Levels need tools. You won't hand-code a 130×200-tile level. You need a map editor and a data format, and building or choosing those is a real decision.
- The demo-to-game gap. Menus, save files, settings, pausing, resolution, and fullscreen handling. "None of it is exciting, and all of it is required."
How to choose a 2D library without regret
DeCampo sees several common mistakes when developers pick a 2D library for a C# game.
- Picking by popularity instead of by the game. A huge 3D-capable engine is overkill for a pixel-art platformer, and a tiny library is wrong for something that needs a full editor pipeline. "Start from your game's needs."
- Not checking Linux early. "'Cross-platform' on a feature list isn't the same as building and testing on Linux every week," he said. He builds both platforms continuously because surprises found at the end are expensive.
- Ignoring licensing and long-term control. Read the terms and ask what happens if they change. "Owning your stack is more work up front, but no one can change the rules on you later."
- Underrating documentation. "A library is only as good as your ability to find out how it works at 11 p.m." He generates ASGL2's reference docs straight from code comments so they never drift out of date.
- Assuming building your own engine is crazy. "For many people it is," he said. "But with real experience and a clear, focused scope, a small purpose-built library can be faster to work with than learning someone else's giant one, and you understand every line of it."
Practical takeaways
If you are starting a 2D game in C#, DeCampo's advice points to a few concrete steps: decide early how you will ship on every target platform, separate game logic from rendering with a fixed timestep, plan for input rebinding and local co-op, budget time for a map editor and data format, and treat menus, saves, and settings as required work rather than polish. When choosing a library, test on Linux early, read the license, and weigh documentation and long-term control alongside feature lists.
ASGL2 is available on NuGet and documented at z8estudios.com/asgl2.html.
