Atrik Posted 13 hours ago Author Share Posted 13 hours ago @real_tabasco_sauce there is nothing that force elephants or boats to be "solids". Above you have videos of cavalry charging some civilians, you can see it's still doing some physics, but if you don't add "solids" to boats and elephants : 1. Their collision area is a circle at its center, so things that hit him and that he hit don't spin him as much as you'll expect have to hit him at center, front and back are ghost parts you can just go through are weaker (elastic) 2. Path-finding don't ignore idle units so they are considered as obstacles Link to comment Share on other sites More sharing options...
Thalatta Posted 13 hours ago Share Posted 13 hours ago 16 minutes ago, Atrik said: this thread is already about trying to get units that both try to not overlap Maybe it would be nice to have some custom scenario with all put in place to test everything (elephants going around tight spaces, them and cavalry charging infantry, ship collisions, etc), while knowing what the idea for each should be. Then we can compare different implementations in many particular situations. Link to comment Share on other sites More sharing options...
Adriano0ad Posted 12 hours ago Share Posted 12 hours ago It would be really cool to apply this technique to trees as well—having elephants walk past them, shaking or even knocking them down, or catapults toppling trees when they fire. That would add a great sense of realism. Link to comment Share on other sites More sharing options...
guerringuerrin Posted 2 hours ago Share Posted 2 hours ago (edited) 14 hours ago, Atrik said: Or maybe trying to reach a waypoint - a intermediate path goal, given by pathfinder -, but since a bunch of elephants are in the way, they wait trying to reach it. Yes, it could be what you say, and it might be related to a (bad) pathfinding issue. In this latest video of the stationary elephant, I think you can see a clear path that the elephant could take (orange arrow) instead of trying to join the path line that all the others are using. And since it never manages to get into position, it looks like it just stays still. 14 hours ago, Atrik said: However I'll disclaim once again that this new "solid" propriety was designed for rare units, to have a very visible superiority when they collide with normal smaller units. So a large herd of elephants that get this "solid", will always be less agile then other units : they are not made to be in large groups. I understand what you mean and, to some extent, I agree. So far, my intention with these testruns has been to force situations that may not be common in everyday gameplay but are still possible (such as a group of 24 elephants). I'll now start testing more "expected" situations, mixing elephants with infantry. We could also test MP in the next few days. I haven't tried to coordinate because I've been short on time, but we'll find an opportunity. Regarding the forces exerted by the elephant's hitbox, are they the same from the front and the sides, and while turning versus moving straight? For example, in this screenshot from the fourth video (at around 0:30), one elephant fails to reach its waypoint and ends up blocking a huge group behind it. You'd expect the combined force of all those elephants to overcome the resistance of one or two elephants blocking the way. I imagine accumulating forces is complex and could lead to less predictable results. That's why I was wondering whether the side edges of the hitbox could have lower force/resistance, allowing an elephant crossing the path of one coming from the front to be pushed aside. Maybe this is very complex to implement; I'm just throwing the idea out there. Maybe it's simply a matter of improving the pathfinding. Overall, my opinion of this PR is very positive, especially the new infantry and cavalry behavior. I think elephants (or units with the "solid" property) still need some tuning. Since these properties are optional, the PR can be merged as is, but I think fine-tuning them would be valuable to provide good baseline conditions, as we've already seen with infantry/cavalry. Edited 2 hours ago by guerringuerrin 1 Link to comment Share on other sites More sharing options...
Atrik Posted 2 hours ago Author Share Posted 2 hours ago @guerringuerrin I was about to post when I realized you posted . Nevermind I'll keep mine as I wrote it initially. And make some reply to yours after. ------------------------ 12 hours ago, real_tabasco_sauce said: I think much like for ships, we will have to allow an amount of overlaps for the sake of pathfinding. Otherwise, you might get results that look good on paper but that can end up quite frustrating in practice. Unless... Screencast from 2026-10-01 13-50-02(2).webm x20 speed, no orders but 2 step rally point. For nerds, what changed (main changes) : Contact slides, solids slide along each other in the direction they want to go. This fix solids getting stuck on chock-point. Solid are only sensible to soft push if they actually have room to be pushed to. This makes groups of solid expand outward and prevent wiggles because now they only push in one direction. Minimal cost, just coarse grid check. Note : Also this idea is a bit of the same than pressure for non-solids. Excepted pressure wouldn't work for solids because their shape is different, and the pushing is different too, so its barely more costly, but works very well for solids. Improved contact logic so also actually even less overlapping on choke-points. Ok but now, the question is... Will @guerringuerrin manage to get some elephants stuck this time? 1 Link to comment Share on other sites More sharing options...
Atrik Posted 2 hours ago Author Share Posted 2 hours ago 14 minutes ago, guerringuerrin said: Can't tell in from the picture, but it's also very possible that the elephant here was stuck at this angle due to the ones pushing on it's butt... But this should happen less often, and elephants should be able to unstuck themselves sooner now. You can also enable "UnitMotion" in dev overlay to display the path, this can help figuring if it's actually a pathfinder weirdness or a bug. 1 Link to comment Share on other sites More sharing options...
guerringuerrin Posted 2 hours ago Share Posted 2 hours ago 4 minutes ago, Atrik said: Ok but now, the question is... Will @guerringuerrin manage to get some elephants stuck this time? Haha! Will check this tonight 1 Link to comment Share on other sites More sharing options...
Atrik Posted 2 hours ago Author Share Posted 2 hours ago 18 minutes ago, guerringuerrin said: Regarding the forces exerted by the elephant's hitbox, are they the same from the front and the sides, and while turning versus moving straight? For example, in this screenshot from the fourth video (at around 0:30), one elephant fails to reach its waypoint and ends up blocking a huge group behind it. Yes they are. Well for the most part. There is also soft push gradient (not really the hitbox, but like a softer wider hitbox) and also some logic that tries to push if two bodies already overlap. Link to comment Share on other sites More sharing options...
Thalatta Posted 37 minutes ago Share Posted 37 minutes ago 23 hours ago, Atrik said: Is your tests using the updated code I'm using the latest b53b24adc2 now. I think an issue now is that they are really stubborn to turn , and that can block paths or cause them to be dragged sideways somewhat easily (see the 1v1 after 0:15): video.mp4 I guess some turning would be more realistic than being pushed sideways like that, imagining it's on their own accord, which makes me think if there shouldn't be a difference between how enemy and own units react. 1 Link to comment Share on other sites More sharing options...
Atrik Posted 2 minutes ago Author Share Posted 2 minutes ago (edited) 35 minutes ago, Thalatta said: I think an issue now is that they are really stubborn to turn Well here you are trying hard to make the geometry show it's limits In the first example, a rectangle pushing another one against the wall is kinda expected to do this slide. In the second example on open terrain, I see you manually try to aim for the elephant's center, despite it trying to rotate!! But you can actually try to tweak values even without recompiling : in `pathfinder.xml` you have the parameter `SolidPushSpin`, which makes the circle pushing/soft pushing impact more or less units spins. Currently it's low (0.25), if you increase it, your elephants will spin faster in that case, but this also means elephants moving shoulder to shoulder might also wiggle a bit more. Edited 1 minute ago by Atrik 1 Link to comment Share on other sites More sharing options...
guerringuerrin Posted just now Share Posted just now 31 minutes ago, Thalatta said: I'm using the latest b53b24adc2 now. I think an issue now is that they are really stubborn to turn , and that can block paths or cause them to be dragged sideways somewhat easily (see the 1v1 after 0:15): video.mp4 6.23 MB · 0 downloads I guess some turning would be more realistic than being pushed sideways like that, imagining it's on their own accord, which makes me think if there shouldn't be a difference between how enemy and own units react. I like this behavior much more than what could be seen in my videos from the previous commit. I'm not sure to what extent it will be possible (or desirable) to make the behavior more realistic, but getting them to rotate a little when they are pushed would be really good, as it would make the behavior more realistic and, in many cases, could help open up paths for them to move through more quickly. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now