#games #unity #c-sharp

A Sports Game That's Also A Horror Game

Published Mar 21, 2021 by Henry Werner

A completely normal bowling alley. :)

A completely normal bowling alley. :)


Developed as part of the October 2020 HackUTD Game Jam, bowling is a small game created by myself and four friends. The rules of the game jam involved creating a game in 7 days. Anything included in the game had to be originally created work or free-to-use assets, with the rule that non-original assets would need to be disclosed and credited.

Although there wasn’t a defined theme that submissions would need to adhere to, my group decided that it would more fun to restrict our game to broad “Halloween” theming – given that the jam submissions were due by Halloween day. With this, we quickly settled on a game pitch: a Wii Sports inspired bowling game inside of an atmospheric horror setting.

I contributed heavily to shaping the game’s overall theming and gameplay. I personally developed the systems responsible for scoring, bowling pin management, and core game loop.

Design

We were drawn to this particular pitch for numerous reasons. Our group was very cautious about maintaining a small scope for the project during the design process. We wanted to ensure that our minimum viable product would be obtainable before the final day, allowing additional time for adding polish and fixing bugs. With the horror-sports game idea, the nature of the two genres allowed us to avoid many of the team’s shortcomings, speeding up development.

Because popular sports have well-defined rulesets and player interactions, the game design process was significantly streamlined. The popularity of bowling in the real world meant that players would intuitively understand how to play the game. Additionally, this meant all group members shared a clear understanding of the game’s core mechanics, allowing for easier team communication throughout development.

Bowling particularly paired well with the horror game genre. Locking the player into fixed pre-determined camera perspectives worked exceptionally well to help build the player’s fear. Restricting additional degrees of control, such as removing the player’s ability to look around the scene freely, worked well to create a sense of dread by exploiting an inherent fear of the unknown.

We really leaned into this concept design-wise, as none of our team members were experienced with model creation or environment design. This allowed us to reduce the requirement for models and textures significantly, as any unnecessary parts of the environment could be obscured by darkness or kept out of the frame entirely – such as not needing to model anything behind the player.

bowling finale sequence

Bowling.'s finale sequence

Development

My contribution to the project included the design and programming of the game’s systems. This includes the systems for scoring logic and handling the player’s interactions with the environment. These systems were responsible for controlling game progression, despawning/respawning items in the environment, and triggering the finale sequence (pictured above).

I developed the scoring system to recreate the sport’s existing rules. The game is divided across ten “frames”, with the player being allowed a maximum of two rolls to knock down the set of pins. The primary challenge in writing the script came from accounting for how the current frame could add additional points to past frames if the player obtained a spare or strike.

/* Array definitions used for score management */

[SerializeField] int[, ] score = new int[11, 3]; //scores for each frame including bonus rolls
[SerializeField] int[] total = new int[11]; //total score for each frame. Used for dispay on HUD
[SerializeField] string[, ] displayScore = new string[11, 2]; //string representations of roll scores. Used for dispay on CRT
[SerializeField] ArrayList bonus = new ArrayList (); //Used to store the array indexes for bonus rolls

My solution involved storing each frame’s score inside of an 11x3 two-dimensional array. Each frame corresponds to one item in the array, with the third roll of frame ten being stored in the 11th item. The array is 11x3 instead of 11x2 to account for any bonus score that might be applied to that frame.

For example: Let’s say the player gets a spare in frame 3, knocking down six pins with the first ball and four pins with the second ball. The value of score[2,0] is set to 6 and score[2,1] is set to 4. Because they received a spare, the pinfall of the first roll in frame four is added to the score from frame 3. If the player then rolls a strike on their next roll, score[2,2] has 10 added to its current value.

CRT monitor used to display player score

A CRT monitor used to display the player's score



*****

© 2021, Henry Werner