Jump to content
Stray Fawn Community
  • 0

Scripting in addition to Logic Blocks


Booxi

Post

i build some ships with huge amounts of logic blocks.
its getting very complicated and wibbily wobbily.

so i thought maybe its possible to implement an scripting Block.
an block where you can do the logic stuff

in a console (like lua)
or like an graphical overlay
like in scratch where you can drag and drop your Elements
to create Logic

i think it will be more easy when you controll your sensors with such an block

the Pic shows an example of scratch, for guys who dosent know what it looks like

  • Like 2
Link to comment
Share on other sites

13 replies to this post

Recommended Posts

  • 0

I have concerns that oversimplifying the logic would hurt gameplay, but if you're building something so large that it's becoming unstable from the amount of logic, then yeah that becomes a bit of a problem.  I think it'd be a great idea as long as it's not allowed in sumo, and if it was locked behind some research it'd still encourage new players to play with and learn the logic gates before giving them a part that replaces them all

  • Like 2
Link to comment
Share on other sites

  • 0

There have been a number of suggestions for a 'computer' or 'processor' block, which would contain a number of logic blocks in a second grid or table that you could open up.  It would work as it is currently, except that the logic blocks would all operate from within a single part on your drone. (Keep that part safe!)

  • Like 5
Link to comment
Share on other sites

  • 0
On 10/10/2018 at 7:40 AM, Lurkily said:

There have been a number of suggestions for a 'computer' or 'processor' block, which would contain a number of logic blocks in a second grid or table that you could open up.  It would work as it is currently, except that the logic blocks would all operate from within a single part on your drone. (Keep that part safe!)

I like this idea a lot!

You could have, for example, 3 inputs and 1 output.  Do whatever you want to inside the block with basic match and boolean logic.

  • Like 2
Link to comment
Share on other sites

  • 0
On 10/10/2018 at 12:34 PM, D.Mentia said:

I have concerns that oversimplifying the logic would hurt gameplay, but if you're building something so large that it's becoming unstable from the amount of logic, then yeah that becomes a bit of a problem.  I think it'd be a great idea as long as it's not allowed in sumo, and if it was locked behind some research it'd still encourage new players to play with and learn the logic gates before giving them a part that replaces them all

 

Actually, it'd SIGNIFICANTLY spice up sumo for the advanced builders. Being able to program complex behaviour can make for super interesting strategies.

 

Could always make a second sumo league where the advanced logic parts are allowed.

  • Like 4
Link to comment
Share on other sites

  • 0
4 hours ago, OsoMoore said:

I like this idea a lot!

You could have, for example, 3 inputs and 1 output.  Do whatever you want to inside the block with basic match and boolean logic.

The idea is more that logic would work as it does now.  The processor wouldn't have inputs and outputs, it would just be a box you can put logic parts in to keep your drone uncluttered.  Part count for Sumo should also be unaffected, it should count the logic parts in a processor.

I can see a 'Logic League' though, where a certain amount logic parts aren't counted toward the total - for example, say you get 20 logic blocks for free.

  • Like 2
Link to comment
Share on other sites

  • 0

Mostly I'm just reminded of an old mod for GMod called WireMod; it involved wiring up simple gates in the source engine to do whatever you want, usually attaching them to thrusters and sensors for flight.  Then, they eventually released Expression chips, which allowed you to get rid of all the gates and just write code - and over time, these chips evolved to be able to alter the laws of time and space, up to and including spawning props and applying forces to them without an origin.  

As you might expect, the player population dropped massively because doing anything in it was trivialized - a build that used to take hours of complex thought and wiring instead took 2 minutes of coding, and very quickly everything that could be done, had been done.

The point I'm getting at is, a game like this is successful at least partially because of the complexity in using basic logic.  If the basic logic could be replaced by code, or by one chip that does all the logic, it would remove pretty much all of the challenge in automation.  If we wanted to code, we'd open an IDE and do it - a game should provide enough of an abstraction from code that it's a separate challenge entirely

  • Like 2
Link to comment
Share on other sites

  • 0

Very good discussion. Reading this makes me fearful of simply adding scripting :) I still think that we need a good way to allow for advanced logic, making it a bit less cumbersome. But I also see the charm in creating something complex with the rudimentary tools :) It's awesome to see certain things in games (like minecraft e.g.) because it's hard to to :) 

If we would add introduce more complex logic, I think it would probably be in a separate category, where we focus on that and beginners still have a interesting challenge elsewhere, where they can try and grow and then someday graduate from.

Link to comment
Share on other sites

  • 0

Honestly, I think your logic now is quite capable.  The only thing it's really lacking is mathematical operations.  Those you can do now, but it's burdensome and not often useful.  (For instance, if I want a smooth but responsive acceleration, I can't tell an engine to increase thrust by (total thrust) - (current thrust output) /2, which would keep bringing thrust halfway to 100% - initially a quick increase, but a slower, smoother approach to 100%.

It's a useless example, but math and the handling of numbers is what you're really missing - just adding scripting removes the challenges that make the system interesting.

Elsewhere, I repeated a quote from Brandon Sanderson about systems of magic in fiction; it's not what they can do that make them interesting, it's their limitations.

Link to comment
Share on other sites

  • 0

I agree that being able to send numbers over the logic networks instead of current binary style would be nice, if possible, and would let us do a LOT more than we can do now.  But I also feel like it'd be a bit of a whole system overhaul, so even if it can't be done, the current implementation seems perfectly good to me

Link to comment
Share on other sites

  • 0

Agreed; what we have is limiting, but enough, as long as we get sufficient capability in both sensors and logic.

However, you don't have to transmit numbers.  What about a math block that can read the value of specific parts; say you can tag a dynamic thruster, distance sensor, speedometer, or altimeter as a target.  The output would read the thrust setting, distance of detection, speed, altitude, or other math blocks. A particular math block would be able to perform a test - equal, not equal, less than, greater than - and output a keypress or tag while true.

Now that I explain it, a second implementation of another layer of math blocks does sound pretty challenging; just as challenging as implementing logic in the first place. But it doesn't necessarily have to interfere with the current logic blocks, either.  However, it would make drones capable of more nuanced behavior - more capable of reacting to the degree of detection, rather than the yes/no all or nothing approach we have now.  Right now if we need that, we have to  make duplicate sensor and logic sets for each situation where we need the response to differ.

Link to comment
Share on other sites

  • 0

As a member of the wiremod team for gmod I'm clearly against it.

We introduced scriptable logic gates and it quickly resulted in the death of all other logic gates since it made them simply obsolete.
True, there are amazing builds with it, but having wonky drones with unexpected behavior when some logic is missing is much more fun to watch.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...