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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

85-Byte Snake Game

134 点作者 bundie将近 2 年前

12 条评论

ohadpr将近 2 年前
In 1998 Assembly programmers who typically participated in Demo competitions did a series of size coding challenges. The first one was a Snake game (Nibbles), all in a DOS environment. The winning entry was 48 bytes long.<p><a href="https:&#x2F;&#x2F;hugi.scene.org&#x2F;compo&#x2F;compoold.htm#compo1" rel="nofollow noreferrer">https:&#x2F;&#x2F;hugi.scene.org&#x2F;compo&#x2F;compoold.htm#compo1</a><p>There were also some creative attempts that took less than 48 bytes and got disqualified. One of those encode the entire game in a series of empty folders using the folder names.<p>Edit: the original Hugo size coding competitions were created by Claus-Dieter Volko (Alias: Adok).<p>Edit: Typos
评论 #37001637 未加载
sltkr将近 2 年前
I would enjoy these posts more if they actually documented how the game implementation works, rather than just dumping an assembly file for the reader to figure out.<p>Also, I don&#x27;t find “fits into a QR code” all that impressive. QR codes can contain kilobytes of data (see: COVID certificates), which is considered a lot in the demo scene (e.g. Google &quot;256B demo&quot; to see some really impressive examples). I bet you could implement a fully graphical Snake clone in less than 1024 bytes.
ctenb将近 2 年前
Pretty cool, but also pretty unplayable (mainly due to the high speed of the snake) :D
评论 #37000661 未加载
评论 #37003511 未加载
评论 #37003368 未加载
评论 #37001388 未加载
rjh29将近 2 年前
I got to a size-5 snake and it stopped giving me apples. Cool though.
hyperhopper将近 2 年前
Pressing the direction you are going makes it stutter<p>Pressing opposite direction kills you<p>Inputs aren&#x27;t buffered so fast inputs are either dropped or kill you<p>Sometimes the snake just randomly grows??<p>Not a very good implementation
评论 #37004990 未加载
poutinepapi将近 2 年前
Always love these projects with restrictions, they remind me of .kkrieger(<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;.kkrieger" rel="nofollow noreferrer">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;.kkrieger</a>), an insanely tiny FPS.<p>I had also never seen a source code example for running an HTML embedded DOSBOX, so that was pretty interesting too.
Tillgg将近 2 年前
Neat! Its pretty fast and restarts when you press the opposite arrow from where you are going - nerve wracking..
kragen将近 2 年前
in dosbox it seems to run too fast to be playable and then hang<p>is this the right file?<p><pre><code> 00000000: 6800 b81f b9a0 0fb8 0300 cd10 bfd0 078d h............... 00000010: 76fc 0faf dd21 cb38 2f74 f788 0fe4 60bb v....!.8&#x2F;t....`. 00000020: 0400 241e 7a02 88cb 2414 7402 f7db 29df ..$.z...$.t...). 00000030: 39cf 77d3 d1fb 8d41 02f6 f120 e474 c838 9.w....A... .t.8 00000040: 2d74 c489 7e00 4545 380d 882d 74c4 26ad -t..~.EE8..-t.&amp;. 00000050: 9388 27eb c8 ..&#x27;.. </code></pre> oh i guess with `dosbox -c &#x27;cycles 1&#x27; .` it&#x27;s playable actually<p>i suspect it will still eventually hang tho
sijourneyweezer将近 2 年前
Somehow got 2 on mobile after way more trying than I’d like to admit
postalrat将近 2 年前
If you enjoy making games in QR codes you should check out <a href="https:&#x2F;&#x2F;github.com&#x2F;kesiev&#x2F;rewtro">https:&#x2F;&#x2F;github.com&#x2F;kesiev&#x2F;rewtro</a>
anta40将近 2 年前
Doesn&#x27;t run well on DOSBox-X. Gave me lots of these: &quot;LOG: 6454305 ERROR CPU:Illegal Unhandled Interrupt Called 0&quot;<p>I&#x27;m on Intel Mac, btw.
flenserboy将近 2 年前
Reminds me of the old Beagle Bros 1-line BASIC programs.