Computers and Machines

    Joined
    Nov 16, 2013
    Messages
    18
    Reaction score
    0
    • Legacy Citizen
    I think that its likely that, if the game keeps on going in its current direction, it will get machines and computers, at some point. So I thought about how that would work and be implemented, and I came up with some ideas.

    Computers are the most straight forwards, so Ill start with those. Given the way that the system works, I figure that you would have a "Motherboard" control block, some "Processors" to give the computer processing power, "Data stores" to provide fixed variables, and inputs/outputs.

    The Motherboard would be placed somewhere on your structure, and would have an interface, when clicked on, like an AI block. The interface would python or java or even just some sort of pseudo code to be written in it. Specifically, the code would be as many if/else statements as there are Processor blocks attached, and as many constants as there are data stores.

    There would be four primary inputs for the system. A "Detector", which uses the collision box from the docking system, except instead of telling the system that things can't dock there, when its obstructed, it would tell the motherboard that its input is equal to 1. A "Button" which would be exactly that. It would output a value of 1 when somebody pressed f with their crosshairs over it. A fourth one which I will mention in a moment. And the final input would be a "Controller" Which basically allows the system to receive an input from whoevers flying the ship, like if it were a gun.

    The outputs, then, would be guns, doors, lifts, when available, AIs(So you can activate/deactivate them), and machines.

    There would also be a "Transmitter", which would act like a power transfer device, except instead of transferring power, it transfers a value. This would be an output. And a "Receiver", which would act as a counterpart to the transmitter, receiving any data values transmitted from a transmitter.

    Machines would be a bit more complicated, as far as coding goes. The idea being that there are segments, which have cores, similar to the core of a spaceship. The difference being that it has a master core(The ship core/build core it was built on). This would allow the parts to act independently, yet still be in the same entity as the entity its on.

    Most of the movement would be provided by a rail. The rail would be several rail blocks in a row, and at either end of the rail blocks, a motor. The motor would, when receiving a command from a computer, move itself to the location of one of the adjacent rail blocks, and move the rail block to its former location. It would also move all blocks connected(In the same way that one connects a control block) to the core, by the same amount in relation to the cores master core.

    The other machine would be a rotor. Unlike a rail, this would consist of two blocks. Ont block on the part, and one block on the main ship. When receiving a signal, the blocks would move to be at a 90 degree angle of where it previously was, orientation would change by 90 degrees as well. The movement would only happen, though, if the space where it was moving, was un obstructed.

    These parts would have their own cores, and orientation, which would also allow them to have their own artificial gravity, allowing things like a walk way on the roof, or an MC escher esque building.

    I was going to make a mod of this myself, but then I looked into the file, and understood none of it, so I decided it best to just share my ideas.
     
    Joined
    Nov 16, 2013
    Messages
    18
    Reaction score
    0
    • Legacy Citizen
    Also Im sorry for any spelling/grammer errors. Im half asleep while writing this.
     
    Joined
    Sep 4, 2013
    Messages
    267
    Reaction score
    1
    Sounds really great. Though i think that a more graphical coding system should be used by computers. You can see what i mean by looking at this program: http://scratch.mit.edu/ Other than that, i would love building a giant openable hangar door with rails!
     
    Joined
    Nov 16, 2013
    Messages
    18
    Reaction score
    0
    • Legacy Citizen
    Thanks :) I was thinking about what would be the easiet to impliment as well as the most fun to play with

    A graphical interface would be a great idea! It would let people who dont know much about code play with it too!

    It could work by having as many little boxes as processors, each on with little drop down boxes, in the relevant places, listing inputs, ouputs and functions (+,-,=,,!, things like that).

    Though maybe that could be toggleable, so people that do know Java can code more easily, with things like nested if statements.

    I honestly wish I was better at code in general, and Jave specifcaly, so I could make this as a Mod, myself :/



    EDIT
    Though I am curious as to how much effort this would require for implimentation. I feel like it isnt actually all that hard, compared to many other sugestions, since like 40% of the code should allready be there.

    I think

    I still dont understand how the game file works, so I cant say much on the matter, and would apreciate the knowledge of someone more experienced than myself.