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

User avatar
ThomasMonroe
Member
Posts: 279
Joined: Tue Apr 04, 2017 16:21
GitHub: ThomasMonroe314
IRC: ThomasMonroe TMcSquared
In-game: ThomasMonroe TMcSquared
Location: Wherever I am at

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by ThomasMonroe » Post

i never thought about a switch case, *faceslap*
even though i knew it was there *another faceslap*
Projects|:*sigh* school: :Qub³d: :Legends Of Survival: :making people think:
I don't make things messy, I just *cough* disturb the local entropy.

User avatar
DS-minetest
Member
Posts: 1144
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: DS-minetest
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by DS-minetest » Post

Hybrid Dog wrote:You could implement switch-case in luacontroller.
AFAIK lua has no switch-case. It hasn't even labels, so it would make no sense. But you can make your own switch-case.
Note that I've recently renamed myself on github and co. to "Desour". (I'm bad at naming things.)
Feel free to call me DS.

User avatar
ThomasMonroe
Member
Posts: 279
Joined: Tue Apr 04, 2017 16:21
GitHub: ThomasMonroe314
IRC: ThomasMonroe TMcSquared
In-game: ThomasMonroe TMcSquared
Location: Wherever I am at

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by ThomasMonroe » Post

duh that why i never thought of it
Projects|:*sigh* school: :Qub³d: :Legends Of Survival: :making people think:
I don't make things messy, I just *cough* disturb the local entropy.

User avatar
v-rob
Developer
Posts: 792
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by v-rob » Post

I found some interesting ideas for mesecons. I know my earlier ideas were bad, but these ones, I hope, are better.

The first things would be an SCR and an SCS.

Image

The SCR (Silicon Controlled Rectifier) is like a diode, except for power to go through it, it needs a shock of power from the gate. When power goes through the gate, the gate doesn't need power anymore, and the SCR will act like a diode until the main power turns off.

The SCS (Silicon Controlled Switch) is the same, except it has another gate called the anode gate. This turns off the power in the same way as the gate turns it on.

A third gate could be made with only the anode gate and no normal gate, and power would always get through until turned off with the anode gate. As far as I know, this doesn't actually exist, so I can't show an abbreviation.

An interesting thing about these logic gates is that they can have multiple gates and anode gates.

Manually made gates
SCR: Image
SCS: Image
Nameless Gate: Image

An LED would be useful. It would be a diode and a flow sensor in one, plus the fact that it can come in many colors. A small lightbulb would be another good flow sensor, and it wouldn't have a diode built in. The main difference between these and lightstones would be that power could flow through the lightbulb and the LED as opposed to just stopping like the lightstones.

A useful thing would be a switch plant. The plant would have two ports for producing power and would act similarly to a blinky plant. It would switch from each port every three seconds. This could be made with two blinky plants, but it is extremely annoying to have to synchronize them properly. Delayers don't work for this, since they take time to turn off.

I would like a capacitor similar to this:

Image

The capacitor would be charged through one wire, and once it is charged, the light in the corner would turn green, and power could be released by turning on another wire, by clicking on it with the mouse, or automatically. I don't really know how this would be done. Different capacitors could hold different amounts of power, like one second, three seconds, five seconds, ten seconds, a minute, etc.

There are solar panels, but what if there was a lunar panel that makes electricity at night? You could make one with a solar panel and a not gate, torch, or an xor gate, but those aren't compact. A lunar panel could be red or something and crafted like this:

[--, --, --]
[solar_panel, mesecon_torch, mesecon]
[--, --, --]

A different craft could be used. That one is just a sample of what it could be.

Lastly, I would like a photoresistor. When it has light, it lets power through. When it is dark, it doesn't. Similar to the solar panel, I would like an inverted one. It could have a similar craft and be called a photoconductor.

I hope some of these things can be implemented into mesecons.
GUI Core Developer | My Best Mods: Bridger - Slats - Stained Glass | To contact me, send a PM

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by ABJ » Post

How about replacing logic gates with transistors?

User avatar
v-rob
Developer
Posts: 792
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by v-rob » Post

ABJ wrote:How about replacing logic gates with transistors?
Transistors should be made, but logic gates should still be kept. They save space.

I forgot something. There is a logic gate not included in mesecons: XNOR. The XNOR logic gate powers its output if both inputs are powered or not powered. If only one is powered, then the output is not powered. Its symbol looks like XOR, but it has a circle at the end, like the NOT gate.
GUI Core Developer | My Best Mods: Bridger - Slats - Stained Glass | To contact me, send a PM

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by ABJ » Post

You mean if both inputs are same?

User avatar
Linuxdirk
Member
Posts: 2667
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by Linuxdirk » Post

v-rob wrote:There is a logic gate not included in mesecons: XNOR. The XNOR logic gate powers its output if both inputs are powered or not powered. If only one is powered, then the output is not powered. Its symbol looks like XOR, but it has a circle at the end, like the NOT gate.
https://en.wikipedia.org/wiki/XNOR_gate#Alternatives

:)

User avatar
v-rob
Developer
Posts: 792
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by v-rob » Post

Oh... I never thought of that. Then again, the XNOR gate would save space, just like how the OR can be two diodes but they made a gate anyway. Interesting though. I'll keep that in mind if the XNOR isn't put in mesecons.
GUI Core Developer | My Best Mods: Bridger - Slats - Stained Glass | To contact me, send a PM

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by ABJ » Post

That is why I said transistors.

User avatar
Linuxdirk
Member
Posts: 2667
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by Linuxdirk » Post

v-rob wrote:Oh... I never thought of that. Then again, the XNOR gate would save space, just like how the OR can be two diodes but they made a gate anyway. Interesting though. I'll keep that in mind if the XNOR isn't put in mesecons.
Actually you can build all logic gates using NAND gates only. So all gates except NAND gates are just space savers.

But I'm a little torn about this. Either only use the most common gates. (In the end XNOR isn't that wide spread.) Or implement XNOR (It's the only logic gate missing from the standard logic gates)

User avatar
DS-minetest
Member
Posts: 1144
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: DS-minetest
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by DS-minetest » Post

@v-rob: We don't need a XNOR gate, just use a fpga.
Note that I've recently renamed myself on github and co. to "Desour". (I'm bad at naming things.)
Feel free to call me DS.

User avatar
v-rob
Developer
Posts: 792
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by v-rob » Post

Seeing as no one will make it, I made the XNOR gate. Anyone who wants to can just copy this into the logic gates' init.lua, or someone could actually put this into the main mod.

Code: Select all

register_gate("xnor", 2, function (val1, val2) return not (val1 or val2) or (val1 and val2) end,
	{{"mesecons:mesecon", "", ""},
	 {"mesecons_materials:silicon", "mesecons:mesecon", "mesecons_torch:mesecon_torch_on"},
	 {"mesecons:mesecon", "", ""}},
	"XNOR Gate")
Make a different craft if you want. I don't really care. Also, the symbol is nearly impossible with the space provided in the texture, so make your own.

I did suggest other things, so I would like your input on those, too. I can't program the transistors I had an idea for (I just guessed on the XNOR until I got lucky), and I would really like to have them, along with most of the rest of my ideas.

By the way, I made an orange and a purple lightstone. Put this at the bottom of the lightstones' init.lua if you want them.

Code: Select all

mesecon.lightstone_add("purple", "dye:violet", "jeija_lightstone_purple_off.png", "jeija_lightstone_purple_on.png")
mesecon.lightstone_add("orange", "dye:orange", "jeija_lightstone_orange_off.png", "jeija_lightstone_orange_on.png")
Full rainbow now! :)

Textures are attached.
Attachments
other_lightstones.zip
lightstone textures
(2.47 KiB) Downloaded 66 times
GUI Core Developer | My Best Mods: Bridger - Slats - Stained Glass | To contact me, send a PM

User avatar
DS-minetest
Member
Posts: 1144
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: DS-minetest
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by DS-minetest » Post

@v-rob: The forum is the wrong page for this, go to the github mesecons repository.
Btw, there were already discussions for more lightstones.
Note that I've recently renamed myself on github and co. to "Desour". (I'm bad at naming things.)
Feel free to call me DS.

JoshMars
Member
Posts: 108
Joined: Sat May 17, 2014 23:24
In-game: rubber UbuntuJosh

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by JoshMars » Post

DS-minetest wrote:@v-rob: The forum is the wrong page for this, go to the github mesecons repository.
Btw, there were already discussions for more lightstones.
Sometimes it's nice to put little additions into the forum because they're not likely to be pulled, don't merit a whole new branch, and fit nicely here for anyone else who is interested.

User avatar
v-rob
Developer
Posts: 792
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by v-rob » Post

Sorry if I shouldn't have done that. I just want people's input on my ideas, so I put the XNOR code there to stop the argument over it. Could some people just give me their honest opinions on my ideas? If it matters that much just for this to be on GitHub, tell me. Thanks.
GUI Core Developer | My Best Mods: Bridger - Slats - Stained Glass | To contact me, send a PM

User avatar
ratmix
Member
Posts: 148
Joined: Mon May 01, 2017 19:45
In-game: ratmix
Contact:

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by ratmix » Post

Is there a way to perform an action if 'x' number of players is detected? For example, I would like to teleport players to a PvP area if there are 4 or more in a waiting room. There are many other applications I need this for and would greatly expand our possibilities.
King of the Hill :: Modern Warfare Server RATMIX.COM:30000 | King of the Hill Community Site

blackjack
Member
Posts: 25
Joined: Thu Jan 07, 2016 09:54
Location: Germany

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by blackjack » Post

ratmix wrote:Is there a way to perform an action if 'x' number of players is detected? For example, I would like to teleport players to a PvP area if there are 4 or more in a waiting room. There are many other applications I need this for and would greatly expand our possibilities.
We did just, what you asked for using pressure plates.
In our world, we port 2 players to the PvP arena as soon as both went onto the plate.
Can also be done with 4 easily ...
Best regards
blackjack

User avatar
ratmix
Member
Posts: 148
Joined: Mon May 01, 2017 19:45
In-game: ratmix
Contact:

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by ratmix » Post

We did just, what you asked for using pressure plates.
In our world, we port 2 players to the PvP arena as soon as both went onto the plate.
Can also be done with 4 easily ...
Thanks @blackjack
The only problem is that two or more players can stand on the same pressure plate so the solution may fail. Also I need to evacuate & reset the pvp area when only 1 player is left, so the entire pvp area and player's building blocks would have to be made from pressure plates.
King of the Hill :: Modern Warfare Server RATMIX.COM:30000 | King of the Hill Community Site

blackjack
Member
Posts: 25
Joined: Thu Jan 07, 2016 09:54
Location: Germany

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by blackjack » Post

ratmix wrote:Also I need to evacuate & reset the pvp area when only 1 player is left
We did it like in 'Mad Max - Beyond Thunderdome"
< Two men enter, one man leave > :D

From each pressure plate, just one player (the nearest) will be ported. So two will enter the PvP arena. One will respawn, the other has to leave through the one and only exit gate.

Before entering the arena, everyone has to empty his / her inventory.
Then all players will get the same equipment, tools, weapons (on our server).
Best regards
blackjack

User avatar
bosapara
Member
Posts: 618
Joined: Fri Apr 07, 2017 08:49

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by bosapara » Post

I made the Music Building Machine using lua controllers, noteblocks, digiline lcd display and etc

24 notes, 2 octaves

In the memory at the moment at least 6 melodies

Here you can see the screen and video

https://www.youtube.com/watch?v=EZDCdbw9WDQ

Image

User avatar
DS-minetest
Member
Posts: 1144
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: DS-minetest
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by DS-minetest » Post

@bosapara: Nice! I thought, something like that would lag too much.
Note that I've recently renamed myself on github and co. to "Desour". (I'm bad at naming things.)
Feel free to call me DS.

User avatar
bosapara
Member
Posts: 618
Joined: Fri Apr 07, 2017 08:49

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by bosapara » Post

DS-minetest wrote:@bosapara: Nice! I thought, something like that would lag too much.
Thanx you very much.

I was helped by really great coder.

Soon will be completed "Drum & Piano" machine, it is 31 sounds type

Here you can see preview of 1.0 and 1.1 version of this building
1.0 https://www.youtube.com/watch?v=8InNIsEqxT8
1.1 https://www.youtube.com/watch?v=5r6u5llpFMI

User avatar
DS-minetest
Member
Posts: 1144
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: DS-minetest
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by DS-minetest » Post

I've tried to build something similar:
Image
screenshot_20170510_174509.png
(62.38 KiB) Not downloaded yet
It doesn't work as good as your machine. Perhaps the reason for that is lag. Also how did you make the music, did you write it in code?
Note that I've recently renamed myself on github and co. to "Desour". (I'm bad at naming things.)
Feel free to call me DS.

User avatar
bosapara
Member
Posts: 618
Joined: Fri Apr 07, 2017 08:49

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by bosapara » Post

DS-minetest wrote:Also how did you make the music, did you write it in code?
Yes, any sound was decoded as an example note "c" of 1th octave = "a", "c#" = "b" and etc

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests