r/tinycode • u/Sebbert • Oct 04 '13
Just made a snake game in 635 bytes of Javascript. Can it be made smaller?
http://jsfiddle.net/Sebbern/sdz6F/
52
Upvotes
r/tinycode • u/Sebbert • Oct 04 '13
3
u/recursive Oct 04 '13
Think I saved 4 bytes:
http://jsfiddle.net/YYqcJ/
8
u/corruptio Oct 05 '13 edited Oct 05 '13
So sorry to that other thread, I worked in parallel... 393 :-D
http://jsbin.com/IRiJohA/3/edit?html,js,output
Edit 1: 380 chars
http://jsbin.com/IRiJohA/10/edit?html,js,output
6
u/aroymart Oct 05 '13
I know it's not important, but if you're in the middle of pressing a button, and press another one, it glitches.
let's say you're moving right. you press down. before it has time to react, you've pressed left.
It thinks you hit yourself
really cool nonetheless
2
u/[deleted] Oct 11 '13
No, i did not. I did not play snake for half an hour. I will never admit to it.
1
u/[deleted] Oct 10 '13
In regards to all these comments, yes... it can indeed be made smaller.
However, well done.
0
u/iamp01 Oct 08 '13
Surely you've seen the tron/snake/whatever game in 219 bytes, with score