Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Brilliant. Can't wait for multilevel grid. That is great news!

    Comment


      Hi, I was just wondering what the status was on the latest version:
      v1.5 (being processed by Epic)

      Do you have an idea when this new version would be available? I'm thinking of purchasing this pack, but would prefer to wait for the fresh update.

      Comment


        Does this kit have the ability to pathfind for pawns that are multiple squares/hexes in size? I have been working on a TBS game and wanted to use the navmesh to avoid a grid but it looks like that might not pan out so as an alternative I am looking for a grid with more granularity.

        Comment


          Hard to tell, I'm afraid. The Epic marketplace staff is usually swamped with work and I sometimes have to wait weeks for them to upload new files or reply to requests. Since it is currently the holidays this will probably cause it to take even longer. I will let everyone know in this thread when the new update is up. I'm sorry that I cannot be more specific, but this is outside my control.
          The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

          Comment


            Not a problem! I already went ahead and purchased it since I felt like creating some nice-looking tiles already. I'll simply port these over once your update is out.
            Just a quick suggestion I'm going to give that I've added that I felt was quite useful and easy to add, feel free to ignore this if it doesn't match what you're going for:
            - Random tile rotation: In the Tile_Parent blueprint, I've added a random stream. In the constructor script, this stream will then take in the index to generate the seed, thus making it unique per tile. This seed is then used to generate a number between 1 and 6, which then is converted to degrees. I then use this number to apply a random rotation to my tiles. This can be made optional by adding a simple boolean of course.

            Comment


              Ok great! Thanks for the suggestion. So you are adding a random rotation to all tiles in order to make the grid look "wobbly" and less uniform, am I right? I'm not sure I'd want to add it as a default feature as it would be only for aesthetic purposes, and I'm trying to keep the base toolkit simple and clean. I might use something like that in a future example map, though. Could you show me a screenshot of your results?
              The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

              Comment


                Yup that's it, it really is only for aesthetic purposes.
                Here is my simple example. I have a "grass plains" tile, which has a small rock that randomly is shown as "visible" (again, just to break up the landscape a bit, visually). To further improve the aesthetics, you can see the tiles are rotated in multiples of 60 degrees. Because I'm too lazy to always do this manually, I added it to the constructor. I even went further actually, and made some utility scripts to auto-populate the grid with a base tile (as opposed to the static mesh). Just simple useful things, for lazy people like me
                I understand though that you want to keep it clean and tidy, and that is of course just fine :-)
                Click image for larger version

Name:	ExampleRandomRot.PNG
Views:	1
Size:	727.8 KB
ID:	1097838

                I'm having alot of fun with your toolset though
                Attached Files

                Comment


                  That is an awesome start, lodeman! Looks good! My default tiles would look identical no matter their yaw rotation so this is still not something I will be including by default. For spawning your tiles are you still using instanced static meshes? If you use actors or regular static meshes it can quickly have a large impact on performance for big grids.
                  The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                  Comment


                    I actually just went ahead and implemented a BP_HISM_Manager.
                    The constructor will go over all actors of type Tile_Parent, iterate through all child components, and assign the appropriate static meshes' transforms to the relevant HISM component.

                    Comment


                      Ok, that sounds similar to my implementation for turning tile actors into ISMs and should work well. I toyed around with HISMs when they were added to UE4, but it didn't seem to improve performance above regular ISMs. I'll probably also switch over in a future update, though.

                      I love that you've added squads of units by the way! It is something I plan to do for a simple 4X game example. Did you encounter any problems when adding this or was it quite straightforward?
                      The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                      Comment


                        With how edge costs work would having some units have different costs for different terrain be an issue? From the videos it seems like edge costs are 'global'.

                        Does this kit have the ability to pathfind for pawns that are multiple squares/hexes in size?

                        Comment


                          Originally posted by Monokkel View Post
                          Ok, that sounds similar to my implementation for turning tile actors into ISMs and should work well. I toyed around with HISMs when they were added to UE4, but it didn't seem to improve performance above regular ISMs. I'll probably also switch over in a future update, though.

                          I love that you've added squads of units by the way! It is something I plan to do for a simple 4X game example. Did you encounter any problems when adding this or was it quite straightforward?
                          I went the HISM route because my tree meshes have LODs, and I don't think normal ISMs supported those.
                          Implementing the multiple units was very easy actually. This was simply a matter of duplicating the skeletal mesh and moving them around in the viewport.
                          Additionally, the parts in the event graph that call the "move", "attack" and "death" animations were put into seperate functions, which take in a skeletal mesh component reference.
                          Finally, I just do a loop over the Anchor scene component's children, cast to any skeletal mesh component references, and call the new function.

                          Things I want to add to this though:
                          - have the units use the anim graph with a time delay, currently they are all exactly in-synch, which is of course a bit sloppy looking
                          - when the squad takes damage, have individual skeletal meshes already die off. Currently they all just die in sync when the health is fully depleted.

                          I've also done a bunch of other things too, I'd be happy to share more progress, but I don't want to thread-jack :-)

                          Comment


                            @CampingCarl: Both of those features are currently not implemented in the toolkit, though I am working on adding both. You are right in that edge costs are global, which means I will need to create some workarounds to get variable movement cost for various units implemented.

                            I have given this quite a bit of thought and think I have found a good solution which I intend to implement in the future. This toolkit originally begun as an experiment to create the fastest possible grid based pathfinding using blueprints, and while working on this I've found that very small additions to the core of the pathfinding functions can have a large impact on performance.

                            Because of this I do not intend to add new branches into the pathfinding that checks if the unit is of a certain type before then choosing between various edge costs etc. Instead I plan to add the option of each unit using a separate variant pathfinding function that can be customized within each unit. This way each unit can have a tailored pathfinding that is as complex as what is needed for that particular unit.

                            Units that take up multiple tiles is something I have experimented a bit with already. My solution is to create a new array that holds the maximum size a unit standing in that tile can be. I generate this array at Begin Play, where I check the number of free, walkable tiles that surround each tile. My new way of storing edges might complicate this a bit, but I am confident I can get it working, though it is not my first priority. If you want to attempt to implement it yourself I can point you in the right direction and help you out as best I can.

                            @Lodeman:
                            You might be right when it comes to LODs. I have not worried about that yet since all my example meshes are very low poly. That is a good reason for me to switch to HISMs soon, though.

                            Glad to hear implementing multiple units was easy. I suspected it wouldn't be too hard, but I feared there might be some complications I had not thought of. Glad that's not the case. Thanks for your thorough explanation of your implementation. The time delay and killing individual units seems pretty easy to do, and I'm sure you can figure it out yourself. I'll give it a whirl if you're stuck, though.

                            Feel free to post about any things you have added. I love to hear what people use the toolkit for, and it inspires me to add features of my own
                            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                            Comment


                              My idea for variable movement costs was to replace edge costs with enums of data about the tile and just switch depending on the moving pawn. I have no idea how that will impact performance but your method of separate functions might help with that too.

                              For multiple tile units does that array save much time even if you need to check the same tiles for something else? For example if a 3x3 tile wide unit moves forward even if your array says the next space is walkable for a pawn that size you still need to check the 3 tiles it is moving into for rough terrain, height, ect. or have an array for attribute that affects movement.

                              Comment


                                To what degree enums will slow down pathfinding that is an empirical question, and the decrease in efficiency will probably be small enough that you will not notice it in your game. However for my toolkit I'm trying to make my solutions both as efficient and flexible as possible to accomodate for as many types of games as possible. If your game does not use units with extremely levels of move/turn it is unlikely to be a problem for you to implement it this way.

                                Just so I'm sure you understand what I mean when I talk about multiple tile units I've thrown together a quick demonstration in Excel:
                                Click image for larger version

Name:	vJhYY2V.png
Views:	1
Size:	20.1 KB
ID:	1097973

                                The green squares represent a large unit occupying a 4*4 space. When the unit moves it only checks the top left index it is occupying (the red square) against the pregenerated array for large units (represented by the numbers). So if the unit tries to move straight right it checks the index to the right of the red square. If the number in the array is equal to or smaller than the size of the unit it allows movement to this tile. Height should work similarly to this, but difficult terrain is more difficult :P If I do not think of something more clever one could do a similar array for higher movement cost, though I think it would have to be either a separate array for each unit size category or a similar solution using a nested array.
                                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                                Comment

                                Working...
                                X