Building a self-contained game in C# under 2 kilobytes

In this article, the author explores the idea of creating a small self-contained C# executable by building a graphical maze game. The author discusses the importance of program size in terms of transfer times and user experience. They explain that while disk space is now cheap, transfer times still matter. The article provides step-by-step instructions on building the game, utilizing sizecoding techniques and Win32 APIs. The author then explores different optimization techniques to reduce the size of the executable, including compression, IL trimming, native AOT compilation, and the use of bflat and crinkler compilers. The article concludes with a final size of 6.5 kB.

https://migeel.sk/blog/2024/01/02/building-a-self-contained-game-in-csharp-under-2-kilobytes/

To top