This game was a low poly, retro styled game. Intended to replicate someone experiencing various dreams.

World Creation

The dream I contributed to was the gas station experience. The gas station is initially stocked with a bunch of rows of empty shelves, filled with object colliders that are missing their prefabs. A script I created scanned this area, stored it in a list, and for each collider, randomly chose a prefab for it.

As NPC’s came up to collect items off the shelves, they would be restocked after a set period of time. The items being removed from the shelves was actually just the visibility being turned off and back on when restocked. Each time they are restocked, there is a gradually increasing chance that instead of normal items, they will be filled with sleeping pill containers.

Every item’s collider can be read with a Raycast. If you hover over an item, it lights up blue and if you left click it, an items description will appear.

NPC Movement

The NPCs within the game were guided using various invisible objects. A script was attached to an invisible cube at the back of the store, acting as the spawning point. The spawned NPCs would randomly choose which side of the store they would walk towards and follow a set path. Once they got to the gas station doors, a function was used to scan the items in the store and randomly choose one to walk towards.

They would follow their scripted points until they get within a set distance along the x axis from their item. There, they would walk down the aisle, lean over, and pick it up. After which, they would follow the path back until they get to the register.

Once the player finishes checking them out, they follow their path back out of the gas station.

Previous
Previous

Online 3D BattleShip

Next
Next

Haunted House