Trailmakers
Analog sensors and math-bricks
Being restricted to just bang-bang mechanisms, having to add dozens of extra bricks to get additional input/output levels, or widely complex setups to try to build "chips" out of logic gates; leaves off tons of potential on what could be created.

Besides the basic math operations, it would also be useful to have things like Nth power/Nth root, trigonometry functions, value storage bricks etc.

Oh, and also allow mechanical bricks like wheels, suspension, hinges etc, to provide input values related to their functions (wheel speed and torque, spring stretch/compression, hinge angle/torque etc).
Last edited by Poison Dart Frag; Apr 1, 2022 @ 4:15pm
< >
Showing 1-15 of 25 comments
alvaroping1 Apr 1, 2022 @ 4:34pm 
Originally posted by Poison Dart Frag:
Being restricted to just bang-bang mechanisms, having to add dozens of extra bricks to get additional input/output levels
you don't need dozens of logic gates to get additional input/output levels, just 9 blocks are enough for 10000 positive power levels (if you allow negative levels, you only need 5 blocks for 20000 levels)

Originally posted by Poison Dart Frag:
or widely complex setups to try to build "chips" out of logic gates;
How complex a chip is depends entirely on what you want it to do. However, as a rule of thumb, the more complex it is the more specific use it has and thus the more unlikely it is for a block with that exact functionality to be added. Additionally, the point of the game is making things yourself with the tools provided, which is why if it can already be achieved it has a low chance of being added

Originally posted by Poison Dart Frag:
Besides the basic math operations, it would also be useful to have things like Nth power/Nth root, trigonometry functions, value storage bricks etc.
Basic math operations of addition/subtraction/multiplication on output values are already a thing. Powers/roots/trigonometry functions would be very rarely used (specially when you consider that the input can only be on the [-1, 1] range), and output value storage can already be achieved with just 2 blocks

Originally posted by Poison Dart Frag:
Oh, and also allow mechanical bricks like wheels, suspension, hinges etc, to provide input values related to their functions (wheel speed and torque, spring stretch/compression, hinge angle/torque etc).
Wheel speed/torque can be achieved by reading the speed of the vehicle or the power with which you are activating the engines. Spring stretch/compression can be read with distance sensors. Hinge angle can be read from the power with which you are activating them. Those blocks aren't sensors, so it doesn't make much sense for them to send an output (and that output would have to have a true/false value attached, making it make even less sense as you now have to define which state is active and which is inactive)
Last edited by alvaroping1; Apr 1, 2022 @ 4:38pm
Poison Dart Frag Apr 1, 2022 @ 4:51pm 
So for example, if I wanna get the pitch of a quadruped vehicle at a sub-degree resolution, and adjust the angle of hips and knee joints of the front and back legs to make the body stay level regardless of the the ground, how would I go about it?

How about getting proprioception data for a compliant robot arm to detect when it's colliding with something and where the the collision is happening?

Adjust the speed of the wheels on a self-balancing vehicle with a PID system to keep it stable, accounting for when it's carrying additional weight picked with an electromagnet?

Modulate pistons on a car with active suspension?
alvaroping1 Apr 1, 2022 @ 5:03pm 
Originally posted by Poison Dart Frag:
So for example, if I wanna get the pitch of a quadruped vehicle at a sub-degree resolution, and adjust the angle of hips and knee joints of the front and back legs to make the body stay level regardless of the the ground, how would I go about it?
Too angled in one direction->angle on the opposite. That's already done on stabilization systems with a single pair of either angle sensors (absolute angle) or distance sensors (angle relative to the ground) per axis

Originally posted by Poison Dart Frag:
How about getting proprioception data for a compliant robot arm to detect when it's colliding with something and where the the collision is happening?
Distance sensors. I don't see how analog outputs can help with that at all, since 2 objects are either colliding or not, there is no in between state

Originally posted by Poison Dart Frag:
Adjust the speed of the wheels on a self-balancing vehicle with a PID system to keep it stable, accounting for when it's carrying additional weight picked with an electromagnet?
Same circuit as for the first case

Originally posted by Poison Dart Frag:
Modulate pistons on a car with active suspension?
Analog input just changes the speed of pistons, so you wouldn't get much more control with them. The method will still be distance sensors to measure the distance to the ground
Last edited by alvaroping1; Apr 1, 2022 @ 5:04pm
Poison Dart Frag Apr 1, 2022 @ 5:46pm 
For the quadruped and self-ballancing situations; I don't see how that could work; can you please provide some simple proof-of-concept? I haven't found a way to calculate a given shoulder and elbow angles, much less how to have hinges go to specific values; and for self-balancing, there's a reason FPV quadcopters use advanced flight-controller chips and just a bang-bang mechanism to toggle power to the motors in order to keep the drone at the desired orientation.

For the compliant robot arm; are you sugesting coating the whole surface of the arm with distance sensors, and wiring a complicated logic system to calculate the directions of all those depth "pixels", doing the trig and comparing the dozen sensors with logic gates?


The suspension also has a similar issue as the self-balancing, bang-bang allows for no nuance...
alvaroping1 Apr 2, 2022 @ 1:41am 
Originally posted by Poison Dart Frag:
For the quadruped and self-ballancing situations; I don't see how that could work; can you please provide some simple proof-of-concept? I haven't found a way to calculate a given shoulder and elbow angles, much less how to have hinges go to specific values; and for self-balancing, there's a reason FPV quadcopters use advanced flight-controller chips and just a bang-bang mechanism to toggle power to the motors in order to keep the drone at the desired orientation.
you don't need to give the servos/hinges specific values to go to, you just need to tell them when they are too angled in a given direction to make them rotate on the opposite one. With hinges specifically you can't also give them precise values at all from analog inputs, since their angle is not a linear function of the input value (it's roughly exponential, but not quite). To measure when they are too angled in one direction, you can use a pair of either angle sensors (absolute angle) or distance sensors (angle relative to the ground, they need to be tilted to point donwards and have their distance adjusted so the ground is barely out of range when it's in the correct orientation. That way, whenever it tilts a bit, one of the sensors will be activated, and which one did activate tells you in which direction it tilted). Analog output wouldn't change this part, it would just be a different way to activate the servos

For self balancing, you can use the same circuit. It's just a matter of choosing what should be activated (and on which direction if necessary) whenever the sensors detect the creation is tilted on a given direction

Originally posted by Poison Dart Frag:
For the compliant robot arm; are you sugesting coating the whole surface of the arm with distance sensors, and wiring a complicated logic system to calculate the directions of all those depth "pixels", doing the trig and comparing the dozen sensors with logic gates?
Yes and no. Yes, you would need to coat the whole surface with distance sensors, and analog outputs isn't going to change that. However, you wouldn't need any circuit than at most a couple OR gates to combine the sensors on some areas. Where the collision is is given directly by which sensor was activated. Since analog signals can only contain a single number in the range [-1, 1], you can't compress the position of the signal on a single output (as a single number isn't enough to describe a position in a 2d surface)

Originally posted by Poison Dart Frag:
The suspension also has a similar issue as the self-balancing, bang-bang allows for no nuance...
Again, analog output wouldn't change anything there as analog inputs just determine the speed of pistons. They don't determine their length
Poison Dart Frag Apr 2, 2022 @ 4:09pm 
Considering this and the other conversations we're having, I'm starting to get the feeling you're deliberately being contrarian, vague, and abstruse, to troll people...
Last edited by Poison Dart Frag; Apr 2, 2022 @ 5:41pm
Darkling Apr 6, 2022 @ 3:04pm 
Originally posted by Poison Dart Frag:
Considering this and the other conversations we're having, I'm starting to get the feeling you're deliberately being contrarian, vague, and abstruse, to troll people...
bingo
Precache Apr 6, 2022 @ 8:43pm 
I think the problem is that while a lot of things are possible, in that yes you could build a Turing machine in trailmakers and therefore do general purpose computing, most people want to build cars not computers.

Using an x86 chip to simulate logic gates to simulate an x86 chip seems like madness. I just want a nice scripting language like lua.
Poison Dart Frag Apr 7, 2022 @ 4:51am 
A script brick would indeed be extremely useful.

To keep with the "brick" mentality and maintain controller compatibility, perhaps the scripting interface could be something based on/inspired Google's Blockly programming system, where code can be "written" using just the mouse by dragging commands, variables etc, and placing them on the "connectors" of previously added blocks, in a visual structure that's pretty much equivalent to code in text editor with very fancy formatting. I'm trying it on the site right now, and looks like by default it might not let you edit the raw code text directly, but that doesn't sound like it would be a big challenge for developers to add; I'm not sure if there's already a way to convert raw code into the block structure though, so there's a chance editing the code directly might be a one-way thing unless a reconversion function is implemented.

Oh, looks like they mention another similar project, called PencilCode, which has a editor component called Droplet that can be used independently, which does allow back and forth conversion between blocks and text.
Last edited by Poison Dart Frag; Apr 7, 2022 @ 5:00am
alvaroping1 Apr 7, 2022 @ 5:24am 
Originally posted by Poison Dart Frag:
Considering this and the other conversations we're having, I'm starting to get the feeling you're deliberately being contrarian, vague, and abstruse, to troll people...
i didn't post a testbed because due to how simply and commonly used the stabilization circuit is, i didn't think it was necessary. If you need it, here you have, it's quite literally just checking if it's tilted on one direction and tilting itself on the opposite if it is. Each half is completely independant, the side with the angle sensors is stabilized to be always flat while the one with distance sensors is stabilized to be parallel to the ground. Example [imgur.com], the wobbliness can be greately reduced by tinkering a bit with the values, but the best possible ones change a lot from vehicle to vehicle
https://steamcommunity.com/sharedfiles/filedetails/?id=2790650774

Originally posted by Precache:
I think the problem is that while a lot of things are possible, in that yes you could build a Turing machine in trailmakers and therefore do general purpose computing, most people want to build cars not computers.

Using an x86 chip to simulate logic gates to simulate an x86 chip seems like madness. I just want a nice scripting language like lua.
You don't really need to simulate a full computer for anything (unless your goal is specifically designing a full computer). The most commonly used circuits outside of logic focused builds use less than 10-15 gates at most, with ~2-5 being the average. For circuits as simple as that, logic gates are much easier to use for people who don't know programming already (which is the vast majority of the players) as their behaviour is much simpler and thus easier to learn than a full programming language. Additionally, a full programming language would still have to be limited by the way inputs/outputs work for it to be compatible with other blocks (it can only have a single output which is always sent to all connected blocks, inputs/outputs must be on the [-1, 1] range, and it can't differentiate between inputs), which greatly limits what it could do
Poison Dart Frag Apr 7, 2022 @ 6:06am 
Just "tinkering with values" doesn't help to automatically adjust for changes in terrain type, breaking pieces, catching heavy things with the tractor beam etc
Last edited by Poison Dart Frag; Apr 7, 2022 @ 6:07am
Poison Dart Frag Apr 7, 2022 @ 6:30am 
Btw, nice cheating, almost caught me. If you disable the sensors, the thing stays rigid, there's nothing needing to balance there...
Last edited by Poison Dart Frag; Apr 7, 2022 @ 6:31am
Poison Dart Frag Apr 7, 2022 @ 6:55am 
Another illustration of why your approach is bogus: https://steamcommunity.com/sharedfiles/filedetails/?id=2790686101
alvaroping1 Apr 7, 2022 @ 9:55am 
Originally posted by Poison Dart Frag:
Just "tinkering with values" doesn't help to automatically adjust for changes in terrain type, breaking pieces, catching heavy things with the tractor beam etc
Once you figure out the correct values for your use case, there is no need to adjust them on the fly

Originally posted by Poison Dart Frag:
Btw, nice cheating, almost caught me. If you disable the sensors, the thing stays rigid, there's nothing needing to balance there...
you can manually rotate the platforms with w/s, which is why there are 2 sets of servos on each side. The first set can be controlled manually to tilt the platforms, while the second set is controlled automatically by the sensors themselves. In practice, you don't have the first set (since it's used for testing) and the second set can be replaced by whatever you want to use to stabilize it (usually heli engines due to the high rotation force they can apply as well as how fast they can change the direction of that rotation, i just used servos since you originally asked to stabilize it with mechanical connections). If you look at the gif i posted, you can see that i was activating the first set of servos for most of the time (you can see the base of the second set was being rotated), so the sensors where actively counteracting the rotation applied by the first set of servos. If you disable the sensors and repeat that, the platforms won't stay horizontal/parallel to the ground

Originally posted by Poison Dart Frag:
Are you saying this is optimal behavior? https://steamcommunity.com/sharedfiles/filedetails/?id=2790662129
That behavior is only partially related to the stabilization. It's true that one part comes from the wobbliness of the stabilization (which can be reduced by a lot by tinkering with the values), however most comes from the fact that that was a test bed and not something you would implement directly on a creation. Particularly, you wouldn't have the first set of servos as they are only used for testing purposes as i have already explained, and those are the main cause of the problem. Basically that design has 2 mechanical blocks directly attached to eachother, which means the total mass between the mechanical blocks is pretty much 0kg. Meanwhile, attached to the second mechanical block there are ~20kg. Mechanical blocks which hold a lot more weight than their base has are known to cause issues, leading to them spontaneously wobblying a lot. In this case, the second set of servos is holding ~20kg while having pretty much 0kg on their base, which is why you can see that issue happening. If you add a 30kg weight between the servos, most of the issue dissappears and you are left again with just the wobblying from the stabilization

Originally posted by Poison Dart Frag:
Another illustration of why your approach is bogus: https://steamcommunity.com/sharedfiles/filedetails/?id=2790686101
and what did you expect by doing that? That's not how you are supposed to use it, you shouldn't even be using both stabilization methods at once (i just put them on the same blueprint to share it more easily, but as i had already said each half of the build is independant and stabilized to different positions). You didn't modify anything while changing what needed to be stabilized. If you wanted the middle to be stabilized, then you need to only use a single pair of sensors, attach them to the seat and connect them to the sensors on both sides. Additionally, for the system to be able to mechanically work, you need to add weight to the legs/attach them to the ground with anchor pins, since otherwise whenever the servos are activated they will rotate the legs as they are easier to rotate than the seat. After you do that, it works flawlessly again
Last edited by alvaroping1; Apr 7, 2022 @ 9:58am
< >
Showing 1-15 of 25 comments
Per page: 1530 50

Date Posted: Apr 1, 2022 @ 4:10pm
Posts: 25