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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: 4snakes – a classic Snake game but with 4 snakes

48 点作者 xojoc超过 5 年前

10 条评论

xojoc超过 5 年前
Hi everyone! I wanted to learn Typescript and experiment with PWAs[1] so I decided to create these little games. In fact if you go to <a href="https:&#x2F;&#x2F;xojoc.pw&#x2F;games2d&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xojoc.pw&#x2F;games2d&#x2F;</a> in some mobile browsers you&#x27;ll receive a prompt to install the games. They should work offline too.<p>You can find the code on my GitHub: <a href="https:&#x2F;&#x2F;github.com&#x2F;xojoc&#x2F;games2d" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;xojoc&#x2F;games2d</a><p>[1] <a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;Progressive_web_apps" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;Progressive_web...</a>
评论 #21307357 未加载
saagarjha超过 5 年前
Unfortunately it looks like the game fails with an error in Safari if you eat food :(
评论 #21297849 未加载
eps超过 5 年前
I get 4 snakes, can control one, the rest remain stationary. It will then also show circle-food thingies that jump around, but always of a color that&#x27;s not mine.<p>I suspect that&#x27;s not how it is supposed to play, no? Using Mobile Safari.
评论 #21297870 未加载
评论 #21297624 未加载
Jeff_Brown超过 5 年前
This makes me want to try a version where you control two snakes at once.<p>The steering interface is much harder than the traditional 4-direction version. (Not saying that&#x27;s good or bad, just saying it.)
评论 #21305891 未加载
评论 #21299673 未加载
评论 #21305739 未加载
newnewpdro超过 5 年前
Neat little game, but the controls suck.<p>I think it&#x27;d be a lot easier to control the snake if you had the turning radius start wider and decrease over dozens of frames of constant turning before clamping to the tight one you currently use initially. That way the player could modulate turning a bit to maintain a larger turning radius, as well as make subtle corrections with small taps.
AGoogleEmployee超过 5 年前
The game is lots of fun and a creative take on snake. The sound effect is very loud though. Cool work.
评论 #21297162 未加载
sc9311超过 5 年前
I also was confused by the 4 snakes concept. I think perhaps it could have been solved by putting a different color food in front of the snake when the board is initialized. This way the &quot;time to snake change&quot; is reduced drastically.
评论 #21305759 未加载
PopeDotNinja超过 5 年前
I officially suck at this game, but it is pretty cool :-)
riffraff超过 5 年前
this is a great game, I only with it had less degrees of freedom (I.e. only 4&#x2F;8 directions), it&#x27;s super difficult to control while also thinking for me :)
评论 #21305797 未加载
quickthrower2超过 5 年前
Game halts on iPhone 6 safari in food eat.
评论 #21302536 未加载