
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
Tetromino Elektronika -- an ASCII Falling Tetromino Game by Patrick Devine, 2018
TL;DR - A falling tetromino block game based upon NES Tetris in the style of the original 1984 Tetris by Alexey Pajitnov
Try it out with the command:
$ docker run -it --rm pdevine/tetromino
It should look something like:
SCORE 0000128 LINES-000 [][][] 001 [] <! !> <! !> [][][] [] <! !> [] [][][] 002 <! !> <! !> <! !> <! !> [][] 003 <! !> [][] <! !> <! !> <! [][] !> LEVEL [][] 000 <! [][] !> 6 [][] <! !> <! !> <! !> [][] 000 <! !> [][] <! !> <! [] !> [] <! [][][][][] [] !> [][][] 001 <![][][][][][][][] !> <![][][][][][][][][] !> ******************** 000 [][][][]
This game was written because of an offhand remark my boss made to me in 1994. I had just finished up two years of college in Vancouver, British Columbia when I had taken a job at Radical Entertainment to write Super Nintendo games. I wasn't a particularly great programmer at the time (which is arguably still true), however, I found writing games in 65816 Assembly (the language of choice for the Super Nintendo) extremely daunting. There was sparse documentation, few code samples, and the assembly that I had learned in college was fairly different than the code I was writing at Radical. That coupled with a slow build process on an Intel 486DX2-66 computer, and an even slower data transfer of the object code across a parallel port onto our homebuilt development kits, meant a lot of 80 hour work weeks.
I remember mentioning to my boss, Jack Rebbetoy, about how difficult I was finding things, and he made a remark about how we had engineers on-staff who could knock out a copy of Tetris in a weekend. This really blew my mind. We did have a lot of really talented engineers at Radical, but at the time I was having a hard time even getting a sprite to render correctly on the screen.
Fast forward 24 years, and I'm now working as a Product Manager at Docker. I still love writing games, but haven't done it professionally since that job at Radical. The problem with using Docker to run and distribute games though, is that there isn't an easy to use video subsystem. You can use it with X11 and using a remote display, or just passing in the X socket, but that's not exactly easy to do. So given the limitation to really only use ASCII text, can you still create meaningful games and applications?
I ended up putting together a very rudimentary ASCII sprite library (github.com/pdevine/go-asciisprite), written in Go. Go was chosen since I wanted the compiled ***ary to be really small. I think the entire Tetromino docker image weighs in at about 2.8MB, which is shameful by 1994 standards (two whole floppy disks!), but pretty tiny in 2018. After putting together the sprite library, the choice for the first game to write seemed pretty natural; Could I actually write Tetris in a weekend?
The answer is a pretty definitive "yes". Even though I've spent more than a weekend writing Tetromino Elektronika, the core of the game was written in about that amount of time, mostly spent riding Caltrain up and down the peninsula in the SF Bay Area. I tried to keep things as close as possible in terms of timings with the original Classic NES Tetris game (sorry, no hard drops!), and tried to make the look-and-feel similar to the original Tetris from 1984 on the old Soviet based Electronika 60.
So with that, hopefully you enjoy the game, and maybe even get inspired to create something with go-asciisprite.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务