[Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Mon Sep 24, 2012 00:16

sbi(C, (!B|A|D)&(B|A|!D))

can be written as:

off(C)if(!B|A|D)if(B|A|!D)on(C);;

also, please note that the semicolan is to end an IF statement. you shouldn't use them with sbi()
Last edited by cornernote on Mon Sep 24, 2012 00:20, edited 1 time in total.
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Mon Sep 24, 2012 00:35

IIRC nested If statements aren't supported either, cornernote. I seem to recall there being an open issue about this but I'm not sure.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Mon Sep 24, 2012 00:42

oh, sorry my bad... i didn't realise that. i seem to remember using it somewhere, but i dont know if i just imagined it. probably did, sounds like something i would do.
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Mon Sep 24, 2012 02:26

As a workaround, you can use the EEPROM to store transient results:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
sbi(C, (!B|A|D)&(B|A|!D))


Becomes:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
sbi(#1,!B|A|D)sbi(#2,B|A|!D)sbi(C,#1)


Also, in your example you can apply boolean minimization to get the following, shorter version in disjunctive normal form:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
A|(B&D)|(!B&!D)


Wolfram|Alpha can do this for you: http://www.wolframalpha.com/input/?i=((NOT+B)+OR+A+OR+D)+AND+(B+OR+A+OR+(NOT+D))
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

Koczkodazjasz
 

by Koczkodazjasz » Mon Sep 24, 2012 08:47

I know boolean algebra very well, I study electronics and i like math and programming ;)

I know there can be a workaround etc... but - the thing is to find some bugs or issues, like not supported parenthesized expressions, it's really important for more complicated structures.

And what I can suggest: the textbox for the code should be multilinear and bigger when it comes to code something more than one or two simple ifs.
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Mon Sep 24, 2012 10:00

Minetest formspec does not currently support a multi-line input box.
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Mon Sep 24, 2012 11:59

I opened an issue on this topic here: https://github.com/Jeija/minetest-mod-mesecons/issues/52

If I have time I will look into implementing a different parser, but I'm not familiar with the microcontroller code so it might take some time.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

Miner99
New member
 
Posts: 6
Joined: Tue Jul 31, 2012 08:54

by Miner99 » Mon Sep 24, 2012 16:03

I found a weird bug:
When you put a button on a piston arm and press it, it wiil stay on and the piston wont turn off until the button is broken, the piston is powered and unpwered again.
I was in the Nether...
and came back.
 

CTMN
Member
 
Posts: 113
Joined: Sat Aug 25, 2012 15:02

by CTMN » Sat Sep 29, 2012 08:01

I actually see that there's a bug when I try to use relais:

When I put a mesecon behind a sticky piston and power the piston, it pushes the mesecon and if the mesecon connects two wires(one powered and one not powered), then it gets powered and powers the other wire. But when I turn the piston off and the mesecon disconnects, BOTH wires stay powered. Pls fix this.
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Sat Sep 29, 2012 16:20

What's a relai?
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

User avatar
qwrwed
Member
 
Posts: 323
Joined: Sun Jul 22, 2012 20:56
In-game: qwrwed or Nitro

by qwrwed » Sat Sep 29, 2012 16:58

Temperest wrote:What's a relai?

A relay?
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Sat Sep 29, 2012 18:01

We have relays in mesecons? :-)
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

CTMN
Member
 
Posts: 113
Joined: Sat Aug 25, 2012 15:02

by CTMN » Sat Sep 29, 2012 18:56

A relais is something like an transistor and an AND-gate. It was used hundrer years(or so) ago. A relais is similar to a mesecon built in front of a sticky piston. The relais is used today in circuits that prevent from overpowering(like the ones that some people have itn their house as a switch that automatically turns off).

Ur building computers in a game while not knowing anything about building circuits in the reality(btw Zuse built computer out of relais). Maybe they have another name.
Last edited by CTMN on Sat Sep 29, 2012 18:58, edited 1 time in total.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Sat Sep 29, 2012 19:48

You mean Relays (note the spelling). Relays aren't normally used in anything except for some higher-power devices that just need a simple on/off signal, and certainly not inside a computer anymore, except if you still have an old dial-up modem. :-) For most everything else, low-power transistors are used, or perhaps a MOSFET or solid-state relay.

In TTL electronics, and something like mesecons, a relay is pretty much useless, but if you want that effect, a simple diode or inverter gate with its input connected to your control circuit is sufficient.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Sat Sep 29, 2012 20:15

Yes, I believe you refer to a relay. You can achieve a similar effect with either an AND block, or a microcontroller acting as one. Pistons pushing Mesecons is not fully functional due to internal design constraints, especially if that Mesecons is powering the piston.

Perhaps relai is the term for relay in another language?
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

CTMN
Member
 
Posts: 113
Joined: Sat Aug 25, 2012 15:02

by CTMN » Sun Sep 30, 2012 05:45

Yes sorry for my spelling, English isn't my first language. I mean the relay

And I know that there are AND-gates and such stuff and I'm using them. But I want to build a ZUSE computer and I'm not able because of this bug. It would be also nice to have a bug fixed.
Last edited by CTMN on Sun Sep 30, 2012 05:49, edited 1 time in total.
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sun Sep 30, 2012 13:24

Bug:
I have two sticky pistons:
Image
Then i turn them off:
Image
And I can not destroy the thing at the left.
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Sun Sep 30, 2012 17:05

CTMN: I'll give a try at fixing that soon.

Basically all that really needs to be done is to add a delay before extending the piston. We can use node timers for this, or MineTest.after() if node timers don't work for this situation. This way piston oscillators and relays will be possible.

PilsAdam: that's caused by the piston's dig routine not being called. I'll make sure that's fixed soon as well.
Last edited by Temperest on Sun Sep 30, 2012 17:50, edited 1 time in total.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

by Calinou » Sun Sep 30, 2012 18:27

PilzAdam wrote:Bug:
I have two sticky pistons:
-snip-
Then i turn them off:
-snip-
And I can not destroy the thing at the left.


Also, extended sticky pistons should not use the sticky piston texture for the base (on the side), but another special one (same for normal piston when extended), because it looks quite weird.
 

CTMN
Member
 
Posts: 113
Joined: Sat Aug 25, 2012 15:02

by CTMN » Tue Oct 02, 2012 08:41

He there's a recipe that isn't mentioned on the mesecons page: put a normal piston in ur crafting grid and u will get the piston UP.
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46

by Jeija » Tue Oct 02, 2012 10:36

I know, I we have to remove that anyway as soon as it is possible to use a better facedir, so you can place up/down pistons without having to craft them.
Redstone for minetest: Mesecons (mesecons.net)
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Tue Oct 02, 2012 11:21

Jeija wrote:I know, I we have to remove that anyway as soon as it is possible to use a better facedir, so you can place up/down pistons without having to craft them.


sweet! how do you do that?
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Tue Oct 02, 2012 11:58

I have a prototype of the new pistons now, will commit this afternoon. It fixes the pistons pushing Mesecons bugs and allows piston oscillators to be built. Plus the dig issue has been fixed.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Tue Oct 02, 2012 21:22

New pistons are done! Make sure to report any other issues you might have with them. Up/Down pistons have not been updated in anticipation of them being merged with normal pistons.

The main thing to be aware of is that it now waits for a fraction of a second before extending or retracting, this allows you to make piston oscillators but it might interfere with older worlds if you have builds that require precision timing with pistons.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Wed Oct 03, 2012 00:27

Awesome, i'll have a play later tonight...

what happens to the old up/down pistons in my maps? do i have to replace them?
 

CTMN
Member
 
Posts: 113
Joined: Sat Aug 25, 2012 15:02

by CTMN » Wed Oct 03, 2012 07:52

I don´t think it´s a bug, but I can only connect a wired mesecon to powered mesecons(when I place it).

About the bug with long wires, would it be possible to update all the mesecons when there´s a camera update? Just an idea(I´ve lots of ideas for the mod).
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Wed Oct 03, 2012 20:20

@cornernote: Up/Down pistons are, as of now, unaffected. That is, they still have all the old piston bugs. You will most likely need to replace them after they have been folded into normal pistons, or maybe I'll add an ABM that does it automatically.

@CTMN: I'm not sure what that means, but I tried to connect both normal and insulated mesecon to powered and unpowered normal mesecon, both worked fine. In response to your camera update suggestion, updating is not the problem; having the entire circuit loaded in memory is. For example, in a long telegraph wire, you would send out a signal and it would abruptly stop at the chunk limit. If we had the wire update when you get near it, it would not be able to see the power source or the signal you are sending. In other words, it is still incorrect.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

CTMN
Member
 
Posts: 113
Joined: Sat Aug 25, 2012 15:02

by CTMN » Thu Oct 04, 2012 05:44

@Temperest: U understood it right. Maybe I had lags.

late edit: I know what´s the problem. The insulated mesecons only connect if they´re not in front me. When I connect them, they turn 90 degrees to my direction.

I propose to make a pump. When powered and there's water flow around it, it would fill every empty block with water source.
Last edited by CTMN on Mon Oct 08, 2012 05:29, edited 1 time in total.
 

User avatar
WhirlwaveX
New member
 
Posts: 8
Joined: Sat Sep 15, 2012 20:12

by WhirlwaveX » Sun Oct 14, 2012 18:21

Ive got a question. I need to make a vault door that opens to certain players only. Ive done the wiring already, but i need to know how to place the sign on top of the player detector so it only opens to who i want to. I need to know in which position do i place it, block height from the player detector etc. If someone could direct me to a video even better. Thx in advance.
If you read this text it probably means you´re playing minetest. If you havent already, please do, its awesome. ´Nuff said.
 

Comp52
Member
 
Posts: 56
Joined: Sun Oct 07, 2012 00:49

by Comp52 » Sun Oct 14, 2012 18:48

is there a chance that someone would like to impliament a way to detonate nukes from the nuke mod using mesecons?
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 9 guests

cron