This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
redeye83's profile picture

Small Project needs helpers

Started by redeye83, 27 May 2013 - 07:07 AM
redeye83 #1
Posted 27 May 2013 - 09:07 AM
After having fun with my #WHYISTHATNOTWORKING! show The team is now all busy with other RL things (Dam school and Craniums inablity to build computers!) so I'm left all on my own with no real project to work on.

So as I often do and as the guys will confirm I have come up with a "small" project to keep me busy while I wait for them to have more free time and maybe gain some more members to the team.

The project is this:
I want to make a train network.

See nice and simples.

I have already made some software (Video out soon) for this already with the help of theoriginalbit that will be used in it and I have a good idea on how to "wireup" the platforms etc but the main thing I really need help with is building a "large scale" version of my simple track.

The network will have 7 stations being served by 4 passanger trains and 2 transport (frieght) trains.

Here is a crap layout overview of the network

@----@----@----@----@
		  |				|
		 @----------@

No idea why this above is not formatting right :angry:/>
I'm currently running this on a live server running "Big Dig" from tekkit and it has lots of the MODs that I want to use. Normally we run a custom pack of MODs but as Cranium has been busy I've not been able to harrass him into making a new one and I suck at MODs and multi MC lol.


So if you would like to help or have any advise or tips please post here.
theoriginalbit #2
Posted 27 May 2013 - 09:42 AM
The team is now all busy with other RL things
Only 1 more week of this semester left. :)/>
redeye83 #3
Posted 27 May 2013 - 10:24 AM
Good good
Cozzimoto #4
Posted 27 May 2013 - 11:07 AM
i like trains, here is an idea, a very farfetch idea but you could try and create some type or arrival and departure times at the stations.

a cart traveling over a detector could trigger on a computer somewhere between stations and tell a master server or the little servers at the stations roughly when the cart will arrive and how long it will be there before it departs due to another train coming in. the set up wouldnt be hard. i tried it as a proof of concept but i never got the rednet figured out. what i did is at a checkpoint i placed 2 detector tracks down with two blocks of track inbetween for two reasons, one to tell the computer what direction the cart is going, and 2 at the current speed the cart past the checkpoint to calculate the est arrival time to the station which was so many blocks away. i have not tested this out on a larger scale though, but i thought it would be a cool idea to see monitor at stations showing you where the trains are.


~Cozzimoto
redeye83 #5
Posted 27 May 2013 - 11:11 AM
I had thought about having due times but could not think of a way of doing it. I also like the idea of having a express train that could skip stations and over take trains on the same line. I have a program to track train locations using signals and wireless redstone. I just need to alter the GUI for the new track.

I would have the train locations in the spawn station in the control room.
Cozzimoto #6
Posted 27 May 2013 - 11:19 AM
when you say overtake trains you mean set up like a bypass on the track for one train to pull aside and the other to pass when needed.
this could be easy if you had two checkpoints on either side of the bypass to track the train coming in and when the train that over takes the other train enters the bypass zone and when they leave and when the other train that is pullover is cleared to leave. you can also achieve this idea easier with railcraft, but implementing computers to it im not quit sure.


~Cozzimoto
redeye83 #7
Posted 27 May 2013 - 11:24 AM
I would do that and at stations too, just stealing ideas from my real trainline lol.
As for using CC for it I dont think it needs it for that.
theoriginalbit #8
Posted 27 May 2013 - 11:36 AM
I have a program to track train locations using signals and wireless redstone. I just need to alter the GUI for the new track.
Is that the one we worked on at the start of the year?
Cozzimoto #9
Posted 27 May 2013 - 11:45 AM



idk if you already had an idea of what you wanted to do or not, but if you wanted some input here is my quick set-up of a bypass track
the track in blue is the bypass, the track in red is the freight line, and the track in yellow would be your checkpoints. i did it this way for a two direction trains so the trains dont need to be constantly waiting for a train heading at them to pass. you could possibly fit more trains on the same rail this way cause the bypass only affects the same direction trains. like if one needs to pull over to let a train pass cause its destination is the next stop ahead of the train its passing, so both sets of train get to their desired locations around the same time. tell me what you think


~Cozzimoto
redeye83 #10
Posted 27 May 2013 - 01:56 PM
That's almost identical to how I set my stations up lol

http://youtu.be/2BYooNURtX4
Cozzimoto #11
Posted 27 May 2013 - 03:40 PM
awesome, its simple but its a great startup for a more elaborate system with multiple rails going off in different directions, (N,E,S,W) and since yours its actually a working proof of concept alot further than mine, id love to join you and help out as much as i could.

basically improve on the system and make a 4 directional railway platform and tracking of 2 to 3 trains now. that sounds fun. =)


~Cozzimoto
Cozzimoto #12
Posted 27 May 2013 - 10:26 PM


Ok so here i created a 12 junction switch track for a 4 direction rail system with the center track for a freight train for supplies in between stations. as of this current setup i have not included the switches for the freight train, only the main part for the passenger trains is what i included.

so the tracks next to the blue wool represents the in-bound cart or train coming into the junction
tracks next to the red wool represents the out-bound cart or trains exiting the junction
switches on top of the white wool represents a right turn or a Clockwise turn on the track
switches on top of the orange wool represents a left turn or Counter-Clockwise turn on the track
switches on top of the purple wool represents a U-turn or opposite direction on the track

after i took this pic i went further ahead and added detector rails hooked up to wireless redstone for a future computer to know when a cart or train is about to enter the station and from what direction, and where that train or cart needs to be directed.

havent thought of a way to assign specific ids or names to carts or trains, but i think there is a mod addon for CC or railcraft that allows the unique id for each cart to be read, and i think we could store that in a bank of all the carts so the computer knows where that cart wants to go.

furthermore instead of trains this could be expanded where a player arrives at a station request a cart after he chose where that player wants to go, and the mainframe identfies that unique cart id with its destination to get the player where he wants to go.

lend me your thoughts


~Cozzimoto
Cranium #13
Posted 27 May 2013 - 10:55 PM
Augh, my head. Cozzimoto, I bow in your awesome engineering skills.
theoriginalbit #14
Posted 28 May 2013 - 12:02 AM
Can OCS detect carts? If so having a few computers with OCS could make the detection of carts, safety systems and the display of said systems on the computer much easier, nicer, and more accurate :)/>
redeye83 #15
Posted 28 May 2013 - 02:08 AM
I have found one problem with your current setup, looking at the picture how can the train coming in from the right turn left to exit at the bottom of the pic?
Also if you use locomotives the locomotive detector can be set to detect a specific coloured loco, so if you have 4 locos, make each a diffrent colour and have 4 detectors on each entrance to a junction.

Also I really want to try and use the Electronic Signal Controller rather than wireless redstone to make it more secure.
redeye83 #16
Posted 28 May 2013 - 02:12 AM
ok ignore my problem, my problem is being half asleep at work and reading your post and then totally ignoring it lol.
Cozzimoto #17
Posted 28 May 2013 - 10:59 AM
yea i understand that using the Electronic Signal controller would be more secure, i mainly did wireless redstone to get it working for a 4 directional switch track. i can expand on it and make it more secure by using the elements with railcraft.

as for OCS i think so, but im not entirely sure, i used OCS when it was out as a beta test release when the owner stopped CC sensors and Mikeemoo started an open source version of CC sensors.

but i should totally check out whats new on OCS and see if it can identify carts, if not a fail safe would be railcraft locomotives and i think 16 different trains would be enough on a large scale rail system.

and redeye83 its ok we all get like that when we are sleep deprived. =P
Cozzimoto #18
Posted 28 May 2013 - 11:05 AM
oh and yes, OCS does identify carts with the Minecart sensor card

http://www.computercraft.info/wiki/index.php?title=OpenCCSensors
redeye83 #19
Posted 28 May 2013 - 02:20 PM
Yes I normally use wireless redpower as I have no idea how to use OCS lol.

16 locomotives eh, nice to see your keeping it simple lol

I'm going to try and get the server up and running tonight also another reason to use the OCS block is that RP2 is not 1.5.2 yet.
Cozzimoto #20
Posted 28 May 2013 - 02:52 PM
16 locomotives eh, nice to see your keeping it simple lol


lol, sorry, i guess i like adding a challenge to myself. =P

so ive come up with an issue. i can either use OCS minecart sensor card from OCS, or i can use the rail reader from Misc Peripherals. both give the entity ID, but the issue is when the chunk is unloaded or you move away. the entity id changes will you come back to the cart and it is loaded. the only benefit i can see is that a player will always keep the chunk loaded with the cart (because they are riding it to their destination), but what if that cart needs to go somewhere without a player (like changing tracks). attach a chunk loader to it?, or have a chunk sential on some of those rails where the player isn't gunna exist?, or we could use the rail read which returns the players name that is riding the cart. but yet the rail reader doesn't exactly solve the issue either.

i don't think it will be a problem but something i'm gonna keep an eye out and see if that becomes an issue later on



~Cozzimoto
redeye83 #21
Posted 28 May 2013 - 04:14 PM
Well the only way to use signals at any range is to use chunk loaders (Anchors) so we would have one at the sensor to keep the ID. I know it uses a ton of ram but there is no way round it unless you dont have locos and just have carts.