Skip to content
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

Possible way to handle connecting to utilities from a distance. #1787

Open
koosemose opened this issue Mar 7, 2017 · 9 comments
Open

Possible way to handle connecting to utilities from a distance. #1787

koosemose opened this issue Mar 7, 2017 · 9 comments

Comments

@koosemose
Copy link
Collaborator

Currently, for a furniture to connect to a Utility, it needs to have the wires ran directly to the furniture. In the past, people have stated a desire to have furniture connect to Utilities from a distance (similar to Rimworld, for reference).

I have however been reticent to implement this for two reasons.

First, I personally find the autoconnection awkward and somewhat annoying to use particularly when trying to either maintain separate networks or keep certain furniture connected to only a certain portion of a network (such as in rimworld keeping all turrets connected to the other end of a switch), at times requiring awkward placement, and deconstruction and rebuilding of your wires when they don't run in just the right way.

Second, I am not confident in the combination of my coding skill and the PP framework to implement a system which will mimic Rimworld in allowing any powerable furniture to connect to any power cable within a given distance, and not have noticeable performance dips on placement of furniture and wires as they search for things to connect to.

However, as a solution to both these problems, and still at least partially satisfying those who want "easy" connections, I think having it in a limited form may work. Basically the idea is to have some sort of "outlet" object (rather a furniture, or a sort of Utility, depends on what works best) which is the only object capable of the ranged connect. This would mean not every wire has to search only this specific object, and if is implemented with some form of master list of all outlets, it would simplify furniture searching, as rather than having to either search every tile within, for example, an 8 tile range, or check every utility cable for closeness, it could just check the much smaller list of outlets to connect to (or maybe it could use some sort of signal through the tiles it covers, so rather than either one searching, the outlet just "notifies" the tiles they're in it's range, and either it can in turn notify any furniture presently there, or new furniture placed down will be able to check what outlets it is in range of.

There's room for additional mechanics around it as well (though I haven't heavily considered the implications thereof, they're just random ideas), such as having it either serve the entirety of a room (I think that would probably be bad, as it might lead to power gamers making the base one giant room to save on wiring), or serving a single room and only within range (mimicking an outlet on a wall in real life), and if it's in a wall it will be able to be set towards one room or another (or it is unplaceable in a wall).

@BraedonWooding
Copy link
Collaborator

BraedonWooding commented Mar 7, 2017 via email

@koosemose
Copy link
Collaborator Author

I think you're trying to solve the wrong problem. As I understand it, the issue isn't the cost of running wires to everything (I don't think it will ever be a drastic concern except in the most extreme circumstances), it's more that some people find it unnecessary fiddliness to have to run wire to every machine, which the mini wire doesn't solve.

In addition, having a carry distance would necessitate an extreme change in both in Power/Fluids, and the Utility networks themselves. As it stands the utility generators/consumers only need to be aware that they are connected to a network (and through the connection to the utility what network effectively), and the Utilities only have to build the network to the degree that they are aware what other utilities they are connected to. But to have a carry distance, the generators would effectively have to be able to generate at a certain point in the network, and basically "pathfind" to consumers (or the other way around, same end result, aside from likely performance differences), and the networks would have to basically be building a nodegraph of their connections. Which would be more realistic (or at least would support more realistic mechanics such as power loss over distance), but I don't think we want that degree of fiddliness (and I'm not sure if our standard play area and expected play style would support that being a significant effect), and I'm pretty sure that would negatively impact performance, as I think the best setup in the worst scenario would be when wires are added or removed, everything connected (or at least all consumers or all producers) would have to redo the pathfinding in addition to the network rebuilding its nodegraph, instead of the current setup where it just has to check each wire in the attached network(s) once.

My suggestion still leaves options, you have the current wiring (which will continue to be pretty cheap), and you can either manually connect it to each element or have an "outlet" which handles the connections, basically trading off between fiddliness and control, and ease of use but lack of in-depth control. Of course it doesn't even have to be all or one on a single network perhaps you have an area which has machines you want connected to different networks so you manually wire things, and another area on the same network where everything is fine to be on the same network so you can just set up an outlet. Basically the outlet would automatically run "mini-wires", though without actually placing down utility wires.

The general idea, other than to offer options that allow either control or ease-of-use (it can't be a single thing to do both because they are directly opposed, with the elements that offer ease-of-use being the same thing that some would prefer to have control over), is to basically represent the idea of an actual outlet in the real world sense. When building a building you don't build the electrical wires in to directly connect to all the machines that will be installed (except perhaps in some industrial scenarios... maybe?), you run the wires through out the building and install outlets, which the various devices plug into with their own cords. With the "auto connection" representing the crew plugging the machine into the outlet when they build it... abstracted a bit of course.

@BraedonWooding
Copy link
Collaborator

Yeh, I see why it could be more difficult I felt we already did the pathfind to consumers which is why I suggested it, but if we don't then yeh I agree it would be too difficult to add in, and with outlets if you have multiple and wanted to select what machines goes to what outlet I'm sure that from a coding side would be a relatively easy task (though I don't think we need it right now just for the 'future'). So yeh I'm more on your side now with the whole outlet and normal wiring thing.

@crazyfox55
Copy link

crazyfox55 commented Mar 8, 2017

I want to point out something to think about. What happens when one piece of multi tile furniture is in contact with two different networks? Example: 3x1 horizontal furniture where the left tile is one network and the right tile is another network and the middle is empty.

I also agree that wireless power connections are worse than manually placing wire. I think the player should have more control not less. I think its more convenient to have absolute control rather than general when the action in question is a one time occurrence.

In addition I think switches, splitter and bridges would be a good addition to the power networks. These would allow the player more control of the flow of power.

@BraedonWooding
Copy link
Collaborator

BraedonWooding commented Mar 8, 2017 via email

@koosemose
Copy link
Collaborator Author

The multinetwork thing is applicable even to the current system without wireless connections. As it works now if the furniture is placed onto the connection, IIRC it will take the first network it encounters (cycling through each tile), placing a wire after that will force a reconnection to that wire's network. Optimally, in the future, I would like a way to be able to have a second network function as a backup, so for example you have you main high power network that runs things in most conditions, and a second more robust (but somehow more expensive to build/maintain) network as backup. So if something brings the main network down, survival critical devices (O2 gens for example) will be able to fall back to the more robust backup system.

And I'm glad to discover that I'm not the only person that prefers manually making my connections, but the majority of people who have expressed opinions on it have preferred autoconnection/wireless, which of course is the reason for this idea, so that we can continue to have our manual placement and also allow those who prefer autoconnection to have some form of it.

@BraedonWooding
Copy link
Collaborator

BraedonWooding commented Mar 8, 2017 via email

@koosemose
Copy link
Collaborator Author

I'm not sure how you envision a brushlike tool working to place wire, but I can't see it working very well, and "place wires everywhere" isn't really a solution to anything, since that either assumes wires are placed instantly or takes an eternity as crew place every single individual piece of wire.

And at this point your input hasn't been of a useful nature, on the actual point of this issue, you've only stated that you don't like wireless, but that's not really a reason to not implement it, only a reason (still not a very good one) to not make wireless the only way to do it. You haven't provided any actual reasons against it.

@crazyfox55
Copy link

crazyfox55 commented Mar 8, 2017

I'll just delete it then. and update my previous comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants