Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign up[CR}Simple vehicle auto-driving #31978
Conversation
davidpwbrown
added some commits
Jun 29, 2019
This comment has been minimized.
This comment has been minimized.
|
Even what you have here is really impressive. Wonderful stuff. |
This comment has been minimized.
This comment has been minimized.
|
This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there: https://discourse.cataclysmdda.org/t/player-overmap-autotravel/20572/26 |
This comment has been minimized.
This comment has been minimized.
|
awwww yiss this looks (ignoring the overshooting) great! :D |
kevingranade
merged commit dc2cc10
into
CleverRaven:master
Jun 30, 2019
This comment has been minimized.
This comment has been minimized.
paulenka-aleh
commented
Jul 1, 2019
|
Looks impressive. A question I have in my mind: should this be interface feature like now or rather a vehicle autopilot (e.g. robot controls + sensors + tracking device)? |
This comment has been minimized.
This comment has been minimized.
|
Maybe instead of taking this away from the player (without such toys) we could instead extend this to robotic controls and such. That way if you don't have robot controls installed you can still have this auto driving take place. Meanwhile those who have such robot controls installed can sit back and let the car drive itself while they do something else, like read or play a game or something (sleep?). I wouldn't recommend moving about the vehicle while it's in motion though... |
This comment has been minimized.
This comment has been minimized.
DieAxtImWald
commented
Jul 9, 2019
|
Wonderfull feature, if i only could use it... Autotravel on foot works, but autodrive with a vehicle not. The path is simply not visible. Testet different vehicles... What did i miss? a new world? |
This comment has been minimized.
This comment has been minimized.
|
It only works on roads. |
This comment has been minimized.
This comment has been minimized.
DieAxtImWald
commented
Jul 10, 2019
|
i've tested this on different roads. |
This comment has been minimized.
This comment has been minimized.
DieAxtImWald
commented
Jul 10, 2019
|
i can't get it. |
This comment has been minimized.
This comment has been minimized.
joe9000
commented
Jul 13, 2019
|
can you make it treat #lake tiles as road to give boats some more use for it? |
This comment has been minimized.
This comment has been minimized.
A full in-game autopilot may be possible on some vehicles, I can look into tht, so the player can do other things while the vehicle ( attempts to ) drive itself. |
This comment has been minimized.
This comment has been minimized.
as above |
This comment has been minimized.
This comment has been minimized.
Idk what the problem may be really, the route should appear on the map , when you press shift+W, when you are in a vehicle, the vehicle is running with you in control of it, and the start and endpoints of the route are on a road. |
This comment has been minimized.
This comment has been minimized.
Yes, good idea. I can do that. |
davidpwbrown commentedJun 29, 2019
•
edited
Summary
SUMMARY: Features "Activity to auto-drive simple road routes"Purpose of change
An Activity whilst in charge of a car - open overmap and select destination, like the overmap auto-walk, will only preview route if destination is on a road though.
Vehicle will then attempt to drive there automatically.
Describe the solution
Vehicle will have a set of omt path points.
It finds the next point which is on the shared border of the current and adjacent overmap point, ( thanks to OrenAudeles for some Amazing Algorithmical Assistance ) and paths there in a loop with pldrive()
Caveats : It's a bit dumb - it will just simply stop if it encounters an obstacle or a part gets damaged.
It cant avoid obstacles. it will stick to a fairly low speed.
It still can basically, without much input, make it far less tedious to travel a long road journey that you know is clear ( maybe you pre-cleared it )
[CR] because , I dont know for sure if I've got the tileray stuff down completely, where it pre-checks for potential collisions ahead of its proposed angle, sometimes it finds a tree near the corner of a road and stops, and its beyond me I think to tweak it any further when I dont really know what Im doing with it.
secondly - the turning is a bit last-minute - the centre-point of the vehicle gets to the point at which the road turns, and then the vehicle hs to turn drastically to align with the diagonal - A very long vehicle would certainly smash into trees as it turned in.
Hoping maybe someone can help tweak the algorithms here, but if not, its semi-usable and perhaps has some utility under controlled road conditions.
Describe alternatives you've considered
N/A
Additional context
Heres a GIF of the auto-driving
You can see it leaves the turns a bit late . https://gfycat.com/fatallightheartedarkshell