// Logic system refactor

Here I ask your opinion and feedback on specific aspect of the game, or feature I am working on.
User avatar
tsunamayo
Game developer
Posts: 201
Been thanked: 27 times

Mon May 28, 2018 8:09 am

Hi guys,
First as you might know I have been working on a link tool update that will streamline your logic circuit by making multi-gate pointless, all gate smaller (basically 1x1) and the overall link experience more robust. Unfortunately it might break some stuff around - for now old circuits are still working - but as the code is way too different at one point I will have to "unplug" the legacy code and embrace the new one.
Sorry for the pain it might cause some of you who spent time working on some logic, but as the game is in pre-alpha these moments are somewhat inevitable.

I realized that now could be the perfect time to do some needed improvements on the logic side: now the code allows to do certains things, but also as importantly as you guys will have to redo your logic system to some extent why not bundle up the two changes in one, so I dont force you to refresh your logic wired two time (sorry for that btw)!

First lets tackle what I dont like in the current system:
  • The fuzzy aspect is confusing to new players and it dont bring much value. I did it originally so that we can control rotor and sliders, but I feel it is not at the right abstraction level - as I dont see any use to actually manipulate values inside the 0-1 range, we should bring that at the end of the circuit (I think people end up doing that 100% of the time I guess)
  • It is pulse based instead of being "current based" (sorry for the crappy explanation). It means that there is really no active/inactive state, you just propagate a given value during a frame and then each following node do something with it. It is somehow linked to the way things are implemented in code but it seems unnatural, people expects a more physical On/Off state.
Here is what I had in mind to improve it:
  • Make it binary, with an ON/OFF state. Switch would toggle between On/Off, button would either produce a On signal for a short amount of time, or produce a signal as they are hold by the player. (tbd)
  • tight coupling between the gates. That mean that a gate state is directly synced to its predecessor. If you want several link in the same input, then you need to use a Logic gate and select the behaviour: AND, OR, XOR ect. I think it make it more straightforward and reduce the risk of network desync.
  • To control rotor and slider I would introduce the Controler brick. This would replace the constant and mix gate. It would connect to a rotor or slider, and would execute a sequence when active. You could add any number of value:
    1 value: the system would go to the specified value all the time (equivalent to the constant gate),
    2 values (equivalent to the mix gate). In Off state the system would go to value A, when active it would go to value B. Once deactivated it would go back to A.
    3 or more value: system would then go in sequence: A when off, then when activated go to B first then C. Then it would ping pong back to C -> B -> A when deactivated.
  • Each rotor / slider would come with a built-in controller so you dont have to place a brick for simple system.
  • Controller would override themselves, that mean the system would execute the controller which was last activated. I would do this so you can make elevators easily for example, but it is in contradiction with the tight coupling rule - I dont see a better option, do you?
  • Controller can be linked to several systems. It would then be easy to have several systems working in sync, like to open a landing gear trap first, then the landing gear itself. This is inspired by Scrap Mechanic if you played that game.
  • Callback function is built-in in the system itself: link the system to something and it will propagate its value change after it stopped moving.
  • Sliders would act at a constant controller, but could be only connected to system (not to gate)
Do you guys have any feedback on this? It could be cool if you could tell me what potential issues could pop with your current usage of the system. When you think of it it is not that big of change actually, I went trough the use of the logic I had (quite simple I confess), and it seemed to hold up. It just changed some edge case or weird usage we could have of the old system - but I will definitely would like to listen to your feedback.
Also what other games are doing? Sorry it feel a bit rushed but I will most likely commit to that in the coming days as I would like to bundle the two update (logic + link tool)

User avatar
ZachZent
Corporate Mogul
Posts: 76
Has thanked: 3 times
Been thanked: 25 times

Mon May 28, 2018 8:34 am

Not sure if this applies to the update or not, but it has to do with logic and convenience

Currently when you are placing a lot of child entities to make a circle or some shape, you have to enter them into the constant gate and link them all over using quad or duel gates. With this new update, you can skip the quad gates and such, but you need to still link everything. I always found that quite inconvenient when a potential solution would be to use the action bar's configure... mode? and input the values there removing the need for the extra steps and the complications if you get it wrong. Plus if you wanted to edit later it becomes much easier to do.

This comes to the issue the most child entities are used for building and not for... moving stuff, but that is a topic for another time
Image

User avatar
tsunamayo
Game developer
Posts: 201
Been thanked: 27 times

Mon May 28, 2018 8:43 am

ZachZent wrote:
Mon May 28, 2018 8:34 am
Currently when you are placing a lot of child entities to make a circle or some shape,
Actually this is a very big problem for me :twisted:
Sorry to say that but this is something I will need to address one way or another. But I will try to provide backup solutions as much as I can (in this case a circular freeform would make sens). Children entity creep is hugely sub-optimal and lag-inducing, and will definitely wont work well with gameplay ( collisions, ect).

User avatar
Gmunga5
Newbie
Posts: 16
Location: Ireland
Has thanked: 33 times
Been thanked: 22 times

Mon May 28, 2018 9:16 am

Would be cool if you could make sure that connecting a slider to the hyperdrive is still possible as using a slider to go into warp is pretty fun.

User avatar
ZachZent
Corporate Mogul
Posts: 76
Has thanked: 3 times
Been thanked: 25 times

Mon May 28, 2018 10:13 am

tsunamayo wrote:
Mon May 28, 2018 8:43 am
ZachZent wrote:
Mon May 28, 2018 8:34 am
Currently when you are placing a lot of child entities to make a circle or some shape,
Actually this is a very big problem for me :twisted:
Sorry to say that but this is something I will need to address one way or another. But I will try to provide backup solutions as much as I can (in this case a circular freeform would make sens). Children entity creep is hugely sub-optimal and lag-inducing, and will definitely wont work well with gameplay ( collisions, ect).
Yep and I don't see how it can be possible, but even so being able to put in values directly without needing to piss about with all the other linking would still be helpful even after the child entity issue is solved
Image

User avatar
Zarra
Newbie
Posts: 13
Has thanked: 1 time
Been thanked: 4 times

Mon May 28, 2018 10:33 am

Well the logic definitely needs work. I had a simple interrupter circuit on my guns, just a switch on my cockpit console, and a hotkey command going onto an AND gate. this fed into a timer circuit to produce auto rapid fire on the guns I have. but after triggering once it would keep firing. it was after finding this diagram by Talrey that I got it to work by adding a constant of zero to the hotkey command pin on the AND gate.

it almost seems like the Hotkey Command, Router gate and some other blocks don't properly send an off signal when you release the hot key or the output pin is no longer active, keeping the the receiving logic active.

with the new proposed liking system, that doesn't require exact pin linking, could brake even this odd interrupter circuit.

User avatar
tsunamayo
Game developer
Posts: 201
Been thanked: 27 times

Mon May 28, 2018 11:52 am

Zarra wrote:
Mon May 28, 2018 10:33 am
it almost seems like the Hotkey Command, Router gate and some other blocks don't properly send an off signal when you release the hot key or the output pin is no longer active, keeping the the receiving logic active.
It is a bug indeed - it is the first time I hear of it, I will fix it.

User avatar
schlid
Entrepreneur
Posts: 36
Location: Great Britain
Has thanked: 30 times
Been thanked: 51 times

Mon May 28, 2018 3:16 pm

Would it be possible to not ditch the fuzzy 0-1 range and also swap over to a current based system? Going straight to binary, although more familiar with those who've played minecraft starmade etc takes away a lot of the neat things you can do, utilising such a range of values.

The fuzzy logic allows for so much more currently, and swapping to a straight binary ON/OFF system would damage the possibilities. I understand your solution to getting a full range of movement from blocks would be the "controller block", however there are plenty of cases inside a circuit where it is far more beneficial to be able to use the 0-1 range instead of two states.

It's worth mentioning swapping to a binary system would inherently make a lot of (advanced maybe?) circuits a lot larger, as many utilise contraptions like Noxy gates, to split signals at a specific point in the 0-1 range. This seems really counter intuitive, especially with the recent mention of wanting to compact some logic blocks.

I think a lot of the logic nerds here are genuinely here because of the fuzzy logic and the creative possibilities with it, and although I understand you're trying to create a less steep learning curve, for those who know logic from another game, understanding the fuzzy system isn't a big leap, and for those who have no experience with logic, learning fuzzy is no harder than learning a binary system in my opinion, as you'd have to learn to make circuits that could be produced in a far more compact manner if the game were to continue using fuzzy logic.
fantastique

camzx
Newbie
Posts: 1
Has thanked: 2 times

Mon May 28, 2018 3:24 pm

All I want is a timer, sound block ( for making music), and a randomizer block that puts out a random single ( what ever happens) to the things its connected to maybe even make it configurable for more than one to be picked. would be cool and very helpful for making cool things :D
also making the docking rang further would be a big help.

That is my ideas, Thank you for this amazing game.

User avatar
Gmunga5
Newbie
Posts: 16
Location: Ireland
Has thanked: 33 times
Been thanked: 22 times

Mon May 28, 2018 3:31 pm

So one other idea I had in relation to the new logic blocks is that they could be painted. I think being able to paint them could help for keeping track of all the different logic tracks/circuits in your ship. I don’t know if you would have the hologram be painted or the actual brick but I do think this would help follow the system. One other idea is that if you add some form of link view mode the links could use the colour of the gate they leave from.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest