News for hackers. Stuff that matters.
Re:Snake Game using jQuery by IEatShortPeople on Wednesday April 09, 2014 @10:03AM (#7559311)
There is a bug. If you are traveling right, then quickly press down, release down, then press left, and release left, you will die. This is not snake behavior.
Re:Snake Game using jQuery by kevincoughlin on Wednesday April 09, 2014 @10:06AM (#7559333)
I experienced the same bug. It makes quickly turning to get a 'food' block in an adjacent cell very difficult.
Re:Snake Game using jQuery by msarchet on Wednesday April 09, 2014 @10:57AM (#7559663)
Yeah I think it misses some moves based on the timing loop
Re:Snake Game using jQuery by mkoryak on Wednesday April 09, 2014 @10:36AM (#7559499)
Why is this interesting? Is there some novel technique used here? The quality of the site its hosted on certainly isn't great.
Re:Snake Game using jQuery by grannyg00se on Wednesday April 09, 2014 @10:40AM (#7559537)
I found it interesting that it works at all given that it's using td elements as board cells, jQuery to compare dom elements for cell referencing/dereferencing, and setInterval to update the animation and gamer input.
Re:Snake Game using jQuery by fb1 on Wednesday April 09, 2014 @11:21AM (#7559817)
I had a bash a while back at getting a snake game to play how I wanted:

http://waynecrouch.co.uk/jsnake/ (source: https://github.com/wgcrouch/jSnake)

Re:Snake Game using jQuery by komrade on Wednesday April 09, 2014 @10:53AM (#7559630)
I also had some fun building a version of the snake game in JS some time ago http://komrade.github.io/snake/index.html
Re:Snake Game using jQuery by wehadfun on Wednesday April 09, 2014 @10:22AM (#7559426)
i thought it was going to be in under 30 lines