Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Hi there,

    if you're using the current version on the marketplace the camera is spawned in ATBTT_GameMode at the end of the first part of the event graph (right extreme of the green comment box). The default pawn in ATBTT_GameMode is set to "none". This should cause the engine to select the camera pawn to possess as there should be no other options. This solution is a bit unusual, so I have changed it to a more conventional solution in the next update. Now I have BP_GridCamera set as the default pawn in ATBTT_GameMode and then manipulating it as follows:

    Click image for larger version

Name:	b8vm4Wd.png
Views:	1
Size:	207.3 KB
ID:	1103159

    This should be a more robust solution agains any changes users of the toolkit might make. I recommend using the solution depicted if you are still having issues.
    The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

    Comment


      Hey guys,

      Don't mean to interrupt. I really like seeing the activity going on in this page and projects being made with this toolkit. Keep up the good work!

      Comment


        Thanks! I certainly don't mind the interruption I enjoy keeping the conversation in this thread going. I've had some form of forum thread discussing turn based strategy going since the release of UE4 and I love being a part of all these awesome TBS developers' projects. TBS is my favorite game genre, so it is gratifying to know that more TBS games will probably end up being made with UE4 than what might have been the case if I had never made my toolkit. Thanks for stopping by the thread
        The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

        Comment


          Looks very impressive. I'm not sure if I'm allowed to hijack, so feel free to ignore. I'm trying to create my first very simple game (Android tower defense) and I'm having a hard time finding any help for for how to create a simple grid. Besides this very impressive grid kit, I can't find anything really.

          So anyway, I don't think I'd have any problems placing towers or writing a shortest path algorithm etc, I just don't know how to create the actual grid. Since you are clearly the foremost expert in this area from what I can tell, is there any chance you can give some recommendations to get a rookie started?

          Thank you and keep up the good work.

          Comment


            Hello fruxo,

            if you're intending to make a tower defense game I would highly recommend checking out Rohit Mohan's Tower Defense Starter Kit. Rohit is an excellent developer who provides great support and I believe he is using a grid system similar to my own for his asset. He is probably the guy to get in contact with for Tower Defense specific stuff.

            When it comes to creating a grid that can be more or less complex depending on what you intend to do. Creating a grid of static meshes is pretty straightforward. Run a loop equal to the vertical size of your grid times the horizontal size. For each loop index spawn a static mesh (preferrably an instanced static mesh or hierarchical instanced static mesh for performance reasons) at an X location equal to loopindex(mod)horizontal grid size * grid mesh X size and Y location equal to loopindex/horizontal grid size * grid mesh X size. I store these location in an array of vector for easy later lookup.

            I also have a number of arrays of identical size to this array that I use to store various data, such as the costs of moving between the various tiles for my custom pathfinding, the locations of pawns etc. Going the other direction (from location to index) requires some calculations that are more complex. I can go into more detail if you're interested, but I am not 100% sure what you want to achieve, and what I'm doing might be overkill for your purposes.
            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

            Comment


              Originally posted by Monokkel View Post
              Hello fruxo,

              if you're intending to make a tower defense game I would highly recommend checking out Rohit Mohan's Tower Defense Starter Kit. Rohit is an excellent developer who provides great support and I believe he is using a grid system similar to my own for his asset. He is probably the guy to get in contact with for Tower Defense specific stuff.

              When it comes to creating a grid that can be more or less complex depending on what you intend to do. Creating a grid of static meshes is pretty straightforward. Run a loop equal to the vertical size of your grid times the horizontal size. For each loop index spawn a static mesh (preferrably an instanced static mesh or hierarchical instanced static mesh for performance reasons) at an X location equal to loopindex(mod)horizontal grid size * grid mesh X size and Y location equal to loopindex/horizontal grid size * grid mesh X size. I store these location in an array of vector for easy later lookup.

              I also have a number of arrays of identical size to this array that I use to store various data, such as the costs of moving between the various tiles for my custom pathfinding, the locations of pawns etc. Going the other direction (from location to index) requires some calculations that are more complex. I can go into more detail if you're interested, but I am not 100% sure what you want to achieve, and what I'm doing might be overkill for your purposes.
              Thanks, I'll have a look at Rohit Mohans work.

              I'm just trying to create something extremely simple. My initial thoughts seems to be similar to what you suggested, ie I was thinking I'd have a grid bp which spawns and positions tile bps when constructed, based on what size and whatnot you set for the grid. So that's good to know that I'm not completely going down the wrong track. I'm not entirely sure what you mean by "instanced static mesh" or "hierarchical instanced static mesh", but I can google that. I suppose any mesh will do at this stage, and I assume there is a property I can use for making them visible/invisible in game when needed.

              Like I said, I'm not too worried about the actual logic and whatnot, it's more the UI stuff and UE4 specific features that has me a little confused on where to get started when creating the actual grid. But anyway, I think I got it covered for now.

              Thanks for taking the time.

              EDIT: started a quick test and I can get the tiles (currently just flattened cubes) to spawn in a grid easily. Not sure how to get the full grid to preview while designing though, or if that's even possible.

              EDIT: managed to find a guide (for a maze) which I think has all the information I need and more. Link just in case anyone is interested: http://fen-ue4.blogspot.com.au/2014/...-engine-4.html. Thanks.
              Last edited by fruxo; 03-26-2016, 05:19 AM.

              Comment


                Ok, great that you've got the basics working. If you want to spawn the grid while designing what you want to use is the blueprint's construction script. To use instanced static meshes you will need to add an instanced static mesh component to your blueprint, assign a mesh to it and then using "add instance" to spawn instances of this mesh. I have made a YouTube tutorial video that goes through every blueprint in my toolkit in detail. In theory you could recreate my entire toolkit by following this tutorial. Here is a link to the part in question: http://www.youtube.com/watch?v=cK1EFnmSyE4&t=4m27s

                Edit: Saw your second edit. That maze tutorial looks good, though it is of course a bit overkill for what you need. I would also recommend using hierarchical instanced meshes instead of static meshes for even better performance when not viewing all tiles at once. They are used the same way as instanced static meshes. Also, consider disabling "cast shadows" on your grid meshes as well as not having collision on each individual tile, which will further improve performance significantly.
                Last edited by Monokkel; 03-26-2016, 05:35 AM.
                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                Comment


                  Eagerly awaiting 4.11 and the 1.6 update!

                  Comment


                    So do I It represents nearly ten months of development since the last proper feature update (1.4 back in april last year) so a lot of stuff has been added and changed. I'll start making fresh videos as soon as it hits the marketplace.
                    The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                    Comment


                      4.11 is out!

                      Hype for update

                      Comment


                        This needs to happen asap. I've been holding off any more development for the update since it's so huge.

                        Comment


                          It should hopefully be live fairly soon. Epic have had my update for a while so it should be in their update queue. As mentioned earlier I can also send the update directly to anyone if they send me their order info (after I verify it with Epic).
                          The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                          Comment


                            Is it possible to use an action point system with your toolkit? For example:

                            Maximum: 10 AP
                            Movement: 1 AP per tile
                            Interaction with the environment (open door, push button, ...): 2 AP
                            Item use (potion, medkit, ...): 3 AP
                            Attack (cast spell, fire weapon, ...): 4 AP
                            Last edited by Wizard1200; 04-01-2016, 02:28 AM.

                            Comment


                              An action point system should not be too hard to implement. Simply subtract the cost from an Action Points variable on a unit each time an action is performed and only call End Unit Turn if Action Points reaches zero or the player chooses to end the turn early. Insert branches at relevant points in the ATBTT_PlayerController event graph to make sure the player cannot initiate actions he does not have enough action points to do.
                              The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                              Comment


                                The update is live! The update that was previously on the marketplace was 1.4 so this update contains all the stuff from both updates. Here is a reminder of waht has been added (all updates are listed in the second post of this thread):

                                v1.6
                                1. Support for multi-level grids. Multi-level grids are generated automatically from underlying meshes.
                                2. Added walls and platforms that turn semi-transparent when zoomed in or hovered over. Especially useful for multi-level grids. A simple example map is included demonstrating their use.
                                3. Support for multiple factions. An arbitrary number of factions can be added. Units can be setup individually to be allies or enemies of the various factions.
                                4. Any unit can be designated as AI or player controlled, regardless of faction. Allows for hot seat multiplayer among other things.
                                5. Added option for using custom pathfinding specified for each unit. Included examples such as units that can pass through friendly units, units that ignore difficult terrain and units that cannot move diagonally.
                                6. The path spline now uses a linear instead of a curved spline, which usually looks a lot better. Movement is still guided my a curved spline, as this makes for the most fluid movement.
                                7. The default grid mesh can now be set as a hierarchical instanced static mesh, further increasing performance on large maps compared to regular instances static meshes.
                                8. Various smaller changes including blueprint organization and commenting improvements.


                                v1.5
                                1. Changed the edge array to be a nested array of structs, with each struct representing a single edge. This change required major changes to all parts of the toolkit that utilize edges, but makes pathfinding even quicker and opens for grids with customized connections between tiles.
                                2. Added touch controls and an option for rotation 90 degrees at a time (currently default, but can be unchecked in BP_GridCamera)
                                3. AI has been improved significantly. AI now selects from all possible tiles to attack its target from, choosing depending on a personality enum. The AI will now move as close as possible to units it cannot reach if the path is blocked by a friendly unit.
                                4. Player units can be set to display all possible tiles that can be attacked from all tiles in move range, similar to Fire Emblem and many other TBS games.
                                5. Tiles in Sight Range and Move Range can be displayed as a frame.
                                6. Improved commenting and organization across the board. Variables and functions are now grouped in categories.
                                7. Included a variety of utility functions in BP_GridManager such as spawning units and tiles during gameplay among other things.
                                8. Split up the Event Graph of Unit_Parent into several sub-graphs for easier modification. Unit_Parent’s event tick now only fires when it is needed for movement, improving performance.
                                9. Added several “slow loops” which spread loops over multiple ticks. These can be used to improve performance when necessary. These are used by default when displaying all possible visible tiles for player units, since this is a demanding operation, and when an AI unit is activated.
                                10. Added an example game called Hydra’s Lair that demonstrates how the toolkit can be tweaked to create a 2D dungeon crawler. This includes many experimental features such as fog of war, weapons and armor.
                                11. The example game contains sprites from Dungeon Crawl Stone Soup, which are licenced under Creative Commons Zero and can be found here: http://opengameart.org/content/dunge...wl-32x32-tiles
                                12. The example game includes music made by Jon Lunde that can be freely used by anyone owning the toolkit. More of his music can be found at https://soundcloud.com/marengs
                                13. Many additional minor changes to blueprints.


                                I will soon begin working on new videos detailing all the new stuff you can do with this update
                                Last edited by Monokkel; 04-01-2016, 12:46 PM.
                                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                                Comment

                                Working...
                                X