Knives Out! is a Slapjack like game where the players compete with the computer to see who can get rid of their deck of cards first. The players use their mouse and left click to place their card in the middle and press spacebar to slap the card when the middle cards are knives.

I wanted to create a simple card game for this elaboration so did some research on card games and finally settled on Slapjack since it is a childhood favorite game with a simple mechanic of slapping the middle pile when the top card is the Jack card. Instead of using a standard deck of cards like the original Slapjack, I decided to modify the game by using assets I made for another class with the same mechanics to give it a new spin for both old and new Slapjack players. My new assets are inspired by the 5v5 tactical shooter Valorant by Riot Games in which I made cards based on the weapons: Phantom, Operator, and Jett’s knives. I decided to make the knives the “Jack” since it is one of the strongest and most accurate weapon in the game but difficult to master. 

Programming this game was harder than I thought since I had to set up many conditions for when players can slap, redeal, and take turns. With the slap, since I know the players are playing against the computer, there should be a reasonable timing for the players to react. I created two variables for the minimum and maximum time it should take the computer to decide and then during the slap phase the program will pick a number between those two values and a separate timer will count from 0 to the decided number. Once it reaches that number the computer will slap and if the player slaps before the computer did, the player will win. The redealing also had issues with only redealing the most recent card back to the player or computer. After looking through the code, I realized that it was the booleans of managing who slaps and whose turn it is that makes it only run once so I had to reorganize it and put it elsewhere. Lastly, another problem I experienced was that after the players have made their move, the computer wouldn’t move. It was game breaking since the game is supposed to switch between the player’s and the computer’s turn and it didn’t. After looking through the lines I realized that the computer didn’t play again even though it was in a phase where it could because it only dealt cards if my “hasDealt” boolean was false and I set it to true at the end of the first loop. I revised the code and set it back to false at the top of that state and it finally worked. Overall, I’m proud of my work because it took me a long time to debug all of the errors that broke the game in the first place and it was the first time I really used a “for loop”  and use switch statements more frequently in my game. Prior to this, I didn't understand how “for loops” worked but now I plan on using it when it can be more efficient. I did use a switch statement in my Wishes In The Sky project that I’m working on, but it was for certain situations and I didn’t realize I can replace many of my “if statements” with a more efficient “switch statement”. This was a challenging assignment but now I feel more confident with my programming and problem-solving skills when dealing with lists and more.

StatusReleased
PlatformsHTML5
Authorroccowu
Made withGameMaker

Leave a comment

Log in with itch.io to leave a comment.