New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with auto-moving #73062
Comments
Move cost for roads is smaller than for off-road overmap terrains (fields, trails and dirt roads): Cataclysm-DDA/src/overmapbuffer.cpp Lines 868 to 885 in 73b6cf7
You need to use wheels with bigger |
Autodrive has speed limits. Read here - Cataclysm-DDA/src/vehicle_autodrive.cpp Line 40 in 73b6cf7
|
Thank you.
And how does this manifest for vehicles? A character that spends more moves. What does the vehicle spend? It travels 19 km/h on asphalt and travels 19 km/h in a field. What's the point? Does it affect fuel consumption? I know that for some vehicles, there is a maximum speed limit. But that threshold is higher than this 19 kilometers per hour. So what's the point of going down the road? |
If I understand correctly. We get an error or detect an obstacle (animal/zombie). We reset the speed and recalculate the path. But why do we need to slow down? Maybe I'm missing something. We're not driving in real time. If an error or obstacle is detected, recalculate the path and follow it. Or give control to the player. Only slow down if a collision is guaranteed at the current speed. And there is no way to avoid the obstacle while keeping the speed. P.S. Why am I thinking of Tesla and its autopilot? |
The reason auto driving speed is limited is because it's hard to make a robust feature that doesn't do the Tesla thing and crashes into something it can't recognize. You need to slow down when facing obstacles in order to ensure the vehicle ends up exactly where it was intended to end up. There are already issues with partial tile displacement sideways (move one tile sideways every X tiles forward), and you'd compound that if the movement forward is also in partial tiles so you'd have to predict when those partial tiles end up in an extra tile of movement. If I understand it correctly, the fuel consumption is indeed higher off-road. I also believe (without knowing) that the path finding's road preference is a result of a calculation based on the vehicle's performance over different kinds of terrain without accounting for the limited speed the travel can actually be performed at, so if the travel logic was able to actually travel at maximum safe speed the road would be faster. Making a 360 degree turn for no reason would obviously be a bug. Making a 360 degree turn due to a mobile obstacle might not be, although it seems odd. Personally I'm amazed this dog speaks, rather than complaining about the deficiencies in it's speech. However, if someone steps up to try to improve the logic it would be great. |
I realize that using a dynamic velocity value, is additional complexity and calculations. That's why the calculation uses 3 tiles per move. But we have some interesting parameters. Acceleration, braking and top speed off-road. They depend on wheels, engine and maybe something else. But clearly above 3 tiles per turn. Why aren't we targeting them? Let's say the turns are complicated. Straight sections. Conditionally 5 tiles * 5 moves = 25 tiles or ~1 OMT. Straight sections, in the representation of the function responsible for building the route. That is, sections where there are no turns. And if we go straight, let's add speed. And this speed will be calculated so that the car could stop completely in 1 turn. Total, turns we pass the old way with 1-3 tiles per turn. Straight sections - 5...8 tiles per turn. Some tests from the game
The spread is most likely due to rounding. It depends on what initial speed the braking starts at. Or it's just a bug. For areas with high and long grass. Apparently they have different effects. But since they are intermixed with each other, it's hard to say for sure. Summary. We have a section of straight path for which we know the road characteristics. We can calculate the braking. For a motorcycle, that's 8 tiles per stroke. So we can go up to 54 km/h. Or 20/32 if it's long grass sections. And for the coupe, 35-40 km/h. |
I don't know if anyone needs this. And maybe it's already implemented, but I don't know about it. I suggest adding some tools to test path building and automatic movement.
Obstacles are highlighted in a separate color, red.
Additionally, you can specify control points: the points of the beginning and end of movement for 1 move. As well as the angle of rotation at these points.
|
Check |
If I understand correctly Cataclysm-DDA/data/json/overmap/overmap_terrain/overmap_terrain_agricultural.json Lines 149 to 157 in a60d305
Cataclysm-DDA/data/json/overmap/overmap_terrain/overmap_terrain_agricultural.json Lines 25 to 31 in a60d305
Cataclysm-DDA/data/json/overmap/overmap_terrain/overmap_terrain.json Lines 28 to 34 in a60d305
Nowhere is the |
Describe the bug
During the automatic movement, I encountered three types of bugs
Instead of moving in a straight line, the game tends to use roads.
For example.
If you move on foot
If you ride a motorcycle
It's a clear field. With a patch of tall grass. Why would the game suggest a longer path?
These screenshots are not the most representative example. Sometimes the detour is even longer.
Speed reduction
When using vehicles, the speed is reduced to 6 km/h in some locations. On the road, in the field or elsewhere.
360 degree turnaround
Encountered only when driving on vehicles. Moving along the laid route, the transport makes a 360 degree turn. After that it continues to move along the route. Attempts to repeat the car movement on the same section pass normally.
Another reminder
19 km/h? Why is that so slow?
Attach save file
N/A
Steps to reproduce
N/A
Expected behavior
N/A
Screenshots
No response
Versions and configuration
cdda-windows-tiles-x64-2024-04-16-1009 and earlier versions
Additional context
No response
The text was updated successfully, but these errors were encountered: