Javascript Game of Tron In 226 Bytes
Have you upgraded your hardware to play something beefier than 140-byte Tetris?
New submitter alokmenghrajani writes with "a detailed view of how we size-optimized a game of Tron to just 226 bytes." It's also optimized for Chrome, and very fast.
1KB Chess for the Sinclair still has that beat.
It works on chrome and firefox. This isn't a portability issue: normally developers add huge amounts of code to support IE. If it needs tweaking for IE, it would probably be 50% larger.
I wouldn't be surprised if you could write the same game in under 226 bytes of Z80 or 6502 assembly, so doing it in a high-level language seems much less impressive.
I am TheRaven on Soylent News
It's not really a game of Tron without a competing lightcycle. (Without fruit, it's not really a game of Snake either.)
Come to think of it, that might make a better movie than that last Tron.
226 byte which I am sure include library calls, only runs on top of the multi megabyte of browser code, may use various other resources as well.
By this standard, I can write Tron in 1 bit.
1
There.
Call it the "Run Tron Bit". It runs on top of a full impletation of Tron.
Our old low-bit graphics games used to do something or have some goal...
I don't have time to make a sig
The current version of the code (on the linked site) is only 221 bytes long - and I've had a quick play with it and it can be reduced further to 219 bytes by swapping out the boolean ANDs "&&" for bitwise ANDs "&" twice.
IJKL instead of WASD or arrow keys. It saves space because IJKL is actually in alphabetical order, which makes it a neat modulus away from being the four directions.
This was fun, because I got pretty much the same thing down to 56 bytes in x86 assembly some 15 years ago. I remember the best entry in the competition I wrote it for being around 48 bytes or so; I missed at least one trick for setting the graphics segment more efficiently, and also something related to either collision handling or keyboard input, don't remember which.
In any case, this is possibly the right version of the code. Should compile with NASM, and is even playable in Dosbox with arrow keys if you turn the emulation speed as low as it can go.
How many megabytes of supporting code are necessary to run those 226 bytes?
I think there's a difference between Tron and Suicidal Etch-A-Sketch
"Stratigraphically the origin of agriculture and thermonuclear destruction will appear essentially simultaneous" -- Lee
Suicidal Etch-A-Sketch
Please leave Governor Romney out of this.
Now it is like I am playing in Matrix time and I rock!
Apparently they don't consider "how to play the game" as part of the game. Hit i,j,k,l (well any key really)