Usvsth3m used to have a tool where you could make your own 2048 games with various text and images. This no longer works (probably due to their move away from particular site), but you can do the same thing yourself.
First, go to https://github.com/gabrielecirulli/2048 then press the green “Clone or download” button, and press “Download ZIP”. Extract this somewhere, now we’ll work on it.
In js/html_actuator.js on lines 64 and 65 it should say
inner.classList.add("tile-inner");
inner.textContent = tile.value;
Between these two, add var valist=['1','2','3','4','5','6','7','8','9','10','11'];
Replacing these numbers with whatever content you want. Now change tile.value
on the next line to valist[Math.log(tile.value)/Math.LN2 - 1]
. This turns the number that would appear into an index (by taking log to the base 2) of the valist array.
Some CSS needs to be changed too, since now the text will be huge. Go to main.css and head to line 330. Change font-size: 55px;
to something lower like 25px
. There are some other classes a bit further down, like .tile.tile-256
that have their own font sizes, change these too.
And then you’ll probably want to change some text on index.html and you should be all set.
Here’s an example I made, with HL2 weapons ordered (roughly) by coolness/awesomeness.
No comments found.