Roads/streets as steering guide. Cars will try to stay on it
Posted: Wed May 06, 2015 3:17 pm
In my base, I refrain from using the car. Because I embarrassingly always crash into stuff.
Think of streets as soft rails. You can leave them, but normally you stay on them.
If you are on a street and don't heavily steer to either side, you will stay on it. It should feel like the car has a steering guide, which keeps you on the street. Even in curves, but with limitations. In sharp curves at high speeds you have to steer, the steering guide won't manage alone.
How would it work?
Street tiles are 2x2, just like rail. Tileable, merging to an arbitrary large street surface. Curves and diagonals should be smoothed, I'm not sure how yet.
Steering implementations tend to define a virtual steering axle. There is a point in front of the car towards which the car drives (basically the angle of the front wheels). At high speeds the point is further away from the car than at low speeds. When you steer this point is moved some fixed distance out of the center line to one side. So at high speeds, your turns will have a bigger radius. This point is very much a physics object. It has inertia and your steering input executes force on it, counterd by a spring force pulling it back towards the center line. The steering guide also executes a force on this point, pushing it away from the edges of the road. Simple, isn't it?
How hard should it push? Not to hard, so you can break free, but hard enough to actually guide you. It should push harder the closer you are. This needs some careful balancing, so as not to bounce you away from the edge, but redirect you parallel to it.
Area of effect? Not really large. Discovery two tiles radius around this point should suffice.
This will make you want to use your car much more.
And it is the first step towards railless ground vehicle traffic in the base.
Details:
- A cobble road would only need stone and has low/no speed advantage.
- An asphalt street would also need some oil product and has a significant speed advantage.
- Maybe there should be some way to add street markings to define lanes and parking spots.
- The planes https://forums.factorio.com/forum/vie ... f=6&t=8955 need a runway. Runway lights extend this steering guide mechanism a certein length past the runway, to guide incoming planes.
Reference:
- Amit's game programming website with many ressources for steering behaviour, motion planning and obstacle avoidance
http://www-cs-students.stanford.edu/~am ... eprog.html
Related:
- This recent suggestion wanted street tiles to mark a designated driving area https://forums.factorio.com/forum/vie ... f=6&t=9860
- Wish to use the mouse to better steer the car: https://forums.factorio.com/forum/vie ... f=6&t=6015
- Roads as a mid-tech logistics alternative https://forums.factorio.com/forum/vie ... f=6&t=1157
- Mod: RoadWorks https://forums.factorio.com/forum/vie ... =14&t=4405, and corresponding request https://forums.factorio.com/forum/vie ... f=6&t=1094,
focusing on the aesthetics, and effects on speed.
- Something realated will probably be implemented for 0.12: https://www.factorio.com/blog/post/fff-67
Think of streets as soft rails. You can leave them, but normally you stay on them.
If you are on a street and don't heavily steer to either side, you will stay on it. It should feel like the car has a steering guide, which keeps you on the street. Even in curves, but with limitations. In sharp curves at high speeds you have to steer, the steering guide won't manage alone.
How would it work?
Street tiles are 2x2, just like rail. Tileable, merging to an arbitrary large street surface. Curves and diagonals should be smoothed, I'm not sure how yet.
Steering implementations tend to define a virtual steering axle. There is a point in front of the car towards which the car drives (basically the angle of the front wheels). At high speeds the point is further away from the car than at low speeds. When you steer this point is moved some fixed distance out of the center line to one side. So at high speeds, your turns will have a bigger radius. This point is very much a physics object. It has inertia and your steering input executes force on it, counterd by a spring force pulling it back towards the center line. The steering guide also executes a force on this point, pushing it away from the edges of the road. Simple, isn't it?
How hard should it push? Not to hard, so you can break free, but hard enough to actually guide you. It should push harder the closer you are. This needs some careful balancing, so as not to bounce you away from the edge, but redirect you parallel to it.
Area of effect? Not really large. Discovery two tiles radius around this point should suffice.
This will make you want to use your car much more.
And it is the first step towards railless ground vehicle traffic in the base.
Details:
- A cobble road would only need stone and has low/no speed advantage.
- An asphalt street would also need some oil product and has a significant speed advantage.
- Maybe there should be some way to add street markings to define lanes and parking spots.
- The planes https://forums.factorio.com/forum/vie ... f=6&t=8955 need a runway. Runway lights extend this steering guide mechanism a certein length past the runway, to guide incoming planes.
Reference:
- Amit's game programming website with many ressources for steering behaviour, motion planning and obstacle avoidance
http://www-cs-students.stanford.edu/~am ... eprog.html
Related:
- This recent suggestion wanted street tiles to mark a designated driving area https://forums.factorio.com/forum/vie ... f=6&t=9860
- Wish to use the mouse to better steer the car: https://forums.factorio.com/forum/vie ... f=6&t=6015
- Roads as a mid-tech logistics alternative https://forums.factorio.com/forum/vie ... f=6&t=1157
- Mod: RoadWorks https://forums.factorio.com/forum/vie ... =14&t=4405, and corresponding request https://forums.factorio.com/forum/vie ... f=6&t=1094,
focusing on the aesthetics, and effects on speed.
- Something realated will probably be implemented for 0.12: https://www.factorio.com/blog/post/fff-67