Navid Chowdhury Project 1 Snake Game
Started: August 26, 9pm
Finished: August 28, 1am
Video Tutorial Used: https://www.youtube.com/watch?v=bI6e6qjJ8JQ
10:09pm First problem I encountered was that I couldn’t figure out why the optional grid wasn’t showing up. All I got was a black screen. But eventually I realized on the video, the youtuber had a black background with light gray grid lines. On my end, I had a black background but black grid lines so I wouldn’t see it until I changed the background color to white.
10:30pm Second problem, a much bigger one. About 25min into the video, the snake is moving on it’s own across the screen. It isn’t a controlled movement, just the default one to see if the move method works and mine does not. An entire day later I realized that I used WASD for my buttons whereas on an earlier portion of the code I used “R” for right instead of “D.” Not my proudest moment.
August 27, 10:30pm Added the collision detection so that the game stops when the snake's head goes over the border. WASD buttons don’t work. Why would they As it turns out even though I used WASD in the code for some strange reason the arrow keys do the actions. The “VK_UP DOWN LEFT RIGHT” correspond to the arrow keys while WASD only refers to the variable names for the directions. Finished the game with no more hiccups along the way.
Working GIF