About 50 results
Open links in new tab
  1. javascript - Snake movement in snake game - Stack Overflow

    Nov 7, 2015 · Please, I was following a tutorial on how to make a snake game and I understood everything about the code up until the where the snake has to move. I just don't seem to get …

  2. javascript - Add a high score to Snake game - Stack Overflow

    May 25, 2019 · 0 I was trying to set a high score in my Snake game by using localStorage, but I can't get it to work. Could I get some advice? This is on Cloud9 using Javascript.

  3. Adding Scores To Snake Game İn JavaScript - Stack Overflow

    I am trying to make a snake game in JavaScript with HTML. I want to add scores to game. Here is what I've tried: ctx.fillStyle = "white"; ctx.fillRect(tailSize, tailSize, tailSize, tailSize -...

  4. Snake Game in Javascript - Stack Overflow

    Oct 27, 2013 · I'm really new to Javascript, so I decided to create a simple SnakeGame to embed in HTML. However, my code for changing the snake's direction freezes up after a few turns. …

  5. html - JavaScript Snake game - Stack Overflow

    I am having trouble with the moving of the snake elements. I have written a Snake game in C# desktop application but it the same logic doesn't seem to work in JavaScript. Here is the part …

  6. javascript - Snake - Move through walls - Stack Overflow

    Oct 28, 2020 · I'm making a snake game for school and one of the tasks is to make the snake go through the walls and start on the other side. newX and newY is the head location of the snake …

  7. How can I run this JavaScript snake game in Visual Studio Code?

    Jul 28, 2021 · I have this Snake game written in JavaScript and when I go to run the game.js file by clicking the run icon on the top right part of the screen I get this error.

  8. javascript - How to add score to snake game? - Stack Overflow

    Apr 2, 2019 · I managed to do that game score counts, but for example you have 0 points and then you score 1 point, number 0 doesn't clear and stays in back.

  9. javascript - How can I add a restart button for my snake game

    Apr 6, 2021 · I want to add a button that resets the game when the snake collides or hits the wall. I don't want to rely on the refresh button on browsers, I want to make a reset button …

  10. Snake Game with Mobile Button Controls - Stack Overflow

    In this Snake game, I need the buttons to control the snake just like the arrow keys do. This will allow the game to be played on a mobile device. You can see i have code in there for the …