Snake Game using jQuery
webdeveloperjuice.com
Snake Game using jQuery
1–9 of 9 posts
Re: Snake Game using jQuery
#2There 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
#3There 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.
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
#4i thought it was going to be in under 30 lines
Re: Snake Game using jQuery
#5Why 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
#6Why is this interesting? Is there some novel technique used here? The quality of the site its hosted on certainly isn't great.
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
#7I 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
#8There 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.
I experienced the same bug. It makes quickly turning to get a 'food' block in an adjacent cell very difficult.
Yeah I think it misses some moves based on the timing loop
Re: Snake Game using jQuery
#9I 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)