ID:1895033
 
I've gone a bit demo crazy at the moment. My current project is creating a networking system for wires and pipes. Sharing it for those who are interested.

It works by using three new object types. Connectors, Connector_Networks & Devices.

Connectors are physical objects like cables which are laid out on the map in the pattern you want to connect everything.

Connector_Networks are fully autonomous abstract objects that maintain a list of connector objects of the same type which are adjacent to each other & a list of devices which are on the network. Devices tell the network when they're on and tell it when they disconnect. Really all the network manages is connectors.

Devices are physical objects which are allowed to claim to be on a network and are given access to a list of other devices on the network.

The uses of this are pretty far reaching and are not just limited to computer networking but also to pumps, refrigeration units, gas pipes, water pipes, etc.

The code for all of these is done, I'm now just writing a bunch of demos to display how to use them.
Testing some more complex configurations. Required some extra work to get this functional but it had an unexpected effect of tuning and honing the code I already had. I threw out a fair bit of code but ended up with more functionality :) Funny that.

In response to Zecronious
Zecronious wrote:
Testing some more complex configuration
complex your acting like a showoff dude dont make it sound like your better than everyone else and you dont have to listen to me but just a tip of advice
In response to Alienx26
What's your problem Alien26x? This isn't the first post I've seen of yours that just attacks someone for no good reason.

Haters gon hate.
A. He's a weirDO?
B. He's mad your showing off?
C. He's just like that.
I made everything fully automatic now. So this can be accomplished with veryyy little code:



obj/Connector/Wire
icon = 'Wire.dmi'
icon_state = "Wire"

New()
..()
spawn(1) autoJoin()

obj/Device/Computer
icon = 'Icons.dmi'
icon_state = "Computer"
density = 1

connectorType = /obj/Connector/Wire

Click()
usr << "\n~ Computer ~"
usr << "Connected to these networks:"
for(var/Connector_Network/CNET in networks)
usr << "Network ID: [CNET.id]"
Great. Now write a programming language within the game and then support more sophisticated network designs (hubs, routers, BUSes, etc.).

Pretty soon you'll have Exadv1's Console.
In response to Doohl
lol, or add spess cats and get SS13.
Ooooh I love this eye candy :) Working pumps :D

Can it do reverse pumps too? I hear you say.



:)
In response to Alienx26
Alienx26 wrote:
complex your acting like a showoff dude

Zecronious wrote:
Can it do reverse pumps too? I hear you say.

@Alien26x

Alirght, NOWWWW I'm showing off. And I just don't care if that bugs you. Kek.
Awesome job. I was thinking of the same type of system, inspired by mine craft tech mods.
I made a similar type of system with a weak in game programming language in Unity. These are so much fun to make aren't they?

I am looking forward to a release.
I love seeing systems like this. You could really go beyond the capacity when you add more things to something like this.

Maybe show us a demo of the wires being for power instead of data?

Also, how well does this handle on a large scale basis?
In response to Maximus_Alex2003
This scales very well. Nothing actually flows through the pipes, instead I create the illusion that it is. CPU usage is tiny. Even on a huge map with many connections it would not be noticeable.
In response to Mr. RJT
Evi of au wrote:
Awesome job. I was thinking of the same type of system, inspired by mine craft tech mods.

Thanks man :)

Mr. RJT wrote:
I made a similar type of system with a weak in game programming language in Unity. These are so much fun to make aren't they?

I am looking forward to a release.

Awesome, hopefully I get it released soon.
I've finished beautifying the underlying system & documenting all it's features.

Next I'm going to split the demos up, each to be released separately so we don't end up with a giant mess of demos which are all interconnected. There will be a lot of rewriting, documentation and beautification to go into getting all of the demos presentable.

The network code as it currently stands pretty much finished:
In response to Maximus_Alex2003
Maximus_Alex2003 wrote:
I love seeing systems like this. You could really go beyond the capacity when you add more things to something like this.

Maybe show us a demo of the wires being for power instead of data?

Also, how well does this handle on a large scale basis?

Networks is now a library, first demo will be Data & Power. White for ethernet and red for power.



If you disconnect a red cable does it remove power?
In response to Maximus_Alex2003
I haven't posted the library publicly yet but yes. If you cut the cable, remove the power source etc it will stop the flow of power.

Same with the pipes and water.
Page: 1 2 3