The6

The6 started as part of the annual Game Makers Toolkit Game Jam.  This was my second year participating, with last years entry being No Engine, No Problem. This year's theme was "Roll of the Dice". I had just started a Dungeons and Dragon campaign with my teammate, so we went for aiming to emulate the feel of being a miniature on the battlefield as dice cascade from the sky, deciding your fate. After this game jam, we have continued to work on it, and aim to ship updates to itch.

During the Jam

Step 1: base functions


In the first few hours, while Brendan got the AI working, and the basic version of attacking, I worked on a few iterations of how to make the dice function. After making a quick model from the existing physics cubes in the starter project, and adding some numbers I worked on roll detection. The first idea was to use collisions boxes, but that was overruled since a die landing near a wall could detect multiple objects, besides trying to figure out object channels to distinguish between landing on the ground versus landing on something like another die, or the player was more trouble than it was worth for that period of time. 

I then stepped back and looked at how we actually interface with real dice, which is simply looking at the top face (whichever is highest) and then saying that is the roll. Since I already had text boxes on the faces, I just got their location and changed the anchor to be in the center, because otherwise, some slanted rolls could indicate the side was higher than the top. Then I wrote a quick function to iterate through the faces and output the highest one.  This number is then detected and utilized when the "bRolling" boolean is set to false by a diceRolling blueprint that Brendan made. 

Step 2: Completing the loop


Step 2 of the Jam was focused on completing the loop for our game. The first step was making our dice save their starting locations to be returned after rolling. Since we wanted out game to last longer than one roll, we made side rooms to store inactive enemies, and the dice. When the dice are rolled, the enemies are out of sight, and as soon as the die is considered "rolled" the die is teleported to its separate starting spot and the enemy trades places with it. Then once all enemies are dead, they're put back in their room, "resurrected" and wait for the dice to finish rolling. Each enemy is tied to 1 die and visa versa.

The next part of this step was getting a dash in. I just got bare functionality which just teleports the character foreward using a sweep to stop clipping through walls. The side effect was the player not being able to teleport up even the smallest of ledges but this was fast and the polished version was implemented in step 3.

Finally attacking was implemented. The first implementation used an arrow from the player character, but that made blinking based on the models facing direction. So I tied it to the camera, but this had the draw back of the camera being set directly behind the players head by default, meaning that the player cannot actually see what they are aiming at clearly. I chose to remove the Z component from the equation and have the attack fire perfectly level to counter this. The bit of math that was needed for this is shown in the screenshot above. 

Step 3: Making a better Dash


Steps 1 and 2 established the mechanics and associated loop of the game, so step 3 was focused on improving the dash. Previously it was simply "set world location to a location in front of the player by the distance of the dash range, but that could run into issues such as hitting low obstacles which would either stop the player if it was set to sweep, or the player would get moved into it, which ran into it's own issues. After doing the trace forward to see if there was a wall that would stop the player, if that does not detect anything, it does another trace straight down, and if it hits something it teleports the player there plus some height for the root of the player not being on the floor. Finally if the downward trace did not hit anything it teleports the player straight forward. When it hits a target that is lower than the player, it will teleport the player down a ways, but it only extends a little past the players foot level. This was just to make the controls feel a little tighter. 

The changes for this step were pretty simple but it took a while to figure out how exactly to handle the dash and there were a lot of iterations that were not documented trying to find the right solution. I think I also want to add a trace down even if the first trace hits a wall because I can imagine exceptions to the current logic that could cause issues, however, because of the geometry being made as it is for the game it's not a high priority and I would rather get more features in or fix up other features.

While there are not screenshots for these, in the end of this step I also added 3 charges to the dash, with a 2 second recharge time, and I added placeholder sounds to most of the games functions and simple fire explosion VFX to the attack. 

After the Jam

After the game Jam I continued working on this project for a couple more months in the free time that I had. I first worked on refining the dash to be directional to player input rather than the models facing direction, then I added a throwable ball that would bounce once before teleporting the player to the second object hit, allowing for more complex maneuvering of the map. 

These helped make the game more enjoyable to play and were a step in the right direction for making a more enjoyable kit, however I stopped progress on this game as the project lost it's appeal and started working on the Pit Crew project. 

This game was created in collaboration with Brendan Flanagan.