jakj Posted June 5, 2013 Author Posted June 5, 2013 I have now un-derped the creative tab, so it will again work in the next release (tonight or tomorrow morning, depending on how sleepy I get).
Viktor_Berg Posted June 5, 2013 Posted June 5, 2013 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...
jakj Posted June 5, 2013 Author Posted June 5, 2013 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.
Viktor_Berg Posted June 5, 2013 Posted June 5, 2013 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?
jakj Posted June 5, 2013 Author Posted June 5, 2013 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.
Viktor_Berg Posted June 5, 2013 Posted June 5, 2013 Alright, take a look at this screenshot: 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.
jakj Posted June 5, 2013 Author Posted June 5, 2013 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.
Viktor_Berg Posted June 6, 2013 Posted June 6, 2013 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.
jakj Posted June 6, 2013 Author Posted June 6, 2013 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.
jakj Posted June 6, 2013 Author Posted June 6, 2013 Small update: Testing version #7 available. * Added textures for carriages. * Fixed creative tab.
Lethosos Posted June 6, 2013 Posted June 6, 2013 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.)
jakj Posted June 6, 2013 Author Posted June 6, 2013 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.
Lethosos Posted June 6, 2013 Posted June 6, 2013 Sure, 'cuz this started happening. Bye-bye, prototype mole machine, into the wild blue yonder.
jakj Posted June 6, 2013 Author Posted June 6, 2013 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.
Lethosos Posted June 6, 2013 Posted June 6, 2013 Yeah, it's a vanilla bug. Wierd. Oh well, I'll figure it out somehow.
Altair357 Posted June 6, 2013 Posted June 6, 2013 That bug is what allows for vanilla block update detectors, actually. Has to do with the piston being able to be powered from two blocks above, but only checking whether it "should" be powered upon receiving a direct update.
Markarthian Posted June 6, 2013 Posted June 6, 2013 Four broken image icons. That's helpful. It's a spammer, he has posted that all over the boards.
jakj Posted June 6, 2013 Author Posted June 6, 2013 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.
Viktor_Berg Posted June 6, 2013 Posted June 6, 2013 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.
Markarthian Posted June 6, 2013 Posted June 6, 2013 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?
Viktor_Berg Posted June 6, 2013 Posted June 6, 2013 As I understand, the platform is more for carrying large amounts of blocks, kinda like block transport. Having it pick up all sorts of formations would make it simply superior to the original configuration in every way.
jakj Posted June 6, 2013 Author Posted June 6, 2013 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.
jakj Posted June 6, 2013 Author Posted June 6, 2013 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now