Skip to content

WyvrnOfficial/Razer-AI_UnrealEngineSampleProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Razer QA Co-AI Unreal Demo

This is a demo to show how to use the [QA Co-AI Plugin] to integrate with Razer QA Co-AI. This project was made with Unreal Engine 5.5.4.

How to Use

  1. Make sure MSVC is installed. Preferred compiler version for Unreal Engine 5.5.4 is v14.38-17.8. Not tested on Clang.
  2. Make sure Razer Chroma is installed and running.
  3. Log in to Razer QA Co-AI
  4. Create Game project with game design document in "Content/GDD/Unreal.Shooter.GDD.pdf" and ensure the Game Title of the project is set to "RazerUnrealQADemo".
  5. Go to the settings page to download and install the Razer AI Service.
  6. Download and replace the service configuration file.
  7. Open QACoAIDemo.uproject.
  8. Press play.
  9. You should see json messages in the top-left corner of the screen.
  • If not, press ESC or CTRL+P to open the pause menu. On the bottom left, it should state "SDK Started: OK"
  • If not, please make sure to launch and update Razer Chroma and Razer Synapse.
  1. Go through the level. Bugs detailed in the Bugs section should be reported in the QA Co-AI web dashboard.

Razer QA Co-AI Integration

This is a list of blueprints used in the demo along with how the QA Co-AI Plugin was used.

BP_GameInstance

Init

  • StartGameSession is called on Init event. For Performance Metrics feature to work, the process name should be the same as the Title that is passed into StartGameSession. This involves editing the Target.cs file and setting the OutputFile variable.
  • SetPrintOutput is also called here, with both print options set to true. This will print to screen and logs everything that is output to Razer QA Co-AI.
  • SetApplicationTracking to track changes to window resolution and window focus (alt-tabbing)

Shutdown

  • EndGameSession is called on Shutdown event.

BP_ThirdPersonCharacter

BeginPlay

  • Every property to be tracked is registered using RegisterPropertiesToTrack. This is done by making an Array of QACoAIPropertyInfo and passing it into the function, with Category set to "Player". Player position is tracked every second by calling the TrackActorPosition function and setting the tickrate to 1000ms. Currently tracking:

    • isAiming
    • health
    • Ammo
    • MaxAmmo
    • LevelTimeRemaining
    • Position
  • Also logging "Level started" and "{Player} spawned" events.

  • AddInputTrackingComponent for input tracking

AnyDamage

  • Log out "{Player} received damage"

  • If HP <= 0, log out "{Player} out of health"

EnhancedInputAction IA_Fire

  • Log out "{Player} fired weapon" if firing was successful

  • Log out "{Player} hit {Name}" if player hit a NPC target. This is logged twice, one for aiming and one for hip fire.

UpdateLevelTimer

  • Logging "Out of Time" when LevelTimeRemaining property is <= 0.

BP_AI_002

BeginPlay

  • Log out "Enemy {Name} spawned in room {Room}"

  • Track health by calling RegisterPropertyToTrack

  • Track position by calling TrackActorPosition. Tickrate is set to 5000ms because enemy position info is not important to track accurately in this game.

  • Category is set to "Enemy"

AnyDamage

  • Log out "Enemy {Name} dead" when out of health.

Fire

  • Log out "{Name} hit {Target}" when the entity hits a target.

BP_RoomCheck

ComponentBeginOverlap

  • Log out "{Player} entered Room {Room}"

ComponentEndOverlap

  • Log out "{Player} left room {Room}"

BP_Healthpickup

BeginPlay

  • TrackActorPosition. Category is set to Items

ComponentBeginOverlap

  • Log out "{Player} picked up health"

BP_AmmoPickup

BeginPlay

  • TrackActorPosition. Category is set to Items

ComponentBeginOverlap

  • Log out "{Player} picked up ammo"

BP_Enggamepickup

BeginPlay

  • TrackActorPosition. Category is set to Items

ComponentBeginOverlap

  • Log out "{Player} picked up endgame"

BP_Killzone

ComponentBeginOverlap

  • Log out "Player killed by killzone"

Output in table form

Output Purpose Found in Blueprint
GameSessionStart Start of a gamesession. Should be sent first before any other event. This will reset certain cached game states. BP_GameInstance
InitProp, SetProp, ClearProp These, along with the 1P and 2P suffix versions, help to keep track of property values. Register properties to track using RegisterPropertyToTrack, RegisterPropertiesToTrack, TrackActorPosition, and TrackActorOrientation BP_ThirdPersonCharacter
BP_AI_002
BP_Healthpickup
BP_AmmoPickup
BP_Enggamepickup
LogEvt Logging specific game events. BP_ThirdPersonCharacter
BP_AI_002
BP_Healthpickup
BP_AmmoPickup
BP_Enggamepickup
BP_RoomCheck
BP_Killzone
GameSessionEnd End of the gamesession. BP_GameInstance

Bugs

  1. Health pickup is giving 25 health instead of 20
  2. Ammo pickup is giving 35 ammo instead of 30.
  3. Dead enemies can still be shot
  4. Last 3 enemies are dealing 6,7,8 damage instead of 5 damage

Packages Used

  1. Animation Starter Pack
  2. FPS Weapon Bundle
  3. Modular SciFi Season 1 Starter Bundle

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors