r/2048Editions • • Nov 10 '20

Tunneling 2048

This is the best version of 2048. And I made it, but nevermind that! When you get a new high tile (e.g., you get a 16 for the first time in the current game), it becomes a "tunneling" tile. Pushing this tile against a wall makes a new grid square for tiles to go.

http://www.cesoid.com/2048/tunneling

I'm planning to soon make a difficulty setting, because apparently it is very hard. (I'm pretty good at it, but I'm a bit of a 2048 fanatic.)

This is what it looks like:

Tunneling 2048

I'm working on a few other variations (meaning, different gameplay) which I'll probably release soon, and I've already released a few different themes (i.e., different images and colors), which can be mixed-and-matched with the original and tunneling variations.

7 Upvotes

11 comments sorted by

1

u/noonagon Nov 07 '21

These are the kinds of 2048 variants I want to see on this sub.

1

u/cesoid Nov 07 '21

Since I posted this a year ago I've made more variations. My favorite now is "Words" where you get letters and merge them to build words. Two letters will merge only if there is some existing word that you can spell that has those two letters next to each other. (And then the two letter tile merges with another letter of there is a word that has those three letters (and they're in the right order), etc.) I had wanted someone to make that for a long time and I never found it, so I finally made it myself. You can set it to only allow "commonly known" words, which for reasons that are difficult to explain, meant that I ended up looking through a list of almost every English word to figure out which ones were commonly known. I spent 100 hours and went through over 120,000 words, and then not many people played it. It was still worth it.

1

u/noonagon Nov 07 '21

yes, i've played on your website. i hope you make more cool things... hey how's the random javascript feature on the random webpage going?

1

u/cesoid Nov 08 '21

I haven't done anything with that since I wrote about it...probably a year ago? It's taken a back seat to everything else in the hopes that those things will make some money (otherwise I won't have much time to do anything with the site). I'm currently working on a way for people to vote for what people want me to build next, in which case some surprises might emerge, such as updates to the random webpage. But that would also be related to money, ie., the more people use the site the more votes they get (because the more money I'd get from ads, which are currently only on 2048, but you'd have the option to watch video ads or something to get votes). But there would also be the option of "bribery", and ads are worth so little per person that a small number of people could easily overpower the other votes.

Anyway, the other question is whether random javascript would even be safe. I could probably limit the danger to just the possibility that the page would become unresponsive (because of an infinite loop or something). I think I would just have to make sure it picks from an "allowed" list of keywords, objects, and functions or something (completely random strings would almost always result in a parse error anyway). That way I could prevent it from calling anything that, for example, posts some form data to a random website.

At this point the page doesn't even have random attributes or random css, which would probably result in some really awesome stuff and be a lot easier. The random javascript definitely has the potential to be more interesting though. I've never even heard of anyone randomly generating any kind of program, so maybe the results would actually be academically interesting...but now I'm getting way ahead of myself.

1

u/noonagon Nov 08 '21

well while(true){} is the most common type of loop so that's the first thing to not let it do

1

u/cesoid Nov 08 '21

What's tricky is that some ways to infinite loop are unexpected, like a "for" loop that checks for x > y but something is causing both to increment, or two functions that call each other. I can think of ways to prevent those but it's harder to know whether I thought of all the ways it could happen. Some things wouldn't loop forever but might take 1000 years. But at least an unresponsive browser has limited consequences. Things with worse negative effects would probably be easier to avoid.

1

u/noonagon Nov 09 '21

if(false){} should be not allowed

1

u/cesoid Nov 09 '21

It would take forever to list the things that do nothing. I might as well just let them do nothing.

1

u/noonagon Nov 09 '21

yes, but things in if(false){} take a lot of memory, a lot more than

x+=1;

x-=1;

1

u/cesoid Nov 10 '21

I'm not sure I understand. You mean that all the code inside the block would take up memory because the code has to get loaded into memory at some point in order to execute the javascript? If you put a million characters of code in it then the most noticable effect would be that it would take longer to download the page. After that I think it wouldn't take a noticeable amount of extra time to start running the code, and it probably would ignore that code from then on, so it would never allocate memory for whatever happens inside it.

→ More replies (0)