源之原味

这条鸣叫包含一个完全播放, 复古风格的街机游戏

 

抽象
Hey, it actually works

这篇文章来自theverge.com。原文网址是: https://www.theverge.com/2018/8/3/17648784/coding-tweet-video-game-code-golfing

以下内容由机器翻译生成。如果您觉得可读性不好, 请阅读原文或 点击这里.

A 280-character tweet might not seem like a lot of space, but if you’re crafty enough, it’s actually 只是 enough to program a video game.

That’s the challenge that security engineer Alok Menghrajani gave himself: to squeeze a CD-ROM holding a retro-style video game into the space of a single tweet. After two weekends, he’d succeeded — the resulting code is a video game that can be booted up in a virtual machine, or burned onto a physical disk. The game, Menghrajani told 主板, is kind of like a cross between Tron and Snake.

Previously, the Square employee managed to fit an entire bootable floppy disk containing a video game into a 140-character tweet. The current game takes advantage of Twitter’s recent doubled character limit, letting him create a CD-ROM-compatible game in 277 characters. He says the inspiration came after researching the CD format at work and realizing he could program functions with minimal characters.

For those with programming know-how, the process of cramming all of that code into this tiny space is known as “code golfing,” where people try to reach an objective, create a program, or solve a puzzle in the fewest lines of code possible (or in this case, the least amount of characters). The golfing namesake draws from the sport, where the fewest number of strokes (or keystrokes, in this case) “wins.”

“I find it relaxing,” Menghrajani said. “It’s a way to meditate for me.” You can try his game 这里, assuming you still have a computer that can load a CD or a floppy disk.

Leave A Reply

Your email address will not be published.