-
-
The beginning of the game!
-
Controller of the Win32 API + initializes snake class.
-
Controller of the Win32 API + initializes snake class.
-
Controller of the Win32 API + initializes snake class.
-
Controller of the Win32 API + initializes snake class.
-
Controller of the Win32 API + initializes snake class.
-
Controller of the Win32 API + initializes snake class.
-
Controller of the Win32 API + initializes snake class.
-
Controller of the Win32 API + initializes snake class.
-
Controller of the Win32 API + initializes snake class.
-
Controller of the Win32 API + initializes snake class.
-
Controller of the Win32 API + initializes snake class.
-
Controller of the Win32 API + initializes snake class.
-
Base Class from which the window gets its basic functions from.
-
Base Class from which the window gets its basic functions from.
-
Base Class from which the window gets its basic functions from.
-
Base Class from which the window gets its basic functions from.
-
Snake class which creates apple, snake, and defines features of the snake.
-
Snake class which creates apple, snake, and defines features of the snake.
-
Snake class which creates apple, snake, and defines features of the snake.
-
Snake class which creates apple, snake, and defines features of the snake.
-
Snake class which creates apple, snake, and defines features of the snake.
-
Snake class which creates apple, snake, and defines features of the snake.
-
Snake class which creates apple, snake, and defines features of the snake.
-
Snake class which creates apple, snake, and defines features of the snake.
-
Snake class which creates apple, snake, and defines features of the snake.
-
Snake class which creates apple, snake, and defines features of the snake.
-
Snake class which creates apple, snake, and defines features of the snake.
Inspiration
I first decided that I wanted to learn the win32 API. As I began to learn it, I decided on the snake project because it targets one of my interests, game development, employs time-based features which I haven't learned before, and I also really loved playing snake on Cool Math.
What it does
Employs a window displaying a 25x25 snake game.
How we built it
I first defined the Snake class with basic features like what to do when your snake reaches an apple. Then I defined my window, a square drawing function that takes x+y values, and a message loop. The class and message loop interact with each other to make the snake program run.
Challenges we ran into
- Window wouldn't update after the first update.
- The snake went sideways after clicking the down arrow.
- Window displayed an error after the snake got an apple.
- Window didn't allow the snake to turn after getting an apple.
- Window displayed an error after the snake got 2 apples.
Accomplishments that we're proud of
- Making snake.
- Using win32
- Using a timer to make sure the window is updated every .15 seconds.
What we learned
- Win32 API
- The use of timers in C++ programs
What's next for Snake
- Make the snake stop moving after it dies.
- Scale the window to make the 25x25 grid a square.
- OPTIONAL: create a menu for the game that describes score, lives, etc.
- Stop visual bugs.
Built With
- c++
- win32
Log in or sign up for Devpost to join the conversation.