Announcement

Collapse
No announcement yet.

FPS Tower Defense Toolkit

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

    #46
    Originally posted by MiniDigger View Post
    Any news on when v4 will go live on the marketplace?
    Hey MiniDigger, nice to see you here. v4 just went live on the Marketplace. Both 4.9 and 4.10 versions contain all the new updates mentioned above.
    Unreal Possibilities
    Wave Spawning System | Tower Defense Starter Kit | Grid Creation Systems

    Comment


      #47
      Two questions.

      1) I want to make the grid sizes smaller. Having big blocks as in the default really limited tower placement, can the grid sizes be made smaller?Or towers require more or less grid space?
      2) I can't figure how how to configure the wave spawner - any chance you could make something that explains it? There was one or two variables I couldn't even find.

      Thanks very much for making this and providing it on the marketplace.

      Comment


        #48
        Originally posted by SlightlyLive View Post
        Two questions.

        1) I want to make the grid sizes smaller. Having big blocks as in the default really limited tower placement, can the grid sizes be made smaller?Or towers require more or less grid space?
        2) I can't figure how how to configure the wave spawner - any chance you could make something that explains it? There was one or two variables I couldn't even find.

        Thanks very much for making this and providing it on the marketplace.
        Hi SlightlyLive, yes you can make the grid sizes smaller. When you open up the toolkit, you may notice that there is an actor in the level named BP_GridManager. I've exposed the Grid Cell Size variable in that class so that users could change the grid size for all Grid generators from one place, instead of having to go to each Grid Generator. So the first step is to change this variable as per your requirements. For example, I'm going to change it from 400 to 200 units as shown below:

        Click image for larger version

Name:	gridcellsize.jpg
Views:	29
Size:	451.0 KB
ID:	1629558

        Upon changing the grid cell size, you may notice that there is no visible change to the grid generators in the editor. In order for that to happen, you will have to first recompile the BP_PlanarGridGenerator blueprint so that their construction script gets executed again with the new parameters. Now all grid cells have been recalculated based on the new grid cell size you set earlier. However, the grid cell mesh does not know about this and creates this clumped up effect seen here:

        Click image for larger version

Name:	gridclump.jpg
Views:	30
Size:	454.9 KB
ID:	1629559

        So that leads us to the next step, which involves updating the build scale of the grid cell mesh. Open up the SM_GridCell mesh, go to Build Settings, and then set its Build Scale parameter to be slightly less than your (Grid Cell Size)/100. We're doing this because the default mesh is a square plane with a side length of 100 units. Also having a smaller size than the grid cell ensures that there is no overlap (in display only) between adjacent meshes.

        Click image for larger version

Name:	gridmeshscale.jpg
Views:	29
Size:	385.9 KB
ID:	1629560

        Now that should take care of the Grid Sizes. But your Towers would still retain the size relative to your old Grid Size as they are not dependent on the Grid Size. You would probably be using your own tower meshes, but for prototyping, you could repeat the last step and change the Build Scale for tower meshes as well.

        Click image for larger version  Name:	mesh.png Views:	1 Size:	657.6 KB ID:	1111419

        And that's all there is to it. You can try it out in the editor for yourself and prototype different grid cell sizes before creating the meshes for your game.

        Click image for larger version

Name:	gcfinalres.jpg
Views:	28
Size:	354.6 KB
ID:	1629561

        As for your second question, I'll make something that describes the process of creating and customizing your own waves. But if you have any doubts in particular about the wave system, I could help with that right away.
        Last edited by Stormrage256; 06-10-2019, 07:10 AM.
        Unreal Possibilities
        Wave Spawning System | Tower Defense Starter Kit | Grid Creation Systems

        Comment


          #49
          Originally posted by SlightlyLive View Post
          Two questions.

          1) I want to make the grid sizes smaller. Having big blocks as in the default really limited tower placement, can the grid sizes be made smaller?Or towers require more or less grid space?
          2) I can't figure how how to configure the wave spawner - any chance you could make something that explains it? There was one or two variables I couldn't even find.

          Thanks very much for making this and providing it on the marketplace.
          I've written a brief description of the wave spawning system in the toolkit. You can check it out here in an earlier post in this thread: https://forums.unrealengine.com/show...l=1#post349206

          My video creation skills are pretty bad, so I usually go ahead with doing a write up about the topics. But if the information mentioned above doesn't clear your questions, then please let me know. I could also create demo videos to showcase the process. Meanwhile, I hope that you will find this helpful. Let me know if you have any doubts or suggestions regarding the same.
          Last edited by Stormrage256; 02-06-2016, 11:37 PM.
          Unreal Possibilities
          Wave Spawning System | Tower Defense Starter Kit | Grid Creation Systems

          Comment


            #50
            Thank you all very much for the in-depth responses. I'll pour over what is here as soon as I can, and I really appreciate the help.

            Comment


              #51
              I have a few more questions. I'm really enjoying digging into this project. So,

              1) Is it possible to make enemies perceive towers as a threat? Ideally I'd like to have enemies ignore towers in terms of having navigation and when they approach the tower, instead of navigating around, they'd attack the tower until it's dead and continue onwards. I guess this question has multiple components - tower health, tower threat to enemies, towers excluded from navigation considerations.
              2) Is it possible to have towers placed without the requirement of the the tower base? I'd like to place towers directly on the map without them sitting on the base.
              3) Is it possible to have tower placement not snap to the grid?

              Like I said, I've spent hours with this so far and I'm really enjoying it. Thank you very much.
              Last edited by SlightlyLive; 12-22-2015, 08:38 AM.

              Comment


                #52
                Originally posted by SlightlyLive View Post
                I have a few more questions. I'm really enjoying digging into this project. So,

                1) Is it possible to make enemies perceive towers as a threat? Ideally I'd like to have enemies ignore towers in terms of having navigation and when they approach the tower, instead of navigating around, they'd attack the tower until it's dead and continue onwards. I guess this question has multiple components - tower health, tower threat to enemies, towers excluded from navigation considerations.
                2) Is it possible to have towers placed without the requirement of the the tower base? I'd like to place towers directly on the map without them sitting on the base.
                3) Is it possible to have tower placement not snap to the grid?

                Like I said, I've spent hours with this so far and I'm really enjoying it. Thank you very much.
                Hey SlightlyLive, glad to hear that you're enjoying working on the toolkit. I'll need some time to think over what's the best way to implement the 1st & 3rd questions. So before that I'll just start ahead with the 2nd one.

                2. The toolkit doesn't have that functionality by default. I had thought about adding that as a functionality, but then realized that it would make the tower spawn handler really bloated. However that being said, there is a relatively easy way to implement what you're asking. As you might have already noticed, there is a 'BP_TrapActual' class to add traps, which are directly added on the floor. You could use the trap spawning functionality ['SpawnTrapHolographic' & 'SpawnTrapActual' functions in the Tower Spawn Handler class] to place Attack Towers instead of Traps.

                The fastest way to make a working prototype using this method is to set the 'BP_TowerHoloClassRef' & 'BP_TowerActualClassRef' to some Attack tower class when you input '6' to select traps. You can do it as shown below from the 'BP_FPSTDCharacter' blueprint.

                Click image for larger version

Name:	settower.png
Views:	1
Size:	469.5 KB
ID:	1097413

                For example, I set both the Tower Holo & Tower Actual classes to 'BP_LaserTowerHolo' & 'BP_LaserTowerActual' respectively, when I select the Trap. So instead of placing traps, it places Laser Towers on the floor.

                Click image for larger version

Name:	toweronfloor.png
Views:	1
Size:	797.0 KB
ID:	1097414

                That should take care of the Tower spawning system. Next, in order to set the Tower cost right, set the Tower cost to Laser Tower Cost & Tower Type to Laser Tower, in the first screenshot, just prior to setting the holo and actual class variables. Now, all that should be left is to take care of destroying the tower. So inside the 'DestroyActualTower' function in Tower Spawn Handler class, where it handles the Attack Tower blueprints, change the 'Cast to BP_TowerBaseActual' to 'BP_AttackTowerActualParent', and that should do the trick. You can replicate the same process for all other Towers as well, by redirecting all the 'SwitchOnTowerType' to the Spawn Trap logic.

                Click image for larger version

Name:	destroy.png
Views:	1
Size:	238.9 KB
ID:	1097415
                Unreal Possibilities
                Wave Spawning System | Tower Defense Starter Kit | Grid Creation Systems

                Comment


                  #53
                  Originally posted by SlightlyLive View Post
                  I have a few more questions. I'm really enjoying digging into this project. So,

                  1) Is it possible to make enemies perceive towers as a threat? Ideally I'd like to have enemies ignore towers in terms of having navigation and when they approach the tower, instead of navigating around, they'd attack the tower until it's dead and continue onwards. I guess this question has multiple components - tower health, tower threat to enemies, towers excluded from navigation considerations.
                  2) Is it possible to have towers placed without the requirement of the the tower base? I'd like to place towers directly on the map without them sitting on the base.
                  3) Is it possible to have tower placement not snap to the grid?

                  Like I said, I've spent hours with this so far and I'm really enjoying it. Thank you very much.
                  Regarding your third question, it might be possible to do what you're asking with Collision overlaps. The reason why I'm using grid is to avoid doing that check and instead rely on stored data to determine whether a tower already occupies the place where you're trying to spawn a new tower. If you want to do it without grid, you could change the collision response Holo Tower meshes to have them overlap with Attack towers and other solid objects in the level.

                  Now, when you look around the level, the Holo tower will begin and end overlap with objects that are on it's way. Using this knowledge, you can allow the user to spawn a new tower if the holo tower is not overlapping with anything. On the other hand, if it's overlapping with something, you do not allow the player to spawn a new tower.
                  Unreal Possibilities
                  Wave Spawning System | Tower Defense Starter Kit | Grid Creation Systems

                  Comment


                    #54
                    Originally posted by SlightlyLive View Post
                    I have a few more questions. I'm really enjoying digging into this project. So,

                    1) Is it possible to make enemies perceive towers as a threat? Ideally I'd like to have enemies ignore towers in terms of having navigation and when they approach the tower, instead of navigating around, they'd attack the tower until it's dead and continue onwards. I guess this question has multiple components - tower health, tower threat to enemies, towers excluded from navigation considerations.
                    2) Is it possible to have towers placed without the requirement of the the tower base? I'd like to place towers directly on the map without them sitting on the base.
                    3) Is it possible to have tower placement not snap to the grid?

                    Like I said, I've spent hours with this so far and I'm really enjoying it. Thank you very much.
                    Alright, now on to your first question. First of all, you would have to add a Health attribute in the Tower Actual parent class. Then add an 'EventAnyDamage' to register damage and thus ultimately destroy tower if it's health goes down to zero. You probably wouldn't have to do make any changes to navigation as such, but the AI threat detection and response behavior would have to be altered. I have a couple of ideas on how to implement that:

                    1. You could use the existing threat detection system, built around the 'VisionCheck' function in the ranged & melee AI Bots. By default this function keeps checking if the player is within it's range using a mix of distance, angular & line trace based checks. If you want to add towers to the list of potential targets, then at level start, get all towers in the level and add it into an array that can be accessed by your AI Bots at runtime. Keep updating this array everytime the player adds a new tower or when an existing tower is destroyed. Now that we have the towers, you could loop through the array and do vision checks to all these towers along with the one you do to detect the player. As soon as a bot detects a tower or player, stop it's movement and vision check, and have it start attacking the target. As soon as the target is destroyed, it can continue on it's path.

                    2. You could use the AI Perception component built into the blueprints. Add the player character and all towers as AI Perception Stimuli Source. This will mean that the bots will use their AI perception to listen to the stimuli sources and detect them automatically when they're within the specified sight range. Once the bot detects something, use the same logic as mentioned above in the first point.

                    I hope that covers all your questions. Let me know if you have any doubts anywhere.
                    Unreal Possibilities
                    Wave Spawning System | Tower Defense Starter Kit | Grid Creation Systems

                    Comment


                      #55
                      Are there any known errors with the HUD? It isn't working for me (4.9.2), the health and enemy health bar are just emtpy grey boxes and the wave number and ammo counter and r to reload don't show up at all

                      Comment


                        #56
                        Originally posted by tamaster92 View Post
                        Are there any known errors with the HUD? It isn't working for me (4.9.2), the health and enemy health bar are just emtpy grey boxes and the wave number and ammo counter and r to reload don't show up at all
                        There is one known HUD issue in v4.9 which completely hides the Tower Build HUD, when you untick 'TimedWaveStarts?' from the Wave Handler. This can be fixed by making the missing connection in the Tower Build HUD as shown:

                        [Image moved to attachment view]

                        This fix will be included in the next update, which will be submitted within a week. But from what you've said, the bug you encountered might be different from this. Could you please try this out and let me know if it makes any difference?
                        Attached Files
                        Last edited by Stormrage256; 09-29-2016, 01:25 AM.
                        Unreal Possibilities
                        Wave Spawning System | Tower Defense Starter Kit | Grid Creation Systems

                        Comment


                          #57
                          Click image for larger version

Name:	56e150306c.jpg
Views:	1
Size:	87.6 KB
ID:	1097425

                          Click image for larger version

Name:	efdf9e0735.jpg
Views:	1
Size:	78.2 KB
ID:	1097426

                          See above - the HUD is cut out and not showing correctly at all, even after that fix

                          Comment


                            #58
                            Originally posted by tamaster92 View Post

                            See above - the HUD is cut out and not showing correctly at all, even after that fix
                            Alright, thanks for posting the images. May I know the screen resolution that you're using so that I can test it out. I think that the widget might be getting compressed so that only part of it becomes visible.
                            Last edited by Stormrage256; 09-29-2016, 01:22 AM.
                            Unreal Possibilities
                            Wave Spawning System | Tower Defense Starter Kit | Grid Creation Systems

                            Comment


                              #59
                              I am running my screen at 1080p, and UE4 is in windowed mode

                              Would you suggest trying to run the game fullscreen?

                              Comment


                                #60
                                Originally posted by tamaster92 View Post
                                I am running my screen at 1080p, and UE4 is in windowed mode

                                Would you suggest trying to run the game fullscreen?
                                You could either try out fullscreen in standalone. Or you could just check if the resolution used for 'Play in New Window' under the 'Play' section in Editor Preferences is something different from 16:9. Also in either case, could you verify if the Tower Bases/Tower points value are changing when you spawn towers in the level?
                                Unreal Possibilities
                                Wave Spawning System | Tower Defense Starter Kit | Grid Creation Systems

                                Comment

                                Working...
                                X