Show HN: Minicraft - Running Minecraft Classic from a Single Twitter Post

kuberwastaken1 pts0 comments

GitHub - Kuberwastaken/minicraft: A playable copy of Minecraft Classic hidden inside a single X thread that's self-decoding, runs in your browser. · GitHub

/" data-turbo-transient="true" />

Skip to content

Search or jump to...

Search code, repositories, users, issues, pull requests...

-->

Search

Clear

Search syntax tips

Provide feedback

--><br>We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

-->

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

Kuberwastaken

minicraft

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>26 Commits<br>26 Commits

TWEETS

TWEETS

assets

assets

font

font

scripts

scripts

unlinked-tweets

unlinked-tweets

.gitignore

.gitignore

.nojekyll

.nojekyll

FINDINGS.md

FINDINGS.md

README.md

README.md

game-shaken.html

game-shaken.html

index.html

index.html

minified-index.html

minified-index.html

tweet.txt

tweet.txt

View all files

Repository files navigation

Minicraft

A playable copy of Minecraft Classic, hidden inside a single X thread.

I found this rather cool trick from @rebane2001 on twitter yesterday that sort of reminded me that I was working on this "hard problem" I left 3 months ago of running Minectaft from a tweet.

If you do x.com/compose followed by the URL string on your post itself, it'll open up the compose box with those words clearly printed out! Using this I was able to truncade the instructions and my custom decoder (because it's ~20 tweets that need to be consolidated) base64 encoded

Is it useful? No, is it a really fun sunday hack that made me smile? sure

▶️ See it live on X →

Play it

Three ways, easiest first:

Just play → kuber.studio/minicraft

From the thread: open tweet 2's link, copy the data:text/html;base64,… line<br>it shows, and paste it into your browser's address bar → that's the decoder. Hit<br>auto-fill from github , then Play .

By hand: in the decoder, paste tweets 3–20 (the raw chunks) yourself, then Play.

How it works

The game is ~9 MB of HTML/JS. A thread is ~20 posts. The squeeze:

stage<br>size

original monolithic game (index.html)<br>9.2 MB

re-minified, JS-aware (minified-index.html)<br>4.47 MB

Babylon.js tree-shaken + dead crypto stripped (game-shaken.html)<br>2.35 MB

LZMA compressed<br>320 KB

base64url text<br>~427 K chars

→ 18 game posts + 1 decoder + 1 intro<br>20 tweets

The layout of the thread:

Tweet 1 — the intro (a compose link that opens the write-up).

Tweet 2 — the decoder : a data:text/html page, deflate-compressed and wrapped<br>in a self-inflating bootstrap so the whole thing (a UI plus an embedded LZMA engine)<br>fits in one post. Works fully offline.

Tweets 3–20 — the game itself, as raw base64url(LZMA) text. X Premium's 25 K-char<br>limit lets each post carry a big chunk directly — no links needed.

The decoder gathers the parts (paste them, or one-click auto-fill from github ),<br>base64url-decodes, LZMA-decompresses, and document.writes the game. A localStorage<br>shim is injected first, because the game needs storage and data: URLs disable it.

What's where

TWEETS/ + unlinked-tweets/ (builds the thread)<br>build_decoder.mjs decoder_page.html -> self-inflating decoder_bootstrap.html<br>decoder_page.html decoder source (UI + embedded LZMA engine)<br>decoder_bootstrap.html the built decoder, embedded in tweet 2<br>lzma-d-min.js LZMA decode engine (shipped inside the decoder)<br>intro.txt tweet 1 text (edit this — not the generated TWEETS/)<br>compose_link.py any text/file -> an x.com/compose/post link<br>encode.py / decode.py v1: hide bytes as Unicode variation selectors<br>thread_pack.py / _unpack generic file deflate-thread helpers">game-shaken.html the shipped game — Babylon tree-shaken, crypto-stripped, Elon-grass<br>index.html original monolithic Minecraft Classic (unminified, 9 MB)<br>minified-index.html the full game, re-minified with a JS-aware minifier<br>tweet.txt the v1 approach — bytes hidden as invisible Unicode variation selectors<br>font/ bitmap font the game uses<br>TWEETS/ the postable thread — tweet-001..020.txt + manifest.txt<br>unlinked-tweets/ the decoded text= of each tweet (for local testing without X)<br>FINDINGS.md empirical notes (WAF behaviour, URL limits, compression)

scripts/<br>build_thread.py game.lzma -> TWEETS/ + unlinked-tweets/ (builds the thread)<br>build_decoder.mjs decoder_page.html ->...

html tweets game tweet thread decoder

Related Articles