Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Happy to help! I had though about how to add this sort of thing before and this gave me an opportunity to test my ideas out in practice.
    Advanced Turn Based Tile Toolkit (Marketplace - Support)

    Dungeon Crawler Toolkit (Marketplace - Support)

    Discord

    Comment


      Originally posted by Monokkel View Post
      @masterneme: Hi there! That depends a bit what you mean. In the newest version of the toolkit I have included a 2D dungeon crawler example, though this is closer to a simple roguelike than something like D&D.

      What dungeon crawler style features are you most interested in? Having 4 monsters sharing the same space is not very hard, and can be done by adding four skeletal meshes to the same unit. Going the other way and having a single creature occupying four tiles is significantly more difficult, but certainly doable. I have experimented with this before and have found some solutions that work pretty well, but it becomes more difficult depending on how flexible you need it.

      Having a single category of big units that is only controlled by the AI and only function on single-level grids is fairly easy to add. Having units that can occupy an arbitrary number of tiles in any direction, which work with both multi-level grids hexagonal grids and whose tiles in move range are displayed in an aesthetically pleasing way when controlled by a player is much more difficult.
      I'm interested in something like Grimrock, there are some enemies attacking in groups:

      Click image for larger version

Name:	img30780.jpg
Views:	1
Size:	397.3 KB
ID:	1104208

      And another feature would be that enemies could turn 90ยบ or strafe to face the player on the same line and/or attack from the distance with magic or arrows.
      ProBoon, Old-School FPS, Open Source & Tutorials
      Support Project Boon on Patreon

      On Steam Soon, Click Below

      Comment


        Hey there.
        Thinking on the lines of multi-tile actors.
        I have a base mesh thats bigger then one tile, but I only want one tile to its interaction and the rest of the tiles it covers just to be spaces the player cant go to.
        Essentially with edge costs of 0.
        So im thinking of the best way I can set all other tiles within its shape apart from the one to have edge costs of 0.
        I could hard code it, as all four of my bases have the same silhouette but just wondering if you can think of a better way before I attempt it.
        If i had to hardcode it I would get the rotation of the tile to start with, and from there set the relevant tiles one by one to unwalkable with math for the grid size.
        Click image for larger version

Name:	Multi-TileBase.png
Views:	1
Size:	555.8 KB
ID:	1104219
        Thanks!

        Comment


          @masterneme: I have described one way of having a unit with multiple skeletal meshes here. This is a pretty basic implementation, but it should provide a good starting point. I have experimented with creating a Grimrock-style dungeon crawler with the toolkit before, and it works okay, but would require a lot of work to function well enough for a complete game. If I pursue this avenue again at a later point I will probably do so as a standalone marketplace assets as the differences are too big that it would make sense to build it on top of ATBTT's framework. A lot of ATBTT stuff would not be of interest to someone making a first person dungeon crawler and the other way around. I think it will be better for the user to have a marketplace asset focused on the sort of game they are actually creating.

          @LDodds: Are you using heightmaps from tracing? If you are you can have the area you do not want to be walkable to ignore PathTrace in the collision settings to prevent it from being walkable.
          Advanced Turn Based Tile Toolkit (Marketplace - Support)

          Dungeon Crawler Toolkit (Marketplace - Support)

          Discord

          Comment


            I see, thanks for your attention.
            ProBoon, Old-School FPS, Open Source & Tutorials
            Support Project Boon on Patreon

            On Steam Soon, Click Below

            Comment


              Hey they, got the collision things added (not sure what happened there) and did a test to follow your advice, however for some reason my unit can still walk on some parts of the mesh?
              Sending over grid settings and mesh collision to make sure im doing it right.
              Click image for larger version

Name:	Walkablew.png
Views:	1
Size:	733.8 KB
ID:	1104340
              Click image for larger version

Name:	MeshCollision.png
Views:	1
Size:	19.1 KB
ID:	1104341
              Click image for larger version

Name:	GridSettings.png
Views:	1
Size:	7.6 KB
ID:	1104342
              Attached Files

              Comment


                If the ground underneath the buildings has collision the traces will still hit it and mark the tile as walkable. I'm guessing that the units will walk inside the meshes and not on top of them when you click to move? You can avoid this by making the grid itself not block PathTrace and place collision volumes manually, but the easiest solution here is probably to place invisible wall tile actors along the edges of the camp.
                Advanced Turn Based Tile Toolkit (Marketplace - Support)

                Dungeon Crawler Toolkit (Marketplace - Support)

                Discord

                Comment


                  I have a question, which might be more of a general unreal question, but is also somewhat related to creating this grid setup.
                  I've been recreating your blueprints from the ATBTT-package in order to learn how it's working. I noticed that in my version, the grid_manager-blueprint will make the level take up size in proportion to the tiles used on the blueprint (when grid is placed on level). A grid with 2x2 is ~2mb and with 20x20 it's about 187mb (!) - while I noticed in your grid it pretty much stays the same even with far more tiles. So I guess my question is; what did you do in order to make the grid more efficient in terms of space? I've tried to use your grid with both meshes, instanced meshes and texture but it pretty much stays the same size.

                  I thought maybe it was the lightmap or meshes which took up space, but it appears not. I've been trying to find documentation that could explain what makes blueprints affect level size so much, but haven't been able to find anything. Is this anything you've noticed, and fixed, in your grid? or did I manage to create this issue all by myself?

                  Comment


                    Hi potoo, that is very puzzling. I have not encountered anything like that while working on the toolkit, though it is not something I have tested actively. Though I have little knowledge of how Unreal Engine stores whatever is contained in maps I do not feel it makes sense that you would see such a large increase (or an increase at all). What you are doing is essentially to create a bunch of instances of the same mesh and fill a number of large arrays. I guess you might see something like this if you have extremely large data arrays, but it would have to be way more than 20x20. Perhaps you have made some small error when adding values to the grid sized arrays and increased them to insane sizes? I would suggest trying to print the size of your arrays to see if that might be the culprit. Also, take a look in the content folder to make sure you're right about what takes up space.
                    Advanced Turn Based Tile Toolkit (Marketplace - Support)

                    Dungeon Crawler Toolkit (Marketplace - Support)

                    Discord

                    Comment


                      You were right about the arrays
                      Appears that edgecost and vector field array had 10000 (!) elements. I added a resize for both vector field array and edgecost array to make sure they were empty before adding/filling them, and now it's saving the level with normal size similar to yours.

                      The issue was that it kept adding/incrementing the arrays every time I changed the grid size in the editor, instead of resetting it for every change. So I ended up with a lot of blank elements that didn't occupy any tiles because it would continually add new elements in the construction script whenever it was changed (in editor/level). Couldn't find a resize in your blueprint, so I'm not yet sure how you solved this.

                      But now it works! Many thanks!
                      Last edited by GreasyExcretion; 04-13-2016, 11:16 AM.

                      Comment


                        Hi Monokkel,
                        How would I be able to add a win/lose state in the kit? I've created 2 Integers, casted them to each faction characters, and then made the characters add 1 to their teams integer when destroyed.
                        Once a factions integer reaches 4 (when all 4 characters die) then the win/lose state happens. The question I have is where do I put this? I've looked through all the blueprints but wherever I place it, it either breaks something or does nothing. I've used a sequence to run through the two integer checks, with "Then 0" making it continue through the blueprints. I tried to put this in a number of different places in between blueprint nodes such as "ChooseNextPawn" and "End Unit Turn". I've also added some print strings to make sure it does go through the sequence but it does not seem to. Please let me know if you need screenshots of what I've done so far.
                        Thanks!

                        Comment


                          Glad to hear my guess was correct. Couldn't think of any other possibility. Good luck replicating my blueprints! It's hopefully a great way to learn some of the ways to work with blueprints. Are your edge arrays public variables by any chance? That will cause new elements to be added each time the grid manager is compiled if you do not clear the array first.
                          Advanced Turn Based Tile Toolkit (Marketplace - Support)

                          Dungeon Crawler Toolkit (Marketplace - Support)

                          Discord

                          Comment


                            How hard would this be to port to C++?

                            Have you considered making this code open source? I would love to contribute to the base library because I too love this genre and have built similar toolkits for other engines but I'm starting with UE4 now. If its a financial thing would there be a money amount that could be donated to you to open the source?

                            Comment


                              I'm still familiarizing myself with UE4. How hard would this be to port to C++? I feel really uncomfortable programming visually.

                              Have you considered making this code open source? I would love to contribute to the base library because I too love this genre and think it would be great to help speed up development so others can make great games.

                              I have built similar toolkits for other engines but I'm starting with UE4 now so my options are to find existing projects to contribute to are start from scratch.

                              Comment


                                Hi,
                                How would I go about ending the game once a certain unit is destroyed?

                                Comment

                                Working...
                                X