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.
....are really fast.
It's Chrome-only.
keyup instead of keydown makes the game play like junk. Much more apparently unresponsive.
Tried it in ie9. It simply doesn't work.
I'd love to have another 226 bytes explaining the controls. They don't seem to make much sense...
Colin Dean Go a year without DRM
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.
if you keep spamming i,j,k and l, your score keeps going up.
also, why doesn't it work in firefox??
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.
What an awesome game for showing how irritatingly laggy simple keyboard inputs can be in even the most modern of web browser environment. This is the "future"?
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.
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?
Javascript Game of Thrones in 226 bytes. Impressive.
1) It's not really the game, something that kind of maybe looks sort of like the game
2) doesn't really even have the right functionality
3) is only a small bit of logic
Tron();
Tron in 7 bytes in javascript.
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!
I would just like to express how much I hate anything that promotes using one browser over another.
It's like people have forgot the lessons of the past, or are just totally oblivious to them.
It is also horrific from an html point of view. No head, no title, no html, no doctype, no quotes around attributes, no closing of body or canvas tags. That is even skipping nicities like xml prolog and doctype headers. This is more like a bunch of crappy text which happens to trick some browsers into thinking they are html and script. The amazing part is not that this emulates a tron-like animation in a small footprint (with poor latency on the controls I should add), but that it renders anything at all without the browser giving up.
If more games were created for Google Chrome, or some other type of cross-platform offering, and good games at that, perhaps we could finally be free from the Smeagol of multimedia: DirectX.
Could you post this in one of those text sharing sites? Copying this didn't seem to work.
I was super excited when I found out someone had done this for tron... Until I realized it was actually the old qbasic nibbles or worm game. This is neat and all, but its not tron. Its not even the tron light cycle game since you play by yourself. Oh well.
... 226 bytes is cool and all, but is useless to me since it doesn't work on my platform. I would gladly accept it taking, say, even 15,000 bytes if it actually worked. It's not as if I can't afford the RAM.
I started with a TRS-80 III, cassette drive storage. There was a magazine,
"80 Micro" which held a contest, who could write the best one line program.
There was a trick to get more characters (an extra 10 or so) in one line I forget
now the total length but think around 120 characters (bytes) on one line.
This was done in Basic using Peeks and Pokes to keep them short.
Lot's of entries; most being this Java Tron cycle type, be it Tron, skiing downhill
or racing; just something controllable going forwards until it hits something.
I made this with C++ a while ago:
http://www.pouet.net/prod.php?which=33971
Used crinkler to pack it down...
Has all of /. gone stupid?
Sure it's a lame name for the "project", and it's barely playable, and doesn't work in all browsers... but is a freaking awesome piece of code and all I read here is childish whining. Go back to facebook.
What happened to /.?
"If I have been able to see so far, It is because I went out and bought a damn binoculars" - Ze da Esquina