• Home
  • Unreal Engine
  • C++
  • Blog
  • About

Projects Blog

AI Social Deduction: Week 2

6/4/2021

0 Comments

 

Character Movement

Picture
In the past week, I was able to create waypoints and the beginnings of a crewmate. To do this, this, I hade to create the following classes:
  • AIDeductionGameMode - Begins by getting all the waypoints on the map and keeping them in a list. Also has a public function to provide a random waypoint from its list to give to the CrewmateController for when the crewmate is meant to meander around the map.
  • Waypoints - placed around the map (at the moment, one in each room) to provide locations for the crewmates to go to. They are indicated in the picture above as the red arrows.
  • CrewMateBase - The base (character) class for crewmates that can be Impostors and Innocents. Holds the perception component and has a Blueprint class made from it to hold the crewmate's physical appearance.
  • CrewMateController - AIController which is used to to hold and operate the crewmate's behavior tree.
Picture
The current behavior tree of the AI. I created and added the "PickRandomWaypoint" node to have the CrewMateController choose at random from the AIDeductionGameMode's list of waypoints for moving the crewmate to. It's quite small now, but I intend to add more soon to provide goal-based movement so that the crewmate can move to a desired task.
Picture
The classes created to begin working on the crewmate implementation and their movements.

Player Camera

I've decided the best way for the user to be able to spectate the simulation is to create a floating camera class. I intend to use this video as inspiration and converting it from Blueprints to C++ code. The user will be able to float around the map and keep an eye on all the crewmates as they roam the ship. I will also be adding a function where the player can click on an crewmate/press a button while looking directly at a crewmate. This function will then attach the player camera as shown in the YouTube video to the crewmate, and the information of what the crewmate knows and is doing will be displayed. 

Main Menu

Picture
I also created a very basic main menu on the first pass. The main goal of this early main menu iteration is to be able to reset the crewmates and the player camera back to their initial positions like they will do when a simulation ends. I have also set it up so that the crewmates do not begin performing their actions until the start button has been pressed.
​
To continue iterating on this menu, I will be working on:
  • Adding a debug button to have the main menu pop back up, replicating a game over. ​
  • Designing and drawing a more interesting main menu to the best of my abilities.

What's Next?

This week has been busy for me when it comes to other school projects, thus I fully intend to make more headway on this project over the weekend. I will be doing a "Week 2.1" update post on Sunday to show the progress I've made and then I will discuss Week 3 on that post. This weekend I intend to:
  • Get the Player Camera working with movement and attachment to a Crewmate. Displaying what the crewmate knows will come later.
  • Making waypoints hold data to indicate which room they are in so that crewmates can begin having goal oriented movement.
  • Get the debug button and better design for the main menu created and implemented.

Want to Download the Project?


​Click here:
Github Repository
0 Comments



Leave a Reply.

    Coleman Levy

    Welcome to my blog! 

    Archives

    August 2021
    July 2021
    June 2021
    May 2021

    Project

    All
    AI Social Deduction

    RSS Feed

  • Home
  • Unreal Engine
  • C++
  • Blog
  • About