Announcement

Collapse
No announcement yet.

Top Down Stealth Toolkit

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    question,

    so the AI starts following me. If I run away they will stop chasing me and return to their place?

    Regards!

    Comment


    • #17
      Originally posted by owenprescott View Post
      This is great, one idea to enhance the AI would be to add a state so that once the player is detected, the enemy will look around and occasionally follow the same path/area of the player for a while, even if the player has escaped from view. I think this would make the AI more intelligent and less predictable, otherwise as with most games the AI basically has the memory of a gold fish :P. Another idea is once you've been spotted, the AI could then alert nearby AI. These are just some idea that I think would enhance the stealth aspects, but I'm pleased with the template and you will see how I get on using it in the UE4 G+ community.
      Hi Owen, glad to hear that you're pleased with the toolkit. I agree with what you mentioned about memory of AI bots in stealth games. I noticed that in every game that I played through to collect references while working on this toolkit. What almost all of them does is it to have the AI go towards the last seen position to check it out. The AI does that in the toolkit as well, but I was not really pleased with the implementation in the vanilla version of the toolkit. So I've added a couple of new bot states for the upcoming update [will be submitted this coming monday]: a suspicious state when the AI first detects a player, & an alarmed state when it either hears an alarm or when it loses direct line of sight to player. The alarmed state lets the AI sprint towards the last seen position instead of the currently implemented investigation mode, which abruptly slows down the AI speed to normal patrol level. Once the AI reaches the last seen location, it will just do a stationary search at that location. The problem with letting the AI follow the player instead of going towards the last seen location is that I haven't found a way to convey that to the player. At the moment, the vision arcs along with the strictly defined bot states provide accurate information about how far the AI can see, thus enabling the players to make decisions while understanding the rules. Unlike third person or first person stealth games where the player has a much better idea of whether the AI can see them, in top down games, I feel that we kind of need to let the player know about it. One possibility is to use a timer UI element to depict that the AI would follow the player until this timer finishes. I will definitely do some thinking about that while working on future updates, but if you have any other ideas, please do let me know.

      As for the AI alerts, yes that would definitely be a neat little addition to the toolkit. I will try to include it in the second update.
      Last edited by Stormrage256; 07-20-2016, 02:28 AM.
      Dev blog: Unreal Possibilities
      Youtube channel
      FPS Tower Defense Toolkit Support Thread: https://forums.unrealengine.com/show...efense-Toolkit
      Top Down Stealth Toolkit Support Thread: https://forums.unrealengine.com/show...tealth-Toolkit
      Tower Defense Starter Kit Support Thread: https://forums.unrealengine.com/show...Support-Thread

      Comment


      • #18
        Originally posted by Namesis View Post
        question,

        so the AI starts following me. If I run away they will stop chasing me and return to their place?

        Regards!
        Hi Namesis, well it depends on the current state of the AI. Here's how it's going to work once the v4.11 update goes live on the marketplace [assuming here that the AI bot doesn't get distracted by any alarm or footstep sounds]:

        The AI bot is chasing the player character [Threat Detected state] >> The player manages to get outside it's vision range >> The AI bot goes toward the last seen player position & does a stationary search, which is basically looking around towards right & left a certain number of times [Alarmed state] >> If it cannot see the player during this search, it will revert back to patrol state. Now based on the patrol movement type, it would do one of the following things:
        1. Random waypoint patrol: It will choose a random location within a specified radius & start patrol movement towards it.
        2. Fixed waypoint patrol: It will go to the next position that it was supposed to go before it went on chasing the player.
        3. Stationary patrol: It will go back to it's original guarding position & stay there.
        Dev blog: Unreal Possibilities
        Youtube channel
        FPS Tower Defense Toolkit Support Thread: https://forums.unrealengine.com/show...efense-Toolkit
        Top Down Stealth Toolkit Support Thread: https://forums.unrealengine.com/show...tealth-Toolkit
        Tower Defense Starter Kit Support Thread: https://forums.unrealengine.com/show...Support-Thread

        Comment


        • #19
          Update I (v1.1) [Compatible with Unreal Engine v4.11] project files are now available in the Marketplace. Since this update brings about a lot of changes, both in terms of new features as well as the improvements over the previous v1.0 implementation, the update has been released only for Unreal Engine v4.11. This ensures that anyone who wants to keep using the v1.0 implementation can still download the v4.10 project files from the Marketplace. Listed below is a brief overview of the code changes in the update:

          - Dynamic Vision Arcs & Laser Tracking system are now implemented through the use of custom components & interfaces. The component based design provides improved modularity & enables easy attachment to different classes.

          - Added Turret Bot AI. Uses the new Laser Tracking component to acquire & lock on to targets. [Preview Video: https://www.youtube.com/watch?v=9uOBp0Tnk34]

          - Gadget Selection menu at level start enable players to select custom loadouts. Gadgets populated as HUD elements dynamically based on information specified in the Gadget Data Array. [Preview Video: https://www.youtube.com/watch?v=1FJeg6V7iek]

          - The new Gadget Data Array controls the important parameters of all available gadgets from a central location.

          - The Camera Bot now triggers timed alarm loops instead of single alarm as long as player character is within vision range.

          - Replaced Camera Jammer with an EMP that can temporarily deactivate both camera & turret bots.

          - Laser Tracking component added to Ranged Patrol bot to improve over the existing targeting system.

          - Improved aesthetic feedback for peripheral range display. The peripheral range display changes color from white (default) to red based on peripheral alert level, replacing the text render that displayed peripheral threat counter.

          - The patrol bots can now distinguish between different types of noises & handle decision priorities accordingly. Alarm sounds receive higher priority compared to footstep & whistle sounds.

          - Added new suspicious & alarmed states for the patrol bots to create a more realistic design for state changes.

          - The new Vision Arc Optimizer actor provides performance boost by removing rendering calculations for arcs outside the screenspace.

          - Added dynamic operational cost levels enable AI to turn on/off expensive calculations like vision arc updates & threat detection logic on the move based on the requirements.

          - Setter functions implemented to enable variables changes to occur only from within their parent objects.

          - Improved code standardization & optimization implemented across all classes.


          All changes within the blueprints are marked with the boolean variable 'Version1.1' in order to easily identify the workflow changes introduced with this update. Comments are also written to describe the major changes. The new variables as well as functions added to existing blueprints are also marked in the event graph as shown below:

          Click image for larger version

Name:	v11.jpg
Views:	1
Size:	426.2 KB
ID:	1105518

          ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

          Changes in the Content Browser:

          - New default HUD class added: BP_PlayerHUD.

          - New default Game Instance class added: BP_TDSTGameInstance.

          - Removed BP_EnemyAI_Parent class.

          - Added new stationary enemy AI class: BP_StationaryAI_Turret.

          - BT_PatrolEnemyAI, & BTT_SearchCurrentLocation renamed to 'BT_PatrolAI', BTT_SetNewPatrolLocation & BTT_InspectCurrentLocation respectively.

          - Removed BT Tasks BTT_AimAtPlayer & BTT_ExecutePatrolMovement.

          - Added new BT Tasks BTT_KeepTargetInFocus, BTT_SetActiveThreat, BTT_SetNewPatrolLocation, BTT_SetNewTargetLocation & BTT_TakeAimAtTarget.

          - BP_StationaryEnemyAI_Camera & BP_StationaryEnemyAI_Parent renamed to BP_StationaryAI_Camera & BP_StationaryAI_Parent respectively.

          - Added new custom components: BPC_AutomatedLaserTracker & BPC_VisionArcVertexManager.

          - Added new enums: EHUDState, ENoiseType & EOperationCostLevel.

          - Removed enum Enum_PlayerSkills.

          - Added new class BP_VisionArcOptimizer.

          - Added new widgets: Widget_GadgetSelectionButton, Widget_GadgetsGridPanel & Widget_LoadoutMenu.

          - 'BB_PatrolEnemyAI', 'BP_AIController_PatrolEnemyAI, 'BP_PatrolEnemyAI_Melee, BP_PatrolEnemyAI_Parent, & BP_PatrolEnemyAI_Ranged renamed to BB_PatrolAI, BP_AIController_PatrolAI, BP_PatrolAI_Melee, BP_PatrolAI_Parent, & BP_PatrolAI_Ranged respectively.

          - Enum_PatrolAIClass, Enum_PatrolAIState, Enum_PatrolType, Enum_PlayerGadgets, Enum_StationaryAIClass & Enum_StationaryAIState renamed to EPatrolAIClass, EPatrolAIState, EPatrolType, EGadgets, EStationaryAIClass & EStationaryAIState respectively.
          Last edited by Stormrage256; 04-28-2016, 10:52 AM.
          Dev blog: Unreal Possibilities
          Youtube channel
          FPS Tower Defense Toolkit Support Thread: https://forums.unrealengine.com/show...efense-Toolkit
          Top Down Stealth Toolkit Support Thread: https://forums.unrealengine.com/show...tealth-Toolkit
          Tower Defense Starter Kit Support Thread: https://forums.unrealengine.com/show...Support-Thread

          Comment


          • #20
            Hey,
            Great template and I'm hoping to migrate the Ai to my top down (point & click game). I want to place the PatrolAi into my map so that they wonder around, attacking the top down character units (& eventually buildings) in the game. If I place the patrolAi straight into the new game they don't move, so obviously I need to re-configure the BP's. Do you have any suggestions? Even placing the Patrol Ai into the default top down doesn't work out so I would like to pinpoint which BP's I can migrate>adapt to create the movement and default actions as per the demo.

            I have tried a bunch of tutorials and even looked into other Ai systems documentation but there doesn't seem to be any info on migrating characters beyond simply retargeting animations of characters. If I do get this working I will definitely make a tutorial because there should be more info for migrating(merging) marketplace content into a game with a mix BP assets.
            Last edited by owenprescott; 05-24-2016, 04:15 PM.
            Atoms4D - Indie VR Game atoms4d.com *site needs updating(soon)*
            XAXISvr - A Marketplace for VR Dev's: xaxisvr.com
            Owen Prescott - Official Concept Art & Design: owenprescott.com

            Comment


            • #21
              Originally posted by owenprescott View Post
              Hey,
              Great template and I'm hoping to migrate the Ai to my top down (point & click game). I want to place the PatrolAi into my map so that they wonder around, attacking the top down character units (& eventually buildings) in the game. If I place the patrolAi straight into the new game they don't move, so obviously I need to re-configure the BP's. Do you have any suggestions? Even placing the Patrol Ai into the default top down doesn't work out so I would like to pinpoint which BP's I can migrate>adapt to create the movement and default actions as per the demo.

              I have tried a bunch of tutorials and even looked into other Ai systems documentation but there doesn't seem to be any info on migrating characters beyond simply retargeting animations of characters. If I do get this working I will definitely make a tutorial because there should be more info for migrating(merging) marketplace content into a game with a mix BP assets.
              Hi Owen, thanks for your feedback. : ) I tried migrating the assets to the Top Down Template as well & as you said, the patrol bot does not move. This is because it's doing a couple of casts to the default toolkit game mode and player character [see attached screenshot] to hold references to these objects for later use without further casts.

              If you replace both those casts with your new Top Down Game Mode & Player Character, the bot will start doing it's patrol when you start the game. You won't have to do any sort or retargeting unless you're using a different skeletal mesh. All the changes that would need to be made will be centered around using replacements classes for the existing classes in the toolkit like Game Mode, Player Character, etc.

              Also make sure that you're migrating all files including the Behavior Trees & tasks in the 'PatrolEnemyAI' folder. You might notice that the Engine asks you whether you want to transfer a whole bunch of other classes & enums apart from the ones you selected. Some of them are actually necessary, while others are getting dragged along for the ride just because a class like Game Mode gets imported which in turn might have references to the said classes. Just press ok for now. Once you have them all in the new project, you can replace the classes with your own classes & delete the ones that are not required. You can check out the list below to get started in that direction:

              1. Among the migrated folders, Keep the 'Animations', 'Character', 'Material', 'Meshes' & 'Particles' folder as they are. There's no blueprint logic in any of those folders. Keep all the classes in the folder 'PatrolEnemyAI' as well. These are the ones that you actually require.
              2. If you want to use your own game mode & player character class, replace all references to the 'existing toolkit gamemode, player character & player controller classes' within all Patrol AI blueprints with the ones that you created for your new project. Delete all three classes once you've made the replacements.

              [The following classes are all unnecessary; They were migrated because of links from player controller, character or game mode classes]
              3. Remove all references to the enums 'EGadgets', 'EHUDState' & 'EStationaryAIState' & then delete these enums as well.
              4. Remove all references to the blueprints 'BP_StationaryAI_Parent', 'BP_PlayerHUD', 'BP_SaveGame', 'BP_TDSTGameInstance', 'Widget_GadgetSelectionButton', 'Widget_GadgetsGridPanel', 'Widget_GameOverHUD', 'Widget_LoadoutMenu', 'Widget_TopDownHUD', 'BP_ProximityShockMine', 'BP_AimPlane', 'BP_ExitPoint' & 'BP_Gems' & delete these classes.
              5. Remove all references to the struct 'Struct_GadgetData' & delete it.

              If you have more doubts about the migration process, let me know. And thanks for pointing this out. I've added this post to the FAQ section so that it can help others who might want to do the same. I'll try to make some structural changes to the toolkit in the v4.12 update so that the migration process becomes a smoother experience.
              Attached Files
              Last edited by Stormrage256; 10-12-2016, 02:26 AM.
              Dev blog: Unreal Possibilities
              Youtube channel
              FPS Tower Defense Toolkit Support Thread: https://forums.unrealengine.com/show...efense-Toolkit
              Top Down Stealth Toolkit Support Thread: https://forums.unrealengine.com/show...tealth-Toolkit
              Tower Defense Starter Kit Support Thread: https://forums.unrealengine.com/show...Support-Thread

              Comment


              • #22
                Hey, I love this kit. Got it today and have made some good progress learning it. I have my own player character and melee character working "mostly". They all walk, follow paths, react to camera and foot step sounds, but there are a couple things I can't figure out:

                1. The custom melee characters do not see the player in the view cone at all. The do sense the player in the small white circle around the enemy. I have made the cone small and large and have no change.
                2. Even when detected in the small white circle and touching the player, nothing happens. If I walk out of the small white circle they go back on patrol without damaging the player or ending the level.

                EDIT: I should have stated I created the customer character by creating a child of the BP_AI_Patrol_Parent class (Hope i spelled that right).
                EDIT2: I feel like an idiot. I was extending the wrong class. Sorry. Everything is working good now. I just have to figure out why one of my guys has a blue chest and the other doesn't but that's my issue I think.
                Thanks in advance,
                Last edited by raymondlee306; 05-27-2016, 12:13 AM.

                Comment


                • #23
                  Originally posted by raymondlee306 View Post
                  Hey, I love this kit. Got it today and have made some good progress learning it. I have my own player character and melee character working "mostly". They all walk, follow paths, react to camera and foot step sounds, but there are a couple things I can't figure out:

                  1. The custom melee characters do not see the player in the view cone at all. The do sense the player in the small white circle around the enemy. I have made the cone small and large and have no change.
                  2. Even when detected in the small white circle and touching the player, nothing happens. If I walk out of the small white circle they go back on patrol without damaging the player or ending the level.

                  EDIT: I should have stated I created the customer character by creating a child of the BP_AI_Patrol_Parent class (Hope i spelled that right).
                  EDIT2: I feel like an idiot. I was extending the wrong class. Sorry. Everything is working good now. I just have to figure out why one of my guys has a blue chest and the other doesn't but that's my issue I think.
                  Thanks in advance,
                  Hi Raymond, very glad to hear that you're having fun. I think I understand what's been causing the issue. If you take a look at the Patrol AI Parent class, you would see a component named 'VisionArcBounds'.

                  Click image for larger version

Name:	bounds.jpg
Views:	1
Size:	207.2 KB
ID:	1107063

                  It's basically a box collision component to identify obstacles in the close vicinity of the bot. Now normally we wouldn't require an overlap check to detect obstacles, since the AI already has the functionalities to search for player and identify if it's within range. But since we're using vision arcs in this scenario, which runs on really expensive calculations, I decided to use the VisionArcBounds box to turn on/off vision arc calculations on the move. This makes sure that unless an AI Bot has detected any obstacles within the box, it will not do any expensive calculations.

                  Now if you take a look at the Melee bot blueprint, you would find that the VisionArcBounds has been adjusted to be a bit larger than the vision arc range. For all units using the vision arc, I've made sure that the box component extends 20 units longer in all directions from the vision arc. So with the melee bot having a vision range of 300, the length of the box will be 300 + 20x2=340 units. Hence the box extent will be 340/2 = 170 units in the local x axis.

                  Click image for larger version

Name:	melee.jpg
Views:	1
Size:	195.8 KB
ID:	1107065

                  Right now, you would have to manually change the size of this VisionArcBounds box everytime you change the vision arc radius or angle. I'm working on the v1.2 update for the toolkit & it will include the feature to automatically adjust the box size based on the vision arc that you set. So you would only have to make a single change & the bot will take care of the rest.
                  Attached Files
                  Dev blog: Unreal Possibilities
                  Youtube channel
                  FPS Tower Defense Toolkit Support Thread: https://forums.unrealengine.com/show...efense-Toolkit
                  Top Down Stealth Toolkit Support Thread: https://forums.unrealengine.com/show...tealth-Toolkit
                  Tower Defense Starter Kit Support Thread: https://forums.unrealengine.com/show...Support-Thread

                  Comment


                  • #24
                    Thank you very much for the explanation. This will help when I start to create other types of entities as well. Like droids and ROV's.

                    This may not be related to your pack, but any chance you may know what is causing one out of three of my characters to have either a red or blue trans parent material? Almost like a team material index is in the blueprint but I can't find one anywhere. The other two blueprints I created children for, player and ranged character work with no problem at all. I have also tried a few other materials to see if that was the issue but no matter what it comes up either blue or red on the chest and see through.

                    Here is what the skeletal mesh looks like:
                    Click image for larger version

Name:	working.JPG
Views:	1
Size:	99.5 KB
ID:	1107233

                    And here is what the same character looks like in the blueprint:
                    Click image for larger version

Name:	blueprint.JPG
Views:	1
Size:	59.2 KB
ID:	1107235

                    Comment


                    • #25
                      Originally posted by raymondlee306 View Post
                      Thank you very much for the explanation. This will help when I start to create other types of entities as well. Like droids and ROV's.

                      This may not be related to your pack, but any chance you may know what is causing one out of three of my characters to have either a red or blue trans parent material? Almost like a team material index is in the blueprint but I can't find one anywhere. The other two blueprints I created children for, player and ranged character work with no problem at all. I have also tried a few other materials to see if that was the issue but no matter what it comes up either blue or red on the chest and see through.
                      I don't have access to my computer right now, but I believe that it's happening because the melee and ranged bot classes contain some logic to display blue and red colors at the center of their upper torso. It was made that way to distinguish between them. You can remove this logic from the construction scripts of the melee and ranged bot. It's just a couple of nodes that set the color using a material instance.
                      Last edited by Stormrage256; 10-12-2016, 02:27 AM.
                      Dev blog: Unreal Possibilities
                      Youtube channel
                      FPS Tower Defense Toolkit Support Thread: https://forums.unrealengine.com/show...efense-Toolkit
                      Top Down Stealth Toolkit Support Thread: https://forums.unrealengine.com/show...tealth-Toolkit
                      Tower Defense Starter Kit Support Thread: https://forums.unrealengine.com/show...Support-Thread

                      Comment


                      • #26
                        Perfect man! That did it. I'm off and running now!

                        Comment


                        • #27
                          Originally posted by raymondlee306 View Post
                          Perfect man! That did it. I'm off and running now!
                          Glad to hear that you got it working man.
                          Dev blog: Unreal Possibilities
                          Youtube channel
                          FPS Tower Defense Toolkit Support Thread: https://forums.unrealengine.com/show...efense-Toolkit
                          Top Down Stealth Toolkit Support Thread: https://forums.unrealengine.com/show...tealth-Toolkit
                          Tower Defense Starter Kit Support Thread: https://forums.unrealengine.com/show...Support-Thread

                          Comment


                          • #28
                            The v1.2 update has been submitted to the marketplace. This update will add support for v4.12 of the Unreal Engine, alongside introducing new features [for v4.11 & v4.12] like Laser Security Systems, Gadget Pickups & Mission Timers.
                            Dev blog: Unreal Possibilities
                            Youtube channel
                            FPS Tower Defense Toolkit Support Thread: https://forums.unrealengine.com/show...efense-Toolkit
                            Top Down Stealth Toolkit Support Thread: https://forums.unrealengine.com/show...tealth-Toolkit
                            Tower Defense Starter Kit Support Thread: https://forums.unrealengine.com/show...Support-Thread

                            Comment


                            • #29
                              Top Down Stealth Toolkit concepts sections are being updated to reflect the changes introduced in the v4.11 edition. Since this could potentially remove the information about the implementation in previous versions, I've moved those sections over to my blog so that users who continue to use v4.10 of the toolkit can still have access to those articles. Links to information about the previous implementation will also be provided at the end of these posts:

                              1. Top Down Stealth Toolkit Basics #2: Vision Arcs [Updated 4.11 implementation details] - https://forums.unrealengine.com/show...l=1#post459450

                              2. Top Down Stealth Toolkit Basics #3: Gadgets [Updated 4.11 implementation details] - https://forums.unrealengine.com/show...l=1#post459460
                              Last edited by Stormrage256; 07-01-2016, 01:50 AM.
                              Dev blog: Unreal Possibilities
                              Youtube channel
                              FPS Tower Defense Toolkit Support Thread: https://forums.unrealengine.com/show...efense-Toolkit
                              Top Down Stealth Toolkit Support Thread: https://forums.unrealengine.com/show...tealth-Toolkit
                              Tower Defense Starter Kit Support Thread: https://forums.unrealengine.com/show...Support-Thread

                              Comment


                              • #30
                                Top Down Stealth Toolkit Basics #4: Operational Cost Levels

                                All AI Bots in the Top Down Stealth Toolkit are equipped with the functionality to dynamically turn on/off certain parts of their core logic in order to increase performance. The Operational Cost Levels enum variable is used to keep track of this behavior & functions mainly based on two factors:

                                1. Obstacles/Potential targets in the near vicinity of the AI bot.
                                2. If the AI bot is on screen or off screen at any point of time.


                                Taking both the above factors into account, there are four Operational Cost Levels [even though there are minor differences between the impact of each of those levels on patrol & stationary bots]:

                                1. High - Threat detection logic & vision arc vertex update calculations are processed. In case of the patrol bots, both direct line of sight as well as peripheral threat detection are activated, while the stationary bots use only direct line of sight based calculations.

                                2. Medium - The direct line of sight based threat detection logic is deactivated, leaving only vision arc vertex updates to be processed. In case of the patrol bots, the peripheral threat detection will still remain active in this state.

                                3. Low - Direct line of sight based threat detection & vision arc vertex update calculations are deactivated. In case of the patrol bots, the peripheral threat detection will still remain active in this state.

                                4. Off - All forms of threat detection logic & vision arc vertex updates are deactivated. Vision Arcs are set to hidden in this state, since one of the prerequisites for this state is that the bot along with it's vision arc are located in an off screen location.
                                Last edited by Stormrage256; 07-01-2016, 05:31 AM.
                                Dev blog: Unreal Possibilities
                                Youtube channel
                                FPS Tower Defense Toolkit Support Thread: https://forums.unrealengine.com/show...efense-Toolkit
                                Top Down Stealth Toolkit Support Thread: https://forums.unrealengine.com/show...tealth-Toolkit
                                Tower Defense Starter Kit Support Thread: https://forums.unrealengine.com/show...Support-Thread

                                Comment

                                Working...
                                X