Live or let DIE
Role: Gameplay Programmer
Team Size: 3
Time Frame: 3 Days
In Live or let die, you'll use your problem-solving skills to guide a die through various levels while avoiding enemy dice. To defeat these foes, you'll need to roll a higher number than the number they're displaying. As you progress through the game, you'll unlock doors and continue on your journey.
During the 2022 GMTK game jam, my two friends and I created a game based on the theme "Roll of the dice". We only had 72 hours to complete and publish the game on itch.io, but we're happy with the final result. It was our first time participating in a game jam, and we learned a lot from the experience.
Feel free to read more or download the game on itch.io
For this project, the three of us worked together to design the game and divided up responsibilities as we progressed. My main focus was on the movement and behavior of the player die, as well as the combat system and number-rolling mechanics. I also contributed to the design and implementation of level elements such as doors and objectives.
The dice moves by rolling one step in the direction specified by the player input. The rotation center is set to the lower edge of the dice in the input direction, allowing the movement to be scalable with not only cubes but also rectangles. A coroutine is used to rotate the dice 90 degrees around the rotation center using the RotateAround() function, effectively moving the dice one space in the chosen direction. As the dice rotates, the number facing upwards changes with each movement. The dice also has six raycasts, one on each side, which help determine which side is facing downwards and allow the number to be updated accordingly.
Since the number on each side of the dice is important in this game, we added the ability to rotate the camera around the dice so players can plan their moves in advance. This feature allows for better maneuvering of the dice to solve puzzles and combat.
When there is an enemy dice on the level, the player and enemies take turns moving one step. If the player gets next to an enemy dice, a raycast on the player detects the enemy and initiates the FightEnemy() function. Combat begins and the function compares the numbers on the dice. The dice with the greater number wins, while the other dice is knocked out of the level. If the dice have the same number, it is a draw and both dice are knocked back one step from each other. It is important for the player to keep track of their own dice number and the enemy's dice number in order to win the combat.
The level contains three types of puzzle blocks: Goal, Parting Door, and Swap. To activate a puzzle block, the player must land on it with the corresponding number facing upwards. The Goal Puzzle Block, when activated, advances the player to the next level. The Parting Door Puzzle Block moves blocks that are blocking other blocks when activated. The Swap Puzzle Block, when activated, swaps the positions of visible blocks on the level. When one block appears, another disappears.
Using the three types of puzzle blocks, the player must navigate through the levels while avoiding enemies. Activating certain puzzle blocks may cause more enemies to appear.
What I learned
This project was a great learning experience. I was fortunate to have my friends stay with me during the project, so we were able to work and brainstorm together constantly. It was helpful to have the ability to discuss our ideas and share our progress at all times. Unlike school projects which usually last between 2 and 7 weeks, this project had a shorter timeline, which was a new challenge. It was difficult to make sure we had a polished and playable game within the given time, but ultimately we achieved our goal for the game jam. There were times when it was stressful, especially when we had to figure out how to publish the game, but overall it was a rewarding experience. I'm looking forward to participating in the game jam again next year.