Jump to content
Stray Fawn Community
  • 8

Logic Overhaul - Numbers


D.Mentia

Post

This might be too big of an ask, but, the current logic system feels very limited and takes a lot of parts to get anything done.

I propose a logic overhaul to use numbers instead of booleans.  Thrusters would take in a number, indicating the power they fire at; sensors would output a number indicating the distance to whatever they detect (or 0).  Logic blocks like AND/OR could either be removed in favor of using math for the same result, or could treat all <=0 as false and >0 as true.  Batteries/gas/etc could output their current fuel amount, inputs to shields and heaters could set the radius or strength (so setting either to 0 would disable it).  Hinges could be wired to take an input speed, pistons a speed or range, springs a strength value, etc.  

 

Basically everything that we currently hard-set through the editor now, let us instead set it with logic

 

Then things like speed sensors/altimeters could output an actual number, directional sensors could output an angle, and (required) new math logic blocks would be able to manipulate those into usable values to make really good automations.  The things you could do if the sensors gave you an actual number value to the target are nuts

Link to comment
Share on other sites

4 replies to this post

Recommended Posts

  • 0

that's how programming works. a lot of small parts to make up a whole. asking them to make parts like an and gate and a nor gates would be like asking can you put an apple and a orange in a bag but if i don't have an apple or an orange then put bread in there instead, but if you have an apple and an orange but not a bottle of water then just forget it, then shoving that into the space of ([])

  • Haha 1
Link to comment
Share on other sites

  • 0

What?  Everything currently is a boolean; and/or gates as-is would be perfect and easy to implement, I was just saying they would be optional with a number-based logic system because math gates would be able to do equivalent things.  Many existing games use number-based systems for their logic, such as GMod and Scrap Mechanic's 'The Modpack' - it would just let us do more, like make bots that hover perfectly stable above a planet, rather than bouncing back and forth across some arbitrary altimeter setting

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...