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. Where you play as a Racoon trying to avoid being spotted while looking for the nearest trash can.

Format

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

My Roles & Tasks

Technical Designer

    • Procedural Level Creation

    • Dynamic Sound system

    • Basic Enemy Roaming with nav mesh

    • Enemy view cone and tracking

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

    • Player and prop tweening

    • Enemy Animations

    • VFX

    • SFX System

Procedural Systems

Level generation

To allow for a almost infinite amount of level layouts I decided to make a procedural generator of the levels, rather than make a couple of preset layouts to cycle through.

What makes each level different is the placements of each prop type, which is kept within a Unity Scriptable Object data base. Which in this case each object contains its Name, Item ID, Size in a vector 2 format, and the prefab for the type of prop.

.

Prop changing

Each type of prop contains a mesh changing script, which depending on the level type changes what mesh the object is. For example the small prop can either be, a lawn flamingo, a Mailbox, or a Sandbag. The same goes for the medium, large, and bush props. Having it done this way allows us to keep the scriptable object data base a lot smaller and cleaner.

.

Prop Placement

To handle the placement of the level props, and the necessary level elements such as the player, enemy, and trash can. I created a placement system that uses a unity grid.

To place any objects the script first gets a Vector3 from within the playable area, and spawns the Player character at that position. Then it finds the appropriate grid cell that lines up with the spawn location and its adjacent cells and marks them down as filled in a Dictionary, the amount of cells each prop takes up is decided by the size variable in the scriptable object database. For every other item spawned after it checks the potential spawn location with the cells within the dictionary to see if they are empty or filled. This then repeats for as many props the scene needs to spawn in.

The necessary level elements are always spawned in first to ensure they have amble room around them to be visible to the player, as their grid size are much larger to stop any props from being spawned too close to them.

The props that are spawned each get their y rotations randomized to avoid looking the same, the type of prop that is spawned is also randomized.

.

Level types

As mentioned during the prop changing section, we have 3 Level types which also count as difficulties: Suburbs, City and Military. Each level changes the amount of props that are spawned in, the mesh of the props that are spawned in, the level background, the enemies speed, and their outfit. This is all done by the same Mesh changing script used by the props just on a much larger scale.

.

Enemy AI

Navigation

We wanted the Enemy to be pretty simple as it would have to be able to navigate around randomly placed objects with ease. While in its roaming mode it picks a position within the world bounds and simply walks towards it, if they get close enough they choose another one.

This also works in conjunction with an vision cone the AI uses that if the player makes contact with the AI runs to the last seen location of the player, which keeps updating unless the player breaks line of sight by entering a bush or getting far enough away.

Enemy vision cone settings. Adjusted by difficulty.

Enemy AI during gameplay.

Visuals

Player and prop effects

To make our resident racoon feel more alive, I created a tweening script to simulate his breathing, I also made it apply to any bushes he is currently hiding in.

Each bush also plays a VFX to show when the player has entered them to show that the player is safely hidden inside.