tsunamayo / Starship-EVO

Welcome to Starship EVO bug tracking repo !
118 stars 17 forks source link

[Suggestion] Code based, logic interacting computers #2652

Open InCrIpTiOn opened 4 years ago

InCrIpTiOn commented 4 years ago

Currently, the logic system is useful for simple or small systems, but currently there is no way to branch into certain automated or large-scale systems. It is also hard to adjust speed of a rotor / slider / piston without placing multiple.

I suggest adding a new code block like a computer which could send inputs and outputs by a custom, barebones coding language. The names of the inputs could be specified by pressing [F] on the computer (or some other more intuitive method). The computer could access and change properties of blocks in the system. For example (changing screen):

texts = "Line 1, "Line 2", "Line 3"
i = 0
while this.on do
    screen.text = texts[i % 3]
    i = i + 1
    wait(1)
end

Of course this would be a difficult feature to implement. I am not looking for this to be implemented now or in the future, but hopefully people can discuss alternative blocks to solve some of the most common features with the current logic system. (There are a lot of flaws in this post. It's 6am.)

ZachZent commented 4 years ago

I'm sorry, but I must disagree with this idea for a number of reasons. First being that it is a repetitive system, it serves the same function as logic. However since they do the same thing, one will be superior to the other in function, which will be the coding block. There is much more that can be done with the coding block than logic and only taking up one block. In a competitive sense, anyone who uses logic will be at a disadvantage to those using the coding block to its fullest. Which basically means you need to learn to code to be competitive which should not be a requirement. Next problem is that there is much more you can do with code that logic simply can't provide. Even Talrey who can make essentially a computer wouldn't be able to compete with someone essentially coding in DOOM. Which gets to my next and for now final problem is that being able to preform so much logic at once is just an easy avenue to break the game. Now assuming that the coding block is restricted to just the functionality of current logic, which would be silly and restrictive if coding block was added, how long do you think it would take for someone to create the next logic bomb? Can't really change programming to stop this unless you are creating your own programming language. And even then it would take a lot of attention to even attempt so.

There are more reasons, these three just came to the top of my head. Logic is a simple system that everyone can use and has the expansive potential to create calculators given enough time and Talreys. Now as a mod I would love to see it, but in the base game I hope to never see coding blocks. A waste of developer time and a virtually unbalancable feature

InCrIpTiOn commented 4 years ago

Could you suggest an alternative? Without adding a ton of logic blocks that do specific things. Having a computer block solves the problem of creating incredibly large, intensive logic circuits just to do one thing that most people would not know how to build. Think of the logic system in starbase, it allows for infinite possibilities and is not hard to understand at all. New players would have an easier time learning code than understanding complex logic to achieve the same thing.

ZachZent commented 4 years ago

To be fair, I don't really know coding (though not from lack of trying. Three years...) But the solution of intensive large circuits in one block is the problem. So much can be done in a single block makes any sort of logic obsolete. Why use the less functional, space filling logic system when you can just code? Any sort of balancing of this to stop lag bombs or code that somehow makes a ship an invincible killing machine (because someone always does) removes functionality of the computer block making it a half feature at best. It is a redundant system that penalizes those who stick with logic either though choice or inability to code.

There also is the side problem of interactivity. What are you doing when working with logic in SEVO or redstone in Minecraft? You are physically interacting with the world and your build. Physically placing and linking while building around or for the logic. The only UI is setting the values. You have to consider space efficiency when covering up or deliberately exposing (more with redstone, but still applicable with logic.) You can also get creative with the logic creating logic racks. On the other side is code where it is almost completely UI based. Type type type, click a switch to test, and then back into the code.

I have no alternative as there shouldn't be an alternative. Now as a mod, I hope whoever builds this adds as much functionality as possible. But for the base game this should never happen. A waste of time and a redundant feature.

ZachZent commented 4 years ago

Also if a person wants to learn to code, they can learn to code. Logic is very intuitive. Complex logic while not everyone can do has the same rules and limitations as the simple.

InCrIpTiOn commented 4 years ago

For a game like this, you don't want the limit what the user wants to build, and currently the logic system is very narrow in scope when it comes to interacting with rotors, pistons, camera, etc. I hope that tools are added in the future to add more flexibility to logic, so that a computer component does not need to be added. (fyi, the code would only execute X line at a second, to remove the possiblity of lag / logic bombs.)

talrey commented 4 years ago

We're waiting on some changes / improvements to the Sequencer that have been discussed in the past, but I can confirm that the logic system (prior to some recent, ah, crippling updates) was basically unlimited in what you can construct. I have an 8 bit computer nearly working, and my next project is going to be an Elite-style "power management" system for ships. The only limitation is the user's ability to plan out what they need to make an idea work. I'm fine with people adding stuff like this as a mod, but I don't support it for "vanilla".

Imagine if OpenComputers was a vanilla Minecraft feature. Even outside of completely obsoleting all the "this crazy person built a COMPUTER in MINECRAFT" videos with a one-block solution and five minutes of shudder Lua, who would bother using Redstone for anything when programming a computer block for it would be as simple as downloading a file from somebody's github and running it? Nobody would bother learning how redstone torches work or how to build circuits with them, and I think that's a damn shame. A game is poorly designed if it encourages ignoring features of the game.