Skip to content

Commit

Permalink
Update ProjectDocument.md
Browse files Browse the repository at this point in the history
  • Loading branch information
coreymason authored Jun 11, 2019
1 parent 10258e1 commit 010b6e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ProjectDocument.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Enemy Artificial Intelligence:
For AI, I forwent complex state machines and instead simplified the system into two key states -- a peaceful state and a hostile state. I then add one script of each type onto an enemy prefab in addition to a vision component that handles triggering the transition into hostile state upon sighting a player. As for how AI actually moves, I integrated the A Star Pathfinding Project (another library widely used in industry like Zenject), and then modify the a prefab’s base AIPath settings as well as target destination from code. In doing so, I can achieve some pretty straight forward AI code as seen in [Wander](https://github.com/coreymason/ECS-189L-Game/blob/f31c7a9d0fa1c024be97b927c282390a062ea148/UnityProject/Assets/Scripts/Actors/AI/Wander.cs) and [RunAttack](https://github.com/coreymason/ECS-189L-Game/blob/f31c7a9d0fa1c024be97b927c282390a062ea148/UnityProject/Assets/Scripts/Actors/AI/RunAttack.cs).

Example in-game scene view (note the pathing in progress and field of view detection area)

![alt text](https://lh5.googleusercontent.com/jtC5Og5iJxkJd7Y47cM0ALIGKHYrdzujDO-t5tzb8YhS67ZS8FGLiPc_DcPUzVSbTkngJpmEoScdu6ueRFTy58rT8to0ca8Vvgb9P8GR)

Event System:
Utilizing Zenject Signals (events), I can send events from anywhere in the codebase and then trigger a respective function call. I use this to simultaneously hookup and decouple UI, camera, and other future systems that would otherwise be coupled to game logic. [Example](https://github.com/coreymason/ECS-189L-Game/blob/f31c7a9d0fa1c024be97b927c282390a062ea148/UnityProject/Assets/Scripts/Actors/Player.cs#L42)
Expand Down

0 comments on commit 010b6e9

Please sign in to comment.