Happy to hear you are considering a purchase. Multi-tile units are planned for the update after the next. I hope to have the next update done by the end of the year. The next update with multi-tile units should be done some months after, though I cannot give an exact prediction on when it will be done.
The planned solution for multi-tile units is not to have a separate grid per se, but to instead use a Map of integers that holds the maximum unit size that can occupy a specific tile. Multi-tile units would use a slightly modified pathfinding that checks this map for each search step during pathfinding. The multi-tile unit map would be generated at the game startup.
The toolkit does work with grids of arbitrary size. If you change the default tile mesh to one of a different size, the grid will resize appropriately and everything should work fine.
I do agree that this part is not very elegantly scripted, though. In my WIP build I have changed it so that the grid can be resized using UE4’s built-in resizing widget, and there are no more magic numbers. The current live implementation works well and without issue, though, even if it is admittedly a bit hacky.
Thanks for the information. I bought it before the sale but i am happy to give you extra The product is extremely well made.
I have another question. Could the route finding potentially work when moving multiple units at a time and how much work do you think it would be to implement that?
Also, would you consider freelance work to extend the system in particular ways?
No problem, it’s still a lot cleaner and more well commented than a lot of other things on the marketplace. I’m thoroughly impressed.
By the way, when you move to maps rather than arrays to store grids, will you stick with individual indexes to differentiate tiles (i.e. in a grid 10 tiles wide the first row is 0,1,2,3, … 9, next row is 10,11,12,13, and so on) or move to an X,Y coords system (first row is [0,0],[1,0],[2,0] … [9,0], next row is [0,1],[1,1], and so on)?
I’ve started using the latter rather than the former as it helps a lot when doing maths later on.
EDIT: Also, a more important question: How can I designate a tile as ‘walkable’ when Collision Plane Walkable is disabled? I’ve tried setting tiles to block all, but the trace doesn’t seem to have any effect (every tile remains unwalkable).
EDIT EDIT: Worked it out myself, it was just an issue with having pregenerated game maps (you need to make sure the grid manager has a chance to re-construct).
Sorry you missed the sale, but I’m glad you think it’s worth it
If you had asked me about moving multiple units at a time a few months ago I would have said no, but with the next update I think this might be within reach. One of the things I’ve worked on is to make sure all math and grid manipulation is done first (server side), and then all the visual actions are played out (client side). With this disconnect between calculations and animation it will become a lot easier to order two units and then have them play out their animations simultaneously. It will still take some work, but it should become a lot easier.
As for freelance work, thanks for the offer. I have gotten a few such requests, but have rejected every one so far. Truth is I really want to get all my planned features for the toolkit first, and I have a hard enough time finding enough time for that as it is. I’m not opposed to doing freelance work, but my schedule is usually too packed, and what time I have left I like to spend on my own projects (mostly ATBTT ). Of course, if the scope of what I need to do is relatively small and the pay is good you can always e-mail me at knuteiliv@gmail.com. No guarantees, though, and certainly not before the next update is done
Thanks! Glad you like it.
I have actually already tried to switch to X,Y coordinate (or more specifically X,Y,Z). I was super hyped to get it working right after I switched to maps, but quickly discovered that it comes with a pretty big hit to performance. Pathfinding was slowed down by roughly 30% and even more in a packaged nativized project, so I decided it was not worth it. Too bad, though, as it is more intuitive to work with.
Happy to hear you managed to figure out your issue on your own. Pregenerating the map should generally only be done before packaging or if you want to check grid indexes and edges for debugging purposes.
Yep, I’m only just now realising this as well. Wasn’t that noticeable on my work PC, but I moved to my not-so-good laptop and performance slowed right down. I’m going to keep with maps for now, but I may have to move back to arrays eventually if I can’t work out how to optimize the pathfinding.
I didn’t actually think the performance hit would be large enough to be noticable. The pathfinding is pretty efficient, so I would think it would need to be quite a bit slower before you actually noticed anything.
Just wanted to say got the toolkit and it is a great starting point for my game. This is my first time using unreal engine and I appreciate all the youtube tutorials as well.
I am really looking forward to the multiplayer implementation as we are planning on a multiplayer game.
Thanks for the hard work!
Hello again, I want to setup a specific zoom and position for the camera when the game begins but I couldn’t find where you setup the camera. BP_Grid_Camera Blueprint is not setting up any location at event begin play nor the BP_Grid_Manager at Construction script. Thanks again.
That used to be in as a default feature, actually, and I’ll make sure to add it back in. Here are some quick steps to add it to the current version:
Make a copy of any of the decals used for markers, such as Decal_CurrentMarkerHex. Lets call it M_ArrowDecal. Replace the texture sample with the arrow texture included in the toolkit.
Go To BP_GridManager and the DisplayPathAsInstancedMeshes function. At the right hand of the function, right before meshes are normally spawned, add a branch checking the bUseDecals boolean. If it is true, spawn a decal instead, and add it to a new array of decals that we make, like so (note the values in the Spawn Decal at Location node):
Then, add this function at the very start of the DisplayPathAsInstancedMeshes function and in ATBTT_PlayerController in the RemoveDisplayedPath event, ignore the bDisplayPathAsSpline branch and always run the DestroyAndClearSplinePath function instead. Like so:
That should do the trick. I’ll add this back in more elegantly in the update after the next.
Happy to hear that Make sure to learn about UE4 multiplayer implementation from Epic’s tutorials beforehand. Even though everything will be replicated in the next update, when you’re adding your own features you’ll need to know how.
Go to ATBTT_GameMode and replace the value at SetActorLocationAndRotation of BP_GridCamera_Ref to whatever you want:
Thanks. It’s working now. I need to add multi-tile big units. 1x2, 2x1, 1x3, 2x2; I know it’s planned for 1.9 but I don’t think I can wait for the next version. Are there any recommendations you can make? Besides this, I need to add “drag and drop” to units before the battle begins. Any recommendations for this as well? Thanks.
As for drag and drop, I cannot give to much input on dragging and dropping in itself, but however you choose to solve it you should look at the Spawn Unit event in BP_GridManager to see how to add new units to the grid. The only important thing is to add them to the appropriate arrays, and if you have any active pathfinding running you need to re-run it for the new units to be picked up.
Hello, I am a beginner but have some idea of the concepts in UE4. I have add tried changing a few animations around on the pawns with the Map_Grid_Example and all has been easy to comprehend. I then wanted to move onto the Jungle Raid Map and implement the ‘melee’ as another skill, so i duplicated the laser shot skill and limited the range to 1. I removed the set and laser and weapon nodes but left the ‘Deactivate Skill’, ‘Deal Damage’, ‘Visualise Preparation’, ‘Check if Attack hits’ section. Now in the ‘Fire Laser Beam’ section, the AttackAnimation was replaced with the Attack_Melee animation. Everything runs up to the point were the animation plays and keeps on looping, even though movement animations. I have checked the Animation State Machine and also the endnotify is in the Attack_Melee animation. I’ve looked in the Unit_Skill at the Move Timeline to apply the DoOnce node, but it still doesn’t seem to resolve this small issue that i have. Is there something i have left out?
Thanks for the link, Selentic. The article is a great read.
Well, it is the newest version availible on the at the moment, which is a pretty compelling reason I’m not sure if I fully understand your question, though.
No worries!
I’m unsure if I have posted this before, but I should probably link you guys to some of the articles that helped me a lot when I first started making ATBTT. Amit Patel’s articles on pathfinding, grid math and procedural generations are fantastic, and the entire website is a treasure trove of stuff that should be of interest to most game developers, and developers of grid based games in particular: Amit’s A* Pages
I am really liking this toolkit, but am at the same time slowly learning about UE4 and blueprints.I am unsure if i have the homing target node setup correctly. From the ‘target’ variable i tried to get the static mesh component object reference through the ‘Get Components by class’ but it seems that the projectile blueprint ‘particle_BP’ might not see it as a proper static mesh component object. The spawned projectile travels in the right direction but does not approach the homing target. I have included the modified skill_laser blueprint picture. Has anyone got a working spawned homing projectile system working?
My closest solution has been to implement the ‘move component to’ node and seems to be visually similar to homing projectile.