Assignment 10: Behave!

Due Friday, November 15, before midnight

The goals for this assignment are:

  • Use a behavior tree API to implement NPC behaviors

  • Create at least two types of characters

1. Getting Started

It is not necessary to fetch from the upstream repository this week. Instead,

  • Create a new scene, called A10_Behavior, and save it to your HelloUnity/Assets/Scenes folder.

Scene and Player Setup

In both your scenes:

  • Initialize your scene with the prefab containing your level from assignment 7.

  • Add your character from assignment 4.

2. Assignment Goals

This assignment has one part. You will implement A* path planning and use it to implement a simple wander behavior for non-player characters. In our demo, we use the same character with different textures to distinguish between the player and other characters, but you can choose your own approach.

2.1. Behaviors

Write two scripts, Scripts/BehaviorMinion.cs and Scripts/BehaviorBoss.cs, that can be components for the root of a character. Both these scripts will use a behavior tree to control the character.

Behaviors to implement:

  • MoveTo <Target>

  • CanSee <Target>

  • PlayAnimation

  • TurnTowards <Target>

  • Wander

  • Attack

  • RunAway

3. What to hand in

  • Your scenes with your level and player in it

  • Your scripts, ``

  • Updated README

    • A video or GIF showing the motion controller, intersections with the world, and collection mechanic

    • Credits/links for any assets that you did not make yourself — if you add assets this week.

Don’t forget to commit your changes and then push them to Github. Using Git Bash, run the following command inside your HelloUnity directory.

$ cd HelloUnity
$ git add .
$ git commit -m "Finished HelloUnity"
$ git push

Run git status to check the result of the previous git command. Check the Github website to make sure that your program uploaded correctly.

Assignment rubrics

Grades are out of 4 points.

  • Your scripts need to be feature complete (3.5 points)

  • Readme (0.5 point)

Submission rubrics

For full credit, your submission must

  • In your README, include videos or gifs showing your working scripts

  • Some credit lost for missing features or bugs, depending on severity of error

  • -100% for failure to commit work to Github

  • -100% for failure to build and run on the lab Windows machines