Roads/streets as steering guide. Cars will try to stay on it

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
User avatar
tobsimon
Fast Inserter
Fast Inserter
Posts: 104
Joined: Wed Apr 29, 2015 10:58 am
Contact:

Roads/streets as steering guide. Cars will try to stay on it

Post by tobsimon »

In my base, I refrain from using the car. Because I embarrassingly always crash into stuff. :oops:

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
Last edited by tobsimon on Sat May 16, 2015 8:52 am, edited 1 time in total.

lindenk
Burner Inserter
Burner Inserter
Posts: 6
Joined: Wed May 06, 2015 10:32 pm
Contact:

Re: Roads/streets as steering guid. Cars will try to stay on it.

Post by lindenk »

Sounds like a great addition. It would make getting around much easier (and less destructive) imo

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Roads/streets as steering guid. Cars will try to stay on it.

Post by ssilk »

Well, this is off-topic, but I want to point to a subject, cause they are a bit coupled: Transporting automated stuff. A new type of transport besides belts, bots and trains.

There are these threads, which do it by street: (that is because I mention it here)
https://forums.factorio.com/forum/vie ... f=6&t=7475
https://forums.factorio.com/forum/vie ... f=6&t=3072

And that streets will be in direct concurrence to the ropeway. https://forums.factorio.com/forum/vie ... f=6&t=7977

Again: Off-topic, just want you to throw a short eye on it, because it makes no sense to have automated transport by road AND a ropeway. But, ok, that thought is eventually too far. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

User avatar
tobsimon
Fast Inserter
Fast Inserter
Posts: 104
Joined: Wed Apr 29, 2015 10:58 am
Contact:

Re: Roads/streets as steering guid. Cars will try to stay on it.

Post by tobsimon »

So here is a simple way to "smooth out" street tile edges for diagonals:
street edge smoothing mockup
street edge smoothing mockup
path5040.png (6.89 KiB) Viewed 5177 times
Every tile is only either street or not, and decides by neighbour lookup, what kind of sprite to display. The sprites for diagonal edges overlap their borders a bit.

Maybe there even is no real need for a more complex setup to allow rounder curves. The cars smallest u-turn diameter appears to be 5 tiles (slow speed), the largest 14 to 15 (over 100 km/h). The mockup has a diameter of 8 tiles (radius: 4).

But if we want another edge angle in between, say 22.5°, the half angle to the diagonal, then the gradients 1:2 (26.6°) and 1:2.5 (21.8°) are both good approximations. While 1:2.5 is the better one 1:2 is tileable, so probably preferable. Below is a mockup with the 1:2.5 gradient.
street corner smoothing mockup
street corner smoothing mockup
path5050.png (1.91 KiB) Viewed 5177 times
These gradients cause much more tile overlap and need a larger lookup area for formation detection

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7351
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Roads/streets as steering guid. Cars will try to stay on it.

Post by bobingabout »

Interesting.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

voddan
Fast Inserter
Fast Inserter
Posts: 124
Joined: Sat Jun 03, 2017 9:22 pm
Contact:

Re: Roads/streets as steering guide. Cars will try to stay on it

Post by voddan »

That would be a nice addition! IRL this feature is know as lane-keep assist, which keeps a car on a lane unless a bigger steering force is applied by the driver


FactorioParadox
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Sat Sep 23, 2017 10:58 pm
Contact:

Re: Roads/streets as steering guide. Cars will try to stay on it

Post by FactorioParadox »

Maybe have it as a toggle as opposed to being always on but allowing you to break free because with your suggestion it would still be possible to accidentally drive off the road.

Aeternus
Filter Inserter
Filter Inserter
Posts: 835
Joined: Wed Mar 29, 2017 2:10 am
Contact:

Re: Roads/streets as steering guide. Cars will try to stay on it

Post by Aeternus »

Bit of a gravedig this thread. There's a mod that handles this by now, AAV.

[Edit] I do like the idea of an Asphalt surface. Stone (grind) + heavy oil (Tar) -> Fast surface. Will split that off into a separate suggestion.

Joe78man
Inserter
Inserter
Posts: 25
Joined: Thu May 05, 2016 8:36 pm
Contact:

Re: Roads/streets as steering guide. Cars will try to stay on it

Post by Joe78man »

I would be happy if there was a key that when pressed the vehicle would adjust to the closest 45° angle. I often found myself turning left and right constantly attempting to straighten the car at top speed, sometimes crashing with a post or lamp or something just because it is not possible to make a minor adjustment at that speed.

How about asphalt, where vehicles have a speed (and break) bonus AND after 1 second it would align to the closest cardinal point, set every 45°? The break bonus is also necessary IMO

xfir01
Long Handed Inserter
Long Handed Inserter
Posts: 93
Joined: Fri Feb 10, 2017 5:08 pm
Contact:

Re: Roads/streets as steering guide. Cars will try to stay on it

Post by xfir01 »

There's a mod that will do something similar to that. I pretty much need it to not crash into everything.

https://mods.factorio.com/mod/VehicleSnap

Post Reply

Return to “Ideas and Suggestions”