Project 2

Project Goal

My goal for this project was to create an interesting and engaging AI behavior that would bring players moments of surprise, fun, and frustration. To achieve this, I wanted to create an AI that reacted to the world.

How To Play

Use WASD to move camera.

Scroll wheel to zoom in/out.

Use your Cursor and left click to select and place items, to pick up currency.

Method of Making AI Behavior

Elemental Harmony Gameplay
First method (Unused)

To create a realistic simulation, I started researching behavioral trees. As I learned more about how behavior trees function and are put together, I realized that due to time constraints, this would not be feasible.

Elemental Harmony Gameplay
Second Method (Used)

I pivoted to creating a finite state machine, as I am most experience with state machines, allowing me to produce a more viable product. In the transition to a state machine, the concept pivoted to a simulation with more NPC to NPC interactions, and less player influence.

The AI Behaviors

The AI behavior uses a Finite State Machine. To create personality within the behavior, how the AI interacts with the world varies depending on their type.

Elemental Harmony Gameplay
Idle State

NPC stays still, while checking what is near, while in this state has the chance to spawn in a structure related to them.

NPCs will default to idle state when unsure what to do.

Elemental Harmony Combat
Roam State

Chooses a random direction to move to, to keep things interesting.

Allows NPCs to explore their environment, and find intractable objects or other NPCs.

Elemental Harmony Player interactions
Sleep State

In this state NPCs, recover HP, and recover stamina at a faster rate.

Adds more realism to simulation, and more states for the NPC to choose from when deciding what to do next.

Elemental Harmony Gameplay
Pursue / Chase

When engaging another NPC, will choose to run away in a random direction, or run towards the aggressor depending on their stats.

Adds more believable behavior to the NPCs, and increases survival chance of weaker elementals.

Elemental Harmony Combat
Attack State

Damages a target NPC, gains happiness from winning a battle.

Allows a way to decrease the elemental population

Elemental Harmony Player interactions
Interacting State

Allows NPCs to dynamically interact with the environment, and placed structures.

Different NPCs interact differently with different objects

Elemental Stats

To create fun, surprising, and maybe even frustrating moments, I coded a system, where all objects interact with each other and NPCs.

Elemental Harmony Gameplay
Fire Type

When near a campfire a fire types will have its stat values increased for a short time.

Elemental Harmony Gameplay
Water Type

Water types are healed when near a pond.

Elemental Harmony Gameplay
Nature Type

Nature types are able to reproduce faster.

Environmental Interactions

To create fun, surprising, and maybe even frustrating moments, I coded a system, where all objects interact with each other and NPCs.

Elemental Harmony Gameplay
Camp Fire

Spawns embers that burn trees, but can be put out by water type elementals.

Elemental Harmony Combat
Pond

Increase growth rate of nearby trees but can be sucked dry by nature types.

Elemental Harmony Player interactions
Tree

Grows faster when near ponds, can be burned down, can be restored when burnt

Player Interactions

Elemental Harmony Player interactions
Spawning Objects

Players can spawn objects that will influence the development of the spirits. I coded a system that will translate 2D UI inputs into the 3D world.

Elemental Harmony Player interactions
Collecting Objects

Players earn currency when Elementals are well kept. I coded a system that will allow players to click on drops and pick them up, players can also focus in on elementals.

Learn About Me

Resume