Ricky's Hungry Night

*

Ricky's Hungry Night *

About Ricky’s Hungry Night

Ricky’s Hungry Night is a mobile game made during a Casual game production class over the span of a semester.

Team Size: 7
Time frame: 9 Weeks
Engine: Unity
Language: C#

Format

My Roles & Tasks

Technical Designer

    • Procedural Level Creation

    • Dynamic Sound system

    • Created an searching enemy type that uses a vision cone.

    • Implemented a save system to store player's score over different game sessions

Procedural Systems


Prop Placement


Our team decided, to make the game re-playable we opted to use procedural generation of our levels instead of hand crafted ones. But this comes with many challenges such as how to make levels fair, and our game having 3 different scene types (Suburbs, City, Army Base), how are we going to handle the many different props? I decided to tackle this by using unity’s grid system. Where the placement script first checks how many objects it should attempt to spawn, which changes based of the difficulty the player chooses. Then it creates two new Grid Data tables to keep track of the props spawned and their location on the grid. Before any props are placed the game finds a place to spawn the trash can the player needs to reach, and the player themselves so they are always guaranteed to spawn in a safe area. After those two are spawned in the game runs a for loop for the amount of props it needs to spawn. Every time a prop is called to be placed the steps to actually spawn it go like this

Step 1: Get a number between 1-4 which correlates to a type of prop in a Scriptable Object Data. which includes a small prop, Medium prop, Large prop and Bush. Each having their own ID and amount of space said type of prop will take up.

Step 2: Tell a GetMapPosition Function to cast a raycast into the playable area to return the Vector3 where the prop will spawn in, and return that position to the main script. Where the main script checks the WorldToCell position of the Vector3 and Checks the validity of the spawn area.

Step 3: If found to be a valid spawn position a random object of the Object Data type is spawned in, and its Grid placement and surrounding grid tiles based of its size are marked as not valid for future prop spawning. If not found to be a valid spawn position it skips spawning that prop in. This keeps going until there are no more props to spawn in