TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

212 点作者 shanselman超过 1 年前

11 条评论

Genbox超过 1 年前
I love the low level .NET stuff Michael Strehovsky makes. Microsoft has built a feature-rich and easy-to-use environment, but it makes .NET developers think there is only one way to use it: create csproj and call dotnet build.<p>But underneath the covers, there is an extremely powerful compiler (Roslyn) and build-system (msbuild). Combine that with the flexibility of C# and you can develop pretty much anything.
评论 #38851729 未加载
评论 #38851568 未加载
delta_p_delta_x超过 1 年前
It is pretty impressive that even without third-party tools, the binary went from 64 MB to ~1 MB. IMO future versions of .NET should add more of such optimisation flags as default in a Release build.
评论 #38856770 未加载
评论 #38852421 未加载
评论 #38851755 未加载
askiiart超过 1 年前
In a similar vein, there&#x27;s Can you fit a whole game into a QR code? by MattKC, which is limited to about 3 kilobytes (2,953 bytes)<p><a href="https:&#x2F;&#x2F;youtu.be&#x2F;ExwqNreocpg" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;ExwqNreocpg</a>
TillE超过 1 年前
This is really cool, but it&#x27;s funny to use C# primarily as an awkward substitute for C as you call Win32.<p>For most practical purposes, the default .NET 8 AOT is great if you really need native code.
评论 #38851583 未加载
评论 #38851742 未加载
MStrehovsky超过 1 年前
Someone with an iPhone told me the webm video embedded in the article still doesn&#x27;t work on iPhones in 2024 so here&#x27;s another link to the video: <a href="https:&#x2F;&#x2F;twitter.com&#x2F;MStrehovsky&#x2F;status&#x2F;1742101904250060842" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;MStrehovsky&#x2F;status&#x2F;1742101904250060842</a>
评论 #38849045 未加载
deafpolygon超过 1 年前
&quot;Win32 is the only stable ABI on Linux&quot; ;)
评论 #38851984 未加载
tiberriver256超过 1 年前
He makes this look easy! Surprising how far you can take things with OOTB .NET.
nwellinghoff超过 1 年前
Very cool. What are the practical implications for this? Would it ever be wise to deploy these techniques for a commercial program? Is the end result more memory efficient during execution?
评论 #38851737 未加载
评论 #38881341 未加载
WhereIsTheTruth超过 1 年前
Michal and the whole CoreRT team saved C# for me, one of the very few people i respect from Microsoft
mgerullis超过 1 年前
Sadly the video won’t play on my iPhone
评论 #38856886 未加载
评论 #38840088 未加载
TheRealPomax超过 1 年前
Pretty sure you just joined the demo scene.
评论 #38902754 未加载