top of page
Search
  • danielgrinchenko

Midterm Game

For my midterm project I decided to code a 1v1 hockey game. I first had the idea to make a simple story mode game where the player picks his story and each choice he makes decides other choices in the future. But I decided that it would be easier and more fun to make a hockey game. I first started with the player controls. I made two classes, one for each player, and set the variables in the constructors. I wanted the players to move using the arrow keys and the 'wasd' keys so I did that in the move functions. I also created display functions and made the player objects to see if my code worked correctly, and it did. I then drew the hockey rink and the goals and made it so the players could not leave the rink. I then proceeded to add a puck class. I added move and display functions to make the puck work. I added bounds so the puck couldn't leave the rink and I made it so the puck bounced off the walls and goals. My first struggle occurred when I had to make the puck interact with the players. It took some time, and some help, but I managed to make it so the puck bounces of the players, goals and walls. Now the big thing that was left was to make the puck enter a goal and have it register as a goal. This was pretty simple. I made it so that every time a player scored a goal it would bring up a new screen, a new gameState, to a winning screen. If the 'r' key was pressed then the game would reset and restart. Lastly, I added accents to make it resemble an actual hockey rink and added my favorite teams logo to the center of the rink.


5 views0 comments

Recent Posts

See All

Final Project Part 2

For my final project I took inspiration from one of the projects I worked on earlier in the semester. It was a failed attempt at a maze game. I decided to remake the game into a fully functional maze

Final Project

For my final I wanted to work on my midterm hockey game. I added some decorations to the hockey rink to make it look more like an actual hockey rink. I also added a the Rangers goal horn every time th

Assignment 8: Circuits

All my circuit does is light up LED lights with the press of a button. The catch is that is spells out the word "Hi" with a smiley face on it. It looks a bit messy but I did what I could with my knowl

Post: Blog2_Post
bottom of page