Bad Apple 在 Open Doctrines 世界地图上运行,你甚至可以叫它“Bad Doctrine!”(Ba-dum tss)
Bad Apple runs on the Open Doctrines world map, you could even call this... "Bad Doctrine!" (Ba-dum tss)
Open Doctrines 用地图脚本在 64×48 网格上逐回合播放 Bad Apple 全 2,191 帧,时长 3 分 39 秒。该脚本共 491,780 行、13.9 MB,压缩后占成品地图 1.58 MB 的 88%,加载额外耗时约 0.4 秒。玩家拥有游戏副本即可从 Discord 获取地图运行,无需 mod 或引擎改动。
Hello strategists!
Bad Apple plays on the map. All 2,191 frames of it, 3 minutes 39 seconds, one frame per turn.
No engine change, no mod
This is the part I am happiest about. It is a map script - the same scripting any scenario uses, set province.ID.owner, waitUntil, jump. The game does not know it is playing a video. If you have a copy of Open Doctrines you already have everything needed to run it.
Every province is a pixel
The grid is 64×48, so 3,072 provinces, each a square. There are two countries: BLK and WHT. They own the black and the white pixels. A frame is nothing more than a redraw of who owns what, and the political map does the rest.
They start allied, with no armies, no money and rebellions switched off, because a war would be visible.
The letterboxing on either side is the game’s own Blocked Territory — the sentinel that means “nobody may enter this”. The borders of the video are literally unconquerable land.
The script is 491,780 lines
The scripting language has no loops over data and no string functions. A province id in a reference must be literal digits, and {} interpolation only works inside print. So there is no way to decode run-length or base-64 data from inside a script — the most compact thing the engine can actually execute is one line per changed pixel.
Which gives: 491,780 set province.N.owner lines, 13.9 MB of text. It compresses to 1.38 MB, which is 88% of the finished 1.58 MB map. The map is mostly script.
It costs about 0.4 s extra at load and nothing per turn — turn time depends on how many pixels change, not on how long the script is.
What it taught me about my own game
Profiling a turn: about 38% of it is repainting the political map over the full 8,192×4,096 world raster. That cost is identical whether the grid is 64×48 or 16×12, because it redraws the world, not the grid. Another 31% is the ownership transfers themselves, where each one reconciles districts twice.
Abusing a feature is a good way to find out what it actually costs.
Where can the map be found?
The map can be found in the Discord, in this message
Credit where it is due
Bad Apple!! is three people’s work, and is usually miscredited as one:
the song is ZUN’s, the stage 3 theme of Lotus Land Story (1998); the vocal arrangement everyone knows is Alstroemeria Records (2007), arranged by Masayoshi Minoshima, lyrics by Haruka, sung by nomico; the shadow-art video was made over 2008–09 by a group led by Anira, and posted to Nico Nico Douga on 26 October 2009.

来源:itch.io Devlogs · pr1nted.itch.io