Jump to content

Redstone In Motion now in full release as of June 23


jakj

Recommended Posts

  • Replies 197
  • Created
  • Last Reply

Top Posters In This Topic

Any plans on implementing RedNet integration? I am not sure how that would work, perhaps the different colors of a cable can control the carriage in different directions? There are 12 directions for a carriage to move, and the RedNet cable can carry 16 channels of signals...

Link to comment
Share on other sites

12? There are six. There will be eventual RedNet integration, but it's lower down on the list. I'm probably going to need to reimplement red-alloy wire before diving into ComputerCraft.

That is a good idea, though: Since the different colors of wire won't connect to each other, you could have one of each color running to each face, up to a bank of buttons or levers on the control panel of your UFO.

Link to comment
Share on other sites

Shit, right, there are only 6 directions. I was thinking of something else.

But my point was that it would be nice to have a feature similar to what the most recent version of CC has - the ability to unbundle RedNet cable internally. I have no idea how you'd do it - presumably, by assigning colors to directions. Similar to how BC diamond pipes work - white/black for up/down, and then red, green, yellow and blue for the cardinal directions. Then the user simply has to connect a RedNet cable into the carriage from ONE side, and control all 6 movement directions by simply inputting signals into the block through different channels.

Is this feasible?

Link to comment
Share on other sites

I have no idea what you just said, having never done anything more with ComputerCraft than made a turtle that'll lay down a line of blocks for me. Link me to or post some sample code or a tutorial/wiki and I'll tell you if it makes sense for what I'm doing.

For the most part, if it worked in Redpower, it should work in mine, but I am not going to make that a blanket promise, since there are things in RP I'm not going to reimplement.

Link to comment
Share on other sites

Alright, take a look at this screenshot:

java2013-06-0601-40-52-75_zps4a2e60d9.jp

As you might know, RedNet cable, just like RP2 bundled cable, can carry 16 different redstone signals in it, except it doesn't need separate colored cabling to get those signals out - like you pointed out, the very same cable can connect to blocks using different channel colors. However, recently, ComputerCraft got a feature where it can interface with all 16 channels inside a RedNet cable, despite being connected to it only on one side. That's what I illustrated here. The computer on the left has the same (and more) flexibility as the 6 levers in the middle.

Now, assume for a minute here that the stone brick block is your frame carriage. The redstone cell is obviously for power, but the control signals (all 6 of them) come from the sole RedNet cable from the left side. This single cable can move the carriage in all 6 directions if the correct channel color inside it is activated. You can also see how it's done in BuildCraft with diamond pipes, with color coding for each direction: white for up, black for down, red for north, blue for south, yellow for east and green for west. The same color coding can be used on the carriage in order to signify which colors of the RedNet cable have to be activated to move in that direction.

I must say, though, the color coding on RedNet is kinda wonky, black looks like slightly darkish grey, while grey and light grey are progressively paler. Maybe purple would be a better choice of color for down.

Link to comment
Share on other sites

Aha, I see. In your ComputerCraft program, you would specify which color of wire goes to which face, based on north/south/east/west/up/down. I had been envisioning just a simple interface equivalent to turtle.forward and such (except with six directions rather than four with turning).

Tell me something, though: Does this work by a kind of sneakypipe functionality? As in, in your program, you specify that...say, the blue wire...should send a redstone signal to the top of the block, the green to the bottom, and so forth, so you can actually send power to all six sides even though the wire is connected to only one? If so, I'm curious as to how this is possible, because the current way that redstone signal is detected is to call a function like Block.isProvidingWeakPower in the direction you're interested in.

I suppose I should just decompile CC and see how it works. But yes, this is a great idea to do once I get to that point in the coding.

Link to comment
Share on other sites

No. That was simply an example by me. Any kind of preset color values for the RedNet would have to be set by you, or, otherwise, adjustable in configs. I.e., if I want to use white-red-blue-green-yellow-purple scheme, I can do that. Someone else might go for the simple white-orange-magenta-lightblue-whatever (default color ordering in Minecraft).

CC does not have any control over which sides of the receiving block it contacts. It simply interfaces with any adjacent cable, and can transmit redstone signal through any of the 16 internal channels (up to 16 levels of redstone signal, in 1.5.x+, at that). Whatever face orientation is on the carriage block would, again, be done on your end.

Or, maybe, you could implement a special kind of cable of your own, that has only 6 internal channels and can connect both to normal redstone and CC (as I understand, writing an API for CC is not that hard). But then again, why waste your time when most of the work is done by PowerCrystals?

[EDIT]: shit, I just realized. In the newest CC, there are now wired modems and network cables. If you implement carriages as simple peripherals, you wouldn't have to bother with all this RedNet nonsense.

Link to comment
Share on other sites

Excellent: That sounds like a plan, then. Once I get the rest of the carriage and carriage drive stuff done, I'll add in the CC api and make a simple peripheral for it, and then start working on the wiring from there. Until that's done, people can just have multiple engines/motors so they don't have to snap their spine trying to use vanilla redstone to connect to all six faces at once. Would be easy enough to have one engine for N/S/E/W and another for U/D.

Link to comment
Share on other sites

2013-06-05_204124_zps8e844f51.png

Noticed that the redstone block is staying "attached" to what the World thinks is the Frame, even when it's been unstickied on purpose. Breaking the redstone releases the sticky piston back to unpowered. I made this as a simple back/forth test bed after noticing some odd behavior while attempting to come up with a viable mole machine with MFR's Block Breaker. (It's trickier now, with not one but two piping requirements. Very easy to screw up and not be able to make it move.)

Link to comment
Share on other sites

I just tried this without anything and it seems to be a vanilla bug. What I did:

Wool block with button on it, sticky piston and redstone block, exactly like your picture. No frame carriages, no carriage engine, no second wool+button+piston+redstone. Pressed the button, it stayed up, broke the redstone, it went down.

If I were you, I'd try that in vanilla without even forge installed, to see if it's a forge thing or if it's a bug in the game itself.

Link to comment
Share on other sites

If the carriage just kept going, somehow it pulled a redstone signal with it. I'll have to make a thing where you can choose whether or not you want the machine to accept continuous signal or just pulses.

Link to comment
Share on other sites

New testing code: http://j-a-k-j.com/RedstoneInMotion_testing8.zip

*) Carriage textures increased in quality.

*) Added screwdriver: Activate the screwdriver on a carriage's side (sneaking or not, doesn't matter) and it will open/close that side. Alternative to sneak-activating with an empty hand.

*) Implemented platform carriages: These work just like frame carriages, except instead of picking up just the blocks directly touching them, they also pick up the blocks touching those, and the blocks touching those, and so on. For now, a hard limit of 500 blocks is in place to make sure you don't accidentally try to pick up an entire continent.

*) Carriage motors and engines now come in two types each: normal, which will activate on a redstone signal but will refuse to reactivate until the signal is taken away and reapplied, and continuous, which act as they do now, re-checking for a redstone signal every time they finish moving blocks and automatically moving again if they find one.

Link to comment
Share on other sites

New testing code: http://j-a-k-j.com/RedstoneInMotion_testing8.zip

*) Implemented platform carriages: These work just like frame carriages, except instead of picking up just the blocks directly touching them, they also pick up the blocks touching those, and the blocks touching those, and so on. For now, a hard limit of 500 blocks is in place to make sure you don't accidentally try to pick up an entire continent.

Make it only pick up the blocks above it, like a true platform.

Link to comment
Share on other sites

Make it only pick up the blocks above it, like a true platform.

That would be really annoying in a lot of builds. What would be useful is being able to dam in the area it lifts. Or is that what the open/close thing does?

Link to comment
Share on other sites

Make it only pick up the blocks above it, like a true platform.

The final version will have four types of frames (two of them already implemented, two being implemented right now), and your suggestion is #4. They are:

===

1) Frame Carriage

Works like the old Redpower frames: Any block immediately touching an open side of a frame carriage will be considered part of the carriage, and moved.

2) Platform Carriage

Any block immediately touching an open side of a platform carriage, or any block immediately touching the side of that block, and so forth, will all be picked up (subject to the maximum number of carry-able blocks based on your carriage structure). This is best for large open-air structures (since a cushion of air defines the structure), and it can be insulated by putting frames with closed outer sides as a shielding layer.

3) Structure Carriage

Instead of touching blocks, they are laid out as the 12 edges / 8 corners of a cube (like a giant wireframe cube made out of blocks), and anything inside that cube will be moved. This is useful for relocating a house.

4) Support Carriage

This is what you want: It will pick up all blocks above and below it in a straight up/down line, and none to the sides. If you want it to pick up only blocks above it or only blocks below it, you can close one side of the carriage.

===

The carriage blocks can be in any contiguous arrangement: They are counted by going first from the carriage drive, and then all frames of the same type that are touching each other count as one. You can put other types of frames inside the structure, but they'll be counted as any other block, not as carriage blocks.

Link to comment
Share on other sites

Two additional points:

1) Platform Carriages are not flat-out superior to Frame Carriages: For some builds (especially compact ones), it's much better to have easy and precise control over which blocks are picked up instead of having to put a bunch of cushioning frames all around it.

2) I may make the support carriage pick up blocks in a straight line out of any open side instead of just up/down, so that way, you could have a sideways moving wall of stuff. Not sure yet. The decision to be made is whether or not it would be annoying to have to close all the inactive sides every time.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Announcements

  • Anything claiming to be official Technic servers are not allowed here, for obvious reasons



×
×
  • Create New...