When the plugin is deselected, the nodes are stored away in ServerStorage for future editing
Convenient self-contained models are generated for the road segments / intersections, so the plugin can also be used to generate component road system parts for reuse outside of the plugin
Arbitrary Shape / Color / Material Support
Full support for 3d shapes
Roads inherit the color / material of the adjacent nodes, allowing you to set up whatever coloration / material / other properties you want (Duplicate from an existing node to get another one with the same setup).
The full customization makes the plugin usable for any form of road / pathway.
Configurable Detail Level / Optimal Part Count
The plugin uses the minimum possible part count to accomplish a given task, so roads will use equal or even fewer parts that you would manually building a comparable setup.
The detail level of each node is fully configurable with a float multiplier parameter in the settings panel letting you choose exactly how much angular granularity the generation should have.
Configurable Lanes
Want a 6 lane highway? No problem.
Nodes track a set of lane widths and lane markings, letting you full configure the lane layout.
The code is MIT licensed (licence provided in a ModuleScript in the source), so feel free to dig around and steal any of the code. There’s a few potentially useful parts that could be extracted and repurposed relatively easily such as the SplineGenerator Module which has the logic for figuring out what set of spline segments to generate between a pair of nodes.
Beta
For now I’m considering the plugin in “beta” in that I may have to change the data format, so if you come back and use the plugin with existing roads you may not get exactly the same results editing the same set of nodes. 2D road layouts should be relatively stable, however 3D generation will definitely change as I tune it more.
Yet another legendary resource by the great Stravant to shave off countless days of dev time and save me so many headaches. This has just earned a place in my standard development workflow.
Dotted lines are WIP, I just don’t have them implemented yet.
They do actually work, you just have to manually set which lane has the double yellow line right now. I forgot to make it so that when you increase the lane count by an even number it keeps the yellow line centered, I’ll get that in.
What would be the best way to do this? You can do this as is (minus the dashed lines which are coming). You just have to switch the lane markings to dashed center instead of yellow. The only part you can’t do nicely is the yellow line beside the divider.
Do you think it’s worth having a feature to add a divider in the middle automatically? I figured that nobody would use that if I added it since I imagine a divider like that kinda sucking for gameplay purposes.
Inserting a road node then repeatedly undoing doesn’t remove the node. If it’s the first time I’ve used the plugin, the first undo will move the node parts somewhere I never put it and only delete the generated road. If it’s not the first time I’ve inserted a node, there is no movement, but only the generated road is removed.
I was constantly getting requests to make banking turns work with Archimedes but now I can just send people here instead since this is way cooler than any solution I’d be able to come up with.
Edit: My only major feedback is that it’s kind of annoying having to use the Select/Move/Rotate buttons provided by the plugin rather than the already existing studio ones - my muscle memory is constantly causing me to accidentally select the studio buttons and making the plugin deactivate itself. Not mentioning Scale since it at least seem to have some custom behavior. I’m assuming there was some legitimate reason you had to add your own replacements for these buttons, though, so I can’t complain too much.
There’s actually a lot of custom behavior in the draggers, for example:
The selection behavior both clicking and marquee select is customized to not include the generated roads, only the nodes.
You’ll notice that if you drag two nodes, the road between them gets dragged along with the nodes even though it isn’t selected and doesn’t actually get regenerated. That’s because the draggers are smart about when to do regeneration and what the generated roads are.
The scale tool has smart handling of lanes / shoulders. The shoulders are kept the same width when resizing and the lanes are scaled proportionally.
There’s the join marker shown when dragging nodes close to eachother.
I could have taken some sacrifices to make things work with the built-in draggers but I felt that it would have been too much of a UX sacrifice.