[Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]
- ThomasMonroe
- Member
- Posts: 286
- 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
i never thought about a switch case, *faceslap*
even though i knew it was there *another faceslap*
even though i knew it was there *another faceslap*
I don't make messes, I just, er...disturb the local entropy!
- Desour
- Member
- Posts: 1473
- Joined: Thu Jun 19, 2014 19:49
- GitHub: Desour
- IRC: Desour
- 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
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.Hybrid Dog wrote:You could implement switch-case in luacontroller.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
- ThomasMonroe
- Member
- Posts: 286
- 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
duh that why i never thought of it
I don't make messes, I just, er...disturb the local entropy!
- v-rob
- Developer
- Posts: 971
- 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
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.
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:
SCS:
Nameless Gate:
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:
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.
The first things would be an SCR and an SCS.
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:
SCS:
Nameless Gate:
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:
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.
-
- 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
How about replacing logic gates with transistors?
- v-rob
- Developer
- Posts: 971
- 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
Transistors should be made, but logic gates should still be kept. They save space.ABJ wrote:How about replacing logic gates with transistors?
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.
-
- 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
You mean if both inputs are same?
- Linuxdirk
- Member
- Posts: 3219
- Joined: Wed Sep 17, 2014 11:21
- In-game: Linuxdirk
- Location: Germany
- Contact:
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
https://en.wikipedia.org/wiki/XNOR_gate#Alternativesv-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.
:)
- v-rob
- Developer
- Posts: 971
- 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
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.
-
- 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
That is why I said transistors.
- Linuxdirk
- Member
- Posts: 3219
- Joined: Wed Sep 17, 2014 11:21
- In-game: Linuxdirk
- Location: Germany
- Contact:
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
Actually you can build all logic gates using NAND gates only. So all gates except NAND gates are just space savers.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.
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)
- Desour
- Member
- Posts: 1473
- Joined: Thu Jun 19, 2014 19:49
- GitHub: Desour
- IRC: Desour
- 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
@v-rob: We don't need a XNOR gate, just use a fpga.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
- v-rob
- Developer
- Posts: 971
- 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
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.
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.
Full rainbow now! :)
Textures are attached.
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")
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")
Textures are attached.
- Attachments
-
- other_lightstones.zip
- lightstone textures
- (2.47 KiB) Downloaded 114 times
- Desour
- Member
- Posts: 1473
- Joined: Thu Jun 19, 2014 19:49
- GitHub: Desour
- IRC: Desour
- 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
@v-rob: The forum is the wrong page for this, go to the github mesecons repository.
Btw, there were already discussions for more lightstones.
Btw, there were already discussions for more lightstones.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
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.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.
- v-rob
- Developer
- Posts: 971
- 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
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.
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
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.
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
We did just, what you asked for using pressure plates.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.
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
blackjack
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
Thanks @blackjackWe 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 ...
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.
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
We did it like in 'Mad Max - Beyond Thunderdome"ratmix wrote:Also I need to evacuate & reset the pvp area when only 1 player is left
< 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
blackjack
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
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
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
- Desour
- Member
- Posts: 1473
- Joined: Thu Jun 19, 2014 19:49
- GitHub: Desour
- IRC: Desour
- 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
@bosapara: Nice! I thought, something like that would lag too much.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
Thanx you very much.DS-minetest wrote:@bosapara: Nice! I thought, something like that would lag too 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
- Desour
- Member
- Posts: 1473
- Joined: Thu Jun 19, 2014 19:49
- GitHub: Desour
- IRC: Desour
- 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
I've tried to build something similar:
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?
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?
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
Yes, any sound was decoded as an example note "c" of 1th octave = "a", "c#" = "b" and etcDS-minetest wrote:Also how did you make the music, did you write it in code?
Who is online
Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 44 guests