编程与软件工程js13kgames.com
Q1K3:用 13KB JavaScript 致敬 Quake
Q1K3 - An homage to Quake in 13kb of JavaScript
2021 — 2024,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
Q1K3 是 js13kGames 2021 参赛作品:作者 phoboslab 用不到 13KB 的 JavaScript 复刻了 Quake 风格的第一人称射击游戏,包含两个致敬 E1M1/E1M2 的关卡。游戏采用轴对齐立方体构建关卡以简化碰撞检测,纹理则由作者自制的程序化生成工具产出。
为什么经久不衰:在 13KB 里塞进一个可玩的 FPS,是对工程极限的持续挑战,也反衬出如今网页动辄数 MB 的臃肿,多年后仍是极简开发的经典范例。
HN 评论精选
作者回应需求加入鼠标反转选项,且压缩后仅增加 1 字节
应大家要求,现在加了个复选框,可以让鼠标垂直轴反向移动 :) 有趣的是,这个功能只让最终 ZIP 体积增加了一个字节,现在总共 13309 字节。ZIP 压缩(以及 Roadroller 压缩)的结果可以非常反直觉。
phoboslab查看英文原文
Upon popular demand, there's now a checkbox to have the vertical mouse axis move the wrong way :) Play: https://phoboslab.org/q1k3/ Code: https://github.com/phoboslab/q1k3/commit/a522cb597d805ef7e9d5d974398047eb5697272c - curiously this only increased the final ZIP size by one byte. 13309 bytes in total now. ZIP compression (and by extension: Roadroller compression) can be very non-intuitive.
Roadroller 压缩器作者解释源码为何看起来像乱码
很荣幸 Q1K3 等 js13kGames 2021 的许多作品是用 Roadroller 压缩的,这也是它(压缩后)的源码看起来基本是一串随机字符加一点 JS 代码的原因。
lifthrasiir查看英文原文
I'm honored that Q1K3, among many other entries to js13kGames 2021, is compressed with Roadroller [1], which is the reason that its (compressed) source code is basically a random-looking string plus some bit of JS code. [1] https://github.com/lifthrasiir/roadroller/
对比 13KB 的游戏与动辄 1MB 的普通网页,讽刺现代网页臃肿
这么多的东西塞进了 13KB,而前几天我为了看一个网页表单却不得不下载 1MB 的垃圾。
hughrr查看英文原文
Amazing that’s crammed in 13Kb but the other day I had to download a Meg of crap to view one web form.
分析技术实现:轴对齐立方体简化碰撞,纹理靠程序化生成
我通关了它的两个关卡(是 E1M1 和 E1M2 的简化复刻)。有趣的是关卡基本由轴对齐的立方体构成,这大大简化了碰撞检测与响应。纹理是用作者自制的工具和库程序化生成的。
badsectoracula查看英文原文
Nice, i actually played through its two levels twice (they are simplified recreations of the E1M1 and E1M2 though the second level has a few differences). It is interesting to see how the levels are basically made up of axis aligned cubes which simplifies collision detection and response considerably. The textures are also made using procedural generation using a tool (and library) the author made[0]. I think a "blur rect" and "blur and map result to existing colors" would help a lot with the aesthetic. Also the editor would benefit from a "duplicate step" option too. [0] https://phoboslab.org/ttt
历次讨论
同类还值得读
开源应用架构
The Architecture of Open Source Applications
《开源软件架构》(AOSA)是一本在线免费书,邀请知名开源项目的作者亲自剖析其内部设计,涵盖 SQLAlchemy、LLVM、Audacity、Apache、Bash 等系统。
编程与软件工程上首页 9 次 · 2011–2024aosabook.org编辑精选编程语言简史:简短、不完整且多半错误
A Brief, Incomplete, and Mostly Wrong History of Programming Languages
一篇以戏谑、故意不准确的方式回顾编程语言史的博客文章,用夸张轶事和讽刺定义串起 Lisp、C、C++、Java、JavaScript、PHP 等语言。
编程与软件工程上首页 8 次 · 2009–2021james-iry.blogspot.comSQLite 是如何测试的
How SQLite is tested
SQLite 官方文档页,系统介绍 SQLite 的测试体系:多种测试方法(TCL 测试、模糊测试、回归测试、静态分析等)和海量测试用例,展示了这个小型开源项目如何靠极致测试获得…
编程与软件工程上首页 8 次 · 2009–2025sqlite.org编辑精选高级编程语言(2009)
Advanced programming languages (2009)
Matt Might 的经典文章,按用途推荐“高级编程语言”:如果追求就业就选主流语言,如果追求表达力、学术研究或创业,则推荐 Haskell、OCaml、Scala 等函数式语…
编程与软件工程上首页 8 次 · 2009–2022matt.might.net我的 Forth 与栈机器经历
Yosefk - My history with Forth & stack machines
作者以亲身经历回顾了使用 Forth 语言和栈式机器的历程:既赞叹其简洁优雅、代码量小、可自举的优点,也坦率指出栈操作在实际编程中的痛苦,以及 Forth 社区文化中的问题。
编程与软件工程上首页 8 次 · 2010–2024yosefk.com编辑精选