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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

WebAssembly COBOL Pong

181 点作者 ColinEberhardt大约 5 年前

17 条评论

angrygoat大约 5 年前
Neat! The actual COBOL is pretty minimal, just tracking where the balls and paddles are and then calling out to update the DOM. It doesn&#x27;t look anywhere near as horrific as I would have expected :)<p><a href="https:&#x2F;&#x2F;github.com&#x2F;moxon6&#x2F;cobol-js-emscripten&#x2F;blob&#x2F;master&#x2F;cob&#x2F;main.cob" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;moxon6&#x2F;cobol-js-emscripten&#x2F;blob&#x2F;master&#x2F;co...</a>
评论 #23195649 未加载
TurboHaskal大约 5 年前
For player 2, &#x27;J&#x27; goes up, while pressing &#x27;L&#x27; goes to the left from the perspective of the paddle. This feels like made in purpose to hurt vi users.
评论 #23190683 未加载
评论 #23199486 未加载
ianbooker大约 5 年前
I love how this is a total geekery for fun project and one of the best quasi job application in 2020.
评论 #23190063 未加载
评论 #23190208 未加载
esimov大约 5 年前
Cute little project. Thumb up for selecting Cobol as the language of choice for the implementation. I might feel nostalgic.
jgrahamc大约 5 年前
See also, using COBOL with Cloudflare Workers (via WebAssembly): <a href="https:&#x2F;&#x2F;blog.cloudflare.com&#x2F;cloudflare-workers-now-support-cobol&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.cloudflare.com&#x2F;cloudflare-workers-now-support-c...</a>
评论 #23192599 未加载
snowoutside大约 5 年前
This is sweet! Interestingly it seems to only accept QWERTY input even when the keyboard has an alternate mapping set. This makes sense though given the positions of the keys chosen
gpm大约 5 年前
The ball doesn&#x27;t seem to bounce &quot;properly&quot; - i.e. upwards if it lands towards the top of the paddle and downwards if it lands towards the bottom of the paddle.
kibebr大约 5 年前
That&#x27;s impressive!<p>How did you remove all the bloat generated after Emscripten&#x27;s compilation?<p>I&#x27;ve coded a snake game in C and when I compiled, the app.js file itself was ~2mb.
评论 #23200024 未加载
hardmaru大约 5 年前
I heard COBOL skills are in demand these days in the US.
评论 #23190367 未加载
elpg454大约 5 年前
When I view the source code, it&#x27;s just a javascript file,<p><a href="https:&#x2F;&#x2F;moxon6.github.io&#x2F;cobol-js-emscripten&#x2F;cobol-js&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;moxon6.github.io&#x2F;cobol-js-emscripten&#x2F;cobol-js&#x2F;index....</a><p>where is the cobol?
评论 #23190608 未加载
评论 #23190515 未加载
ptx大约 5 年前
Cool!<p>What&#x27;s the deal with the <i>alternator</i> function (in app.js)? Why should keypresses be read only on every other attempt?<p>Also, is there some kind of implicit sleep or requestAnimationFrame somewhere? Or is it busy-looping and polling for key presses as fast as it can?
评论 #23190384 未加载
rdiddly大约 5 年前
I do enjoy a good stunt, although it&#x27;s also fun to play while I wait for my bloated-ass executable to upload!
benatkin大约 5 年前
<a href="https:&#x2F;&#x2F;youtu.be&#x2F;st6-DgWeuos" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;st6-DgWeuos</a>
imadfy大约 5 年前
Can you get mobile browsers to open the keyboard? I can&#x27;t play. :(
sandov大约 5 年前
Right paddle controls are backwards compared to vim.
评论 #23190502 未加载
amelius大约 5 年前
Next step: both users playing over the network?
ngcc_hk大约 5 年前
It seems very hard :-) Not the COBOL.