[MECH] Redstone Mania v0.05 - I Need testers! :D

Discussion in 'WIP and Development Status' started by bergerkiller, Oct 18, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    bergerkiller

    After being a work in progress for a while, it is finally there: Redstone Mania!

    Description

    Redstone Mania features wireless, customizable and instant redstone in the form of 'circuits'. How does that distinct from other plugins like Craftbook you might ask, well, instead of supplying circuitry that are built-in, you can create and save them yourself! Instead of having hundrets of XOR-circuits lined up to make that awesome door lock, you can now save this XOR-circuit and make it instant, small, and persistent.

    I will list the main features below:
    • Set the ports of your circuit and save it as a circuit, simple as that
    • Circuit is optimized: instant, no block changes, no server lag
    • You can make multiple of the same circuit (instances)
    • Wireless: Connect circuits cross-world or across the world
    • Very simple lever-system simulates redstone wire up to 100%
    • Possible to set ports by toggling levers manually: wireless levers
    • Nearby note blocks, doors and trapdoors are toggled as well: double-door becomes small
    • Completely freeze-protected: it is impossible for circuits to end up in an infinite loop
    • Possible to use circuits in another circuit: CircuitCeption :)
    The features that are not yet added, but WILLbe added:

    • Possible to edit circuits outside the server (circuit editing tool)
    • Proper permissions
    With this in the background it is finally possible to write a redstone computer: with instant redstone anything is possible.


    Download a WIP version from GitHub. (I need testers, make something awesome!)


    How to make a circuit that adds two 1-bit values
    How to make a circuit that adds two 2-bit values

    Port

    A port is used to make your circuit communicate with the outside world. An XOR-gate, for example, has two 'in' ports and one 'out' port. A memory field (SNNOR-latch) has only two ports, 'a' and 'b'.

    To make a port, place a sign on a block with:
    If the instancename is not yet taken, it is made. Otherwise this port is added to the circuit instance set. If a circuit instance is out of ports it is automatically cleaned up. For example, or XOR-gate would look like this:
    Code:
    [port]
    XOR
    xor1
    in1
     
    [port]
    XOR
    xor1
    in2
     
    [port]
    XOR
    xor1
    out
    Commands

    You can use both /redstone and /circuit to use Redstone Mania.
    • /redstone list to list all circuits, /redstone list [circuitname] to list the ports
    • /redstone port [name] to set a real-world port for your circuit (first select a block)
    • /redstone setdelay [delay] to set the delay for the element during creation (select block)
    • /redstone clickdelay [delay/disable] to set a delay that is set when clicking blocks
    • /redstone clearports to clear the selected ports
    • /redstone cleardelays to clear set delays
    • /redstone clear to clear both ports and delays
    • /redstone save [name] to save your circuit using the ports set
    • /redstone delete [name] to delete a circuit and all it's instances
    • /redstone reload to re-load all circuits (in case you changed a dependency circuit)
    Found something and want to debug it yourself? Here is the source code on GitHub.

    Show your appreciation for my plugins by donating
    [​IMG]
     
    Regulius, Valdifer, interphx and 3 others like this.
  2. Offline

    Antariano

    Love it!
     
  3. Offline

    AuZor

    Fawg, your plugins makes me hot.

    /Suggestion - /redstone list - display all saved redstone.. blablabla
     
  4. Offline

    AbeJ

    Your plugins are great. Does it just simulate the circuit, or can it actually affect the circuit as it runs? If not, some things like torch burnout might be hard to simulate.
     
  5. Offline

    bergerkiller

    @AbeJ It simulates the circuit, taking torch/repeater delays into account. Tested against the real circuit: behaves 100% the same. Very good suggestion about redstone burnout: I could use it to prevent the server from freezing when ending up in an infinite loop.

    @AuZor Yup, I'll add a listign command too. (showing created circuits, circuit instances and circuit port names. Also going to add a way to power redstone when someone left/right clicks a block. :)
     
  6. Offline

    Laserhog

    This. Is. Awesome.
    Can't wait for the finished product!
    I would love to test this for you when it is ready for it (if you want me to).
    :D
     
  7. Offline

    bergerkiller

    Also, I might even make a circuit editor program for this, like MCEdit. This way you can visually make complete circuits. Also thinking of showing a circuit in a smaller window and show circuit element states while the server runs. Would be pretty damn awesome! :)

    Instances can be saved, now time to implement sub-circuits.
     
  8. Offline

    bergerkiller

    Status update: instances are saved, subcircuit loading, saving and 'clone from source' is working, but sub circuits are not yet detected during circuit creation.
     
  9. Offline

    bergerkiller

    Status update: Sub-circuits are loaded, saved and instances with sub-circuits are saved. Only issue with this I currently have: I need to remove direct connections. This can be done by 'disabling' certain nodes in the circuit, but this disabling is kinda failing. Once this is fixed I can upload a first working WIP version for you to test out :)

    EDIT

    YESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS I GOT IT WORKING :D:D:D:D

    You do NOT want to know how happy I am right now. :D

    Code:
    21:49:04 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
    21:50:34 [WARNING] [Redstone Mania] OMFG WE FOUND [Port 'out' 5] AND [Port 'out1' 0]
    21:50:34 [WARNING] [Redstone Mania]     DISABLED [Port 'out' 5]
    21:50:34 [WARNING] [Redstone Mania] OMFG WE FOUND [Port 'out1' 0] AND [Port 'out2' 1]
    21:50:34 [WARNING] [Redstone Mania] DISCONNECTED THE TWO!
    21:50:34 [WARNING] [Redstone Mania] OMFG WE FOUND [Port 'in' 4] AND [Port 'in2' 2]
    21:50:34 [WARNING] [Redstone Mania]     DISABLED [Port 'in' 4]
    21:50:34 [WARNING] [Redstone Mania] OMFG WE FOUND [Port 'in2' 2] AND [Port 'in1' 3]
    21:50:34 [WARNING] [Redstone Mania] DISCONNECTED THE TWO!
    
    I badly need testers for this plugin, so if you have time, test it out. There is an incredible amount of ways circuit creation could fail, and you guys were, till now, always able to spot them all :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 20, 2016
  10. Offline

    desht

    I'll definitely be giving it a go - just need to find some time :) Hopefully in the next couple of days...
     
  11. Offline

    bergerkiller

    Ok got an update in a few minutes:
    - clearports and cleardelays, with clear for both (current is failing)
    - clickdelay - click multiple torches and set a delay automatically (saves time)
    - fixed wire algorithm (failed when two wires run on top of each other)
    - will add a video how to make a bit adder :)

    updated

    EDIT

    I made a 2-bit adder...but explaining how it works would take 20 minutes, so not worth it. Let's say I combined 3 1-bit adders together to make it:
    I could go beyond this and make a 4-bit adder out of multiple 2-bit adders...but it would be extremely confusing :)
     
  12. Offline

    nicholasntp

    Oh. My. God. I didn't think redstone could get any better. I will make a mini computer with my friends using this plugin, and make a video for you!
     
  13. Offline

    bergerkiller

    @nicholasntp will become even better, since I am going to add instant redstone-block change interaction.
    Also going to add a way to make redstone glow up when someone right/left clicks a block. Imagine: An LCD touch screen :)

    Also, important: Virtual circuits are instant, for obvious reason I won't make real-time redstone instant. It could easily freeze the server.
     
  14. Offline

    nicholasntp

    Oh my gosh, you are the god of redstone, There should be like mine craft gods... like.... bergerkiller - God of Redstone.... Notch - God of Minecraft... etc. Do you want me to get my friends together to make a small/big computer?


    EDIT: BTW... I'm also a plugin developer. About to release my first plugin, when i get the bug fixed that I mention HERE

    EDIT 2: I mean HERE

    Now I don't have to get in the way of other redstone. xD

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 20, 2016
  15. Offline

    bergerkiller

    nicholasntp likes this.
  16. Offline

    nicholasntp

    Thanks. :p Its the second error I post about. I fixed the first part.
     
  17. Offline

    bergerkiller

    Next on the list: Blocks. Get if a block is a certain type, set the block type and data, toggle redstone when someone clicks the block. It's all possible, but might be tricky to do :)
     
  18. Offline

    nicholasntp

    Nice. :) Take a look at my help thread xD

    Ill test this and make a video of a computer my friends and I will make after I release iHeal... which will be TODAY! Never. I am making a plugin called iTask, which will be just like essentials and command book, that will have healing.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 20, 2016
  19. Offline

    DeathQueen

    You should abbreviate it to being /rs instead of redstone. Typing it out each time is a nuisance. Also, the name for these circuits are called integrated circuits, or at least that's what everyone else says :p
     
  20. Offline

    bergerkiller

  21. Offline

    DeathQueen

    Ah. Well then, OBJECTION!
     
  22. Offline

    mindless728

    Overruled!
     
  23. Offline

    cholo71796

    @bergerkiller
    • I made a "circuit" of redstone wire- just a line of three.
    • I right-clicked on the first one, typed "/circuit port in" and it said "You added port 'in'!"
    • Then I right-clicked the last one, typed "/circuit port out" and it said "You added port 'out'!"
    • Then I typed "/circuit save wire" and it said "Port 'in' merged with port 'out'!" and "You created circuit 'wire'!"
    • Then I attached a sign to a block with the lines
      Code:
      [port]
       wire
       top1
       in
      and it said "A new instance of 'wire' has been made!" and "Port to 'in' added!"
    • Then I attached a sign to a different block with the lines
      Code:
      [port]
       wire
       top1
       out
      and it said "This port does not exist!"
    What am I doing wrong?

    Nevermind, I figured out what it meant by "merged." I assumed "merged" just meant that the plugin recognized that in would lead to out.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 20, 2016
  24. Offline

    bergerkiller

    @cholo71796 Ye I couldn't have two wires or ports directly connected, it would keep each other on all the time. (infinite loop). Merged means that one port disappears and the other port is used instead. You can use multiple 'physical' ports per circuit port, so you could have 7 ports interacting as one wire.

    I decided to let pailstone handle all the block changes, it is a bit useless to copy it.
     
  25. Offline

    Isocadia

    If you need a tester, I'm fully willing to help you with anything you want. I need this SOOO badly :D
     
  26. Offline

    bergerkiller

    @lsocadia well feel free to test then, the latest version is in the main page. If you need certain features or need help I am willing to help you with that :)
     
  27. Offline

    DrAgonmoray

    @bergerkiller
    I skimmed around, but basically this plugin allows you to build a redstone contraption, save it to some sort of file, and compact the whole thing into a little block?

    If so, you're god.
     
  28. Offline

    bergerkiller

    @DrAgonmoray um...yes? :p

    Well, actually, it saves it into a virtual hierarchical circuit which is saved to a .circuit file. From this circuit you can create multiple instances, which are all simulated. Instances are saved as .instance and use the infrastructure of the Circuit file when loading.

    Basically a virtual space next to the block space which interact, where the virtual space is simulated. Yes, I am a god. :p

    Ow and forgot to note that you can have Circuits inside other circuits, for example, connect 2 OR-circuits into an even larger OR-circuit. I already made code to 'make circuits independent', but have forgotten to make a command for it.
     
  29. Offline

    BlockCat

    this is, awesome.​
    could you add a function that you can place redstone beside each other and that it still does not connect?​
    if so that would be great, redstone could be more compact then!​
     
  30. Offline

    bergerkiller

    @Zino not possible, connections are made at the client and physics take place at spots a plugin can't reach.
     
Thread Status:
Not open for further replies.

Share This Page