Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

scripting in SE

Discussion in 'Suggestions and Feedback' started by Ljorius, Apr 12, 2018.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Ljorius Trainee Engineer

    Messages:
    75
    well scripting in SE is currently a not easy task, which also hinders new players or players without programming experience or skills to advance to more sophisticated constructions or ideas.

    some sort of basic programming language is required, which makes it easier to gain access to this part of the game. i don't know if there have been already topics to this, but i deeply recommend, that Keen is creating some sort of basic language for the Game. Some sort of SE only SDK or scripting language. C# may be a powerful language, but still those who lack the knowledge or skill will not try the game more or just play once and then quit. scripting in SE is one powerful part of this game. if done good and easy to access, more players will find the game more entertaining.
     
  2. Malware Master Engineer

    Messages:
    9,625
    That's unfeasible, I'm afraid. Scripting is not a main aspect of the game. The programmable block already have pretty much no priority at all from Keen, it's current state is due to community contributions (mostly mine). They're not gonna put in the workload necessary to write a programming language when C# is so easily and readily available and providing the same performance as the game itself, any custom language would likely add another layer and thus have poorer performance.

    Also - there's an extra potential advantage of using C#. People will be learning a skill they can take outside of the game. In addition to that, using Visual Studio and optionally my MDK extension makes it a far better experience than using any custom language without any kind of intellisense help or Google support. Besides, believe it or not, C# isn't all that difficult. There's a slight curve at the beginning until one grasps the basic concepts, then it's usually smooth sailing. I've seen it, since I'm active on Keen's discord where we see new programmers start out all the time.

    Of course it doesn't help that the PB programming API itself has had little love from Keen. No change in language would help with that problem. Unfortunately, again, there's little interest from Keen's side to change this and now it's too late. People would get angry if the API were to be remade (as it should) to be more friendly, because it'd invalidate all their scripting work.

    Granted, some people just naturally have problems learning programming concepts. So, if there were to be made any kind of scripting improvement, it should be in the form of a visual interface which generates C# code behind the scenes and then uses the existing PB API, not inventing a custom language that people can't use beyond this game. That way people not only get a simpler way to do the simpler tasks, but they can even take a look at the generated code and learn from that - and then take that further to write more complicated scripts. This is something I would love to see, even as a seasoned programmer I sometimes just want that little thing done quickly.
     
    • Agree Agree x 3
  3. Levits Senior Engineer

    Messages:
    2,122
    The best form of programming (in a block form) that I've ever had the pleasure of playing around with has been in From the Depths.
    "Rotor Angle" "Greater than/Less than" "Set Angle" "Apply action here" "Set Action variable". I suppose it's referred to IF / Then or something... No clue what it's called, but it's easy to understand and in a simple enough form/frame to make it a working sentence.... I mean, I could try to read out what some of the C# is, but I can't make sense of it when I do.

    For submarines and the like that need balancing in that game (something that I would love to be able to do in SE without having to hunt down some line of code somewhere online and then find where to change it to fit my desired results).

    If: Roll Angle is greater than "(set angle (1degree)", Then: Set thruster (specify which thruster) "output value (100%)". Then do the opposite on the other side to keep the ship balanced within +1degree and -1degree. You can kinda get the same result now with sensors and thrusters, but only within 50 meters from the surface.
     
  4. Saberwulfy Apprentice Engineer

    Messages:
    292
    I think a graphical programming as option in PB should make it a lot better for beginners and for experienced help beginners. The game will can be used as training too for real mechanisms.

    Look this example.
    [​IMG]
     
    • Agree Agree x 1
  5. ViroMan Senior Engineer

    Messages:
    1,123
    I was just going to point out something just like what @Saberwulfy just showed.

    another example...
    [​IMG]
     
  6. Levits Senior Engineer

    Messages:
    2,122
    just out of pure curiosity, could you elaborate on what this example is doing?

    I can kinda follow along with some of it... but i'm not sure what it's trying to do. Is that something to control rotors or wheels?

    and yeah sorry Saber, lol I've no idea what you got going on their at all :woot:

    >this is about as advanced as I get with programming lol... yeah pretty bad.> https://fromthedepths.gamepedia.com/Automated_Control_Block

    Not looking for an exact copy; I mean, I'd still settle for some default programs that are simple enough to understand and/or at least know what words/names that I would need to change to work with my builds. Even if there was a program or something similar to the interface FtD has that would work for SE. <Some other program that I could setup the action and then copy/past the code/program into the Programming Block.
     
    Last edited: Apr 14, 2018
  7. Malware Master Engineer

    Messages:
    9,625
    @Levits Problem is, making and maintaining such a program is a lot of work. I started designing something, but... I'm a full-time professional programmer already, there's only so many hours in a day and after programming for a full day there's not all that much energy left when I get home :p
     
  8. Levits Senior Engineer

    Messages:
    2,122
    Making such an interface I can only imagine the stuff that would go into it, but maintaining... I really don't know just how often the blocks in SE change. ... well, scratch that. seems like every other day there's something new done to the blocks that can probably change something, somewhere to break a mod or scrip. But one would think that Keen would at least have setup a few aspects of blocks that would remain permanent. At least where programming input/outputs are concerned.

    Cool that you might be at least attempting something... hopefully... a bit more non-programmer friendly. I'll be waiting with baited breath lol. <... that's not suppose to sound sarcastic. truly, I hope that someone/anyone actually manages to open programming blocks to everyone.

    I just wish Keen had thought of something from square one that would help non-programmers do some of the stuff that you and other more experienced individuals could do. I mean, heck, if I could read it out loud and make sense of it, I'd done have a ton more things to build in SE. FtD is nice and all, and I can get a working and fully functional machine with its simple UI to run what, at what variable, and when I want it too, but SE is by far more construction friendly... and by god does it look better. But without being able to do anything more than create a static 3D model, I find myself now gravitating more towards other games that I can fully utilize what my designs are for. I can get a ship to use it's 3 thrusters to hover and maneuver in FtD but cannot get the same thing to happen in SE.

    Most advanced thing I've ever made in SE was a sensor-based automated miner. You know the drill; 4 sensors controlling 4 gyros to tell it to angle towards something. Use those sensors and timers to strip mine the asteroid until nothing is left. Not that I'm the majority or anything, but I could (with the proper UI regarding setting up a program for the programming block), easily do much more in SE.
     
  9. Malware Master Engineer

    Messages:
    9,625
    Maintaining involves a lot more than just making sure it is compatible with the game. It's support work - there are going to be bugs, people are gonna have suggestions and nag one to death if one does not implement it, etcetera etcetera... The game could be locked in place and maintenance would still be a significant amount of work :)

    Oh, I'm so sorry I gave that impression... I didn't mean that. I started designing it but abandoned it because of the workload. I already have MDK (a Visual Studio extension to help coders with scripting SE) and MDK-Mockups (a simulated framework to test scripts outside of the game), alongside non-SE projects. I can't take on a project as big as this. I'm so sorry for getting your hopes up. I feel bad now :(
     
    • Friendly Friendly x 1
  10. Levits Senior Engineer

    Messages:
    2,122
    Awww.
    Nah man that's cool. It was my misunderstanding. Started thinking that there was some program out there that could do it. I mean, figured there might be something out there that might could create the C# script from that sort of if/then UI. But again, I don't know nothing about scripting the stuff or how anyone could go about doing, let alone by themselves lol.

    Bought this giant book with scripting a few years back, opened the first page... yeah. That was about the end of my programming adventure :woot: .

    Some AutoCAD, drafting, drawing; sure. Even some electrical diagrams back in school. But I opened that page and was like "Nope". I suppose I could try to give it another go, but I don't think I'm that desperate just yet.

    Actually, I still have to figure out how to get Blender to do what I want it to.
     
  11. Ljorius Trainee Engineer

    Messages:
    75
    With due respect, but with the view a very large part of the players or potential, paying customers is excluded. The SteamWorkShop shows a lot of great things and only a fraction of the players can replicate them. A ship, a station can certainly be recreated from the components, but the functions are an unknown territory.

    Building is fun for many players, but higher functions or features are denied to many people.

    Personally, I find it arrogant and overbearing when someone tells me that programming is easy to learn. Certainly "C #" is easier to learn than "C ++" or "C".

    I myself was a programmer, but I can make a difference or estimate what kind of mechanics has an impact. The game has certainly sold well from the beginning, but the current programming mechanics excludes many players.

    Viewed from a different angle, many want to learn how to build and play and not the basics of a programming language, which is compulsory in this game, because on a simple display, you can not even output text, but need program code. A "Hello World" is a simple output text, but requires more lines of code than the test itself is long, which scares off many players.

    A "Hello World" is a simple output text, but requires more lines of code than the test itself is long, which scares off many players.

    Although the game or programming mechanic has "C #" as its foundation, learning to program and saying "C #" is learning another pair of shoes.

    In other words the game has access restrictions, some players have to reply on others to do the programming for them. Personally, when i play a game, i want to play with every feature of the game and a lot of other players also want to play a game in that way. The programming mechanics are a core feature of the game, but limits the usability to those who have the programming skill or the will to learn it, all others will quit sooner or later. This fact will find its way into reviews, some will be very direct, others contain the hidden hints, that the game is fine, but you cannot use all features, as long as you have no programming skills.

    During the past time, some other games emerged with similar building/survival mechanics etc, and some of them have a much better solution for their mechanics, other have worst.

    Imagine the following picture, you buy yourself a car, the car has a lot of features built-in, but you cannot use them, unless you learn to program you panel, to react on your touch, to lower or raise the side window. would you buy such a car, were you have to program every aspect of the car? not configuring, this is a different part of the situation. you may manage to program the button to lower or raise the window, but on the next step you have to tell the button to stop, when you release and not the lower/raise the window till it is closed/opened. Or to program the signaler, in which interval it has signal on/off. this sophisticated work. this requires more than a basic understanding of how to program. you need logic, algorithms etc. You replied to me and others using the language of the programmers.

    Like API, MDK etc.
    To learn programming is not that easy and this is also a main reason, why a lot of players maybe buying the game, but when they reach this point, they quit. In my free time, i am not motivated to program, what i am doing at my work as well. And those who are no programmers, have very little intention to learn programming during their free time, so the quit or chose another game.
     
    • Agree Agree x 1
    • Disagree Disagree x 1
  12. Malware Master Engineer

    Messages:
    9,625
    You only read the first part of my post, didn't you... :p I already addressed this.

    There's likely nothing you can say that I and others haven't already brought up on this. The idea of a visual or simplified language has been brought up ever since before the first programmable block was released.

    As far as Keen is concerned the programmable block is unimportant. Given its problems they likely regret its inclusion in the first place.
    --- Automerge ---
    What I'm trying to say, @Ljorius, is that I'm firmly on your side in this.
     
    Last edited: Apr 14, 2018
  13. ViroMan Senior Engineer

    Messages:
    1,123
    wait a darn minute there... they might regret releasing the programming block? The most powerful tool that a player has in the game? I can understand that it is severely restricted to those who know how to program and therefore the majority cannot play with its ability they can simply copy past in code from others hard work. I also understand that it is probably a headache to maintain the use of the APIs related to the PB. In my opinion the use of the PB far outweighs the detractors it has.

    @Levits If I remember right that program was for a car to drive around inside a box.
     
  14. Malware Master Engineer

    Messages:
    9,625
    @ViroMan You don't know the detractors it has. None of those issues you mentioned are at play. "The most powerful tool that a player has" That is the problem. As an example there are performance issues which is caused by scripters not really understanding the impact of their code. There are so many scripters who learn to program with the programmable block (something I find awesome in itself), but writing performant code is not easy. So many people don't really even understand that they have to think about writing fast code at all. Keen is blamed for this performance impact even though it's the scripter's "fault" for writing bad code. These issues can't just be fixed due to the nature of the beast. The PB was intended to be used for small automation tasks, the highest complexity maybe being an airlock controller. It has gone so much much further than that. I am partially to blame for this, I think.

    This is just the most obvious issue. They won't remove it, but they certainly have every right to regret having it ;)
     
    Last edited: Apr 15, 2018
    • Informative Informative x 1
  15. Thermonuklear Junior Engineer

    Messages:
    612
    It's a shame the "SE Programming Helper" webpage disappeared, for it did just that. Found some screenshots...
     
    • Agree Agree x 1
  16. Malware Master Engineer

    Messages:
    9,625
    @Thermonuklear I never checked it out myself, but I've heard people saying it generated rather inefficient code?

    [edit] Well yes. Even the example given in those images is unoptimal, both because of using obsolete methods (why it would do that isn't hard to understand) but also fetching blocks on every run.
     
  17. Michael_Loney Trainee Engineer

    Messages:
    15
    I need to chime in here. work in the Building Automation industry where we need to control entire building worth of systems. Heating, cooling, lighting, door access, fire alarms and power metering interfaces.

    Even though I have 10+ years in the industry, the C programming required for SE has a very steep learning curve. Having to open several browser tabs to figure out how to simply have a light turn on when a certain container gets above 90% is very tedious.

    I agree the the more you do it, the better you get, but for some players, that is out of reach.

    Even if I could simply refer to block by their name would be a huge bonus. It would allow a much larger player base do some amazing things with this game.
     
  18. Malware Master Engineer

    Messages:
    9,625
    @Michael_Loney True. Unfortunately we've already lost this fight.

    PS: That's C# by the way, not C. Big difference :D
     
  19. ViroMan Senior Engineer

    Messages:
    1,123
    Using one of them will end up with you cutting your arm in a few places to ease the pain.
    I need my templates n stuff.
     
    Last edited: Apr 16, 2018
  20. Thermonuklear Junior Engineer

    Messages:
    612
    @Malware

    Ah, didn't know about bad code. Maybe that's why it was killed... The scripts could become very problematic if someone used them on a server. Since I'm purely singleplayer and quite conservative with PBs I would've been ok with subpar scripts. Of course if such tool is open to use by anyone, the rabid megalomaniacs try to create advanced AIs with it and then blame Keen for poor performance :D
     
    • Agree Agree x 1
    • Funny Funny x 1
  21. sioxernic Senior Engineer

    Messages:
    2,535
    @Thermonuklear Usually the same kind of people who build a 200 block by 100 block carrier monster, and complains about the game being unoptimized.
     
    • Agree Agree x 2
  22. gothosan Junior Engineer

    Messages:
    723
    My personal opinion is that the programmable block is mostly finished.
    The only two things I wished it had is access to the ore detector, maybe similar way to the camera raycast function, only with ore name and distance/coordinates, and slightly higher character count for longer scripts or in the very least to expose that number for modders to change it.
    Correctly I belive it is already possible with the raycast and inter-grid communication to inrich both single and multiplayer.
    Allowing players to write and share drone A.I. , communicate with each other via grids (in multiplayer server) will be a lot of fun IMO.
    Also using real life programming language is great since it can open a window for a job to those who later will want to continue with programming.
     
  23. ViroMan Senior Engineer

    Messages:
    1,123
    I duno... since malware pointed out that scripts that are inefficient but, work so the creator doesn't care about refactoring... I am rethinking the whole PB are actually problematic to multiplayer by a lot. Now you would like to interlink scripts... ohh ya I think that's a kick in the games balls right there.
    hmm... anyone here familiar with PLC ladder logic? That would be easy to learn and see the "code" in a different way.
    [​IMG]

    We got dozens and dozens of PLCs at my work and only one guy that works on them. I watch him do his "voodoo magic" (he says that not me) sometimes and it is pretty damn simple.
     
    • Agree Agree x 1
  24. Michael_Loney Trainee Engineer

    Messages:
    15
    Plus a million! That type of interface would be fantastic.
     
  25. Malware Master Engineer

    Messages:
    9,625
    Such a system requires domain understanding too. In my opinion it needs to be a visual system designed for SE with each block providing actions and events to use and hook up in an intuitive way, with simple conditional nodes so it's easy to get into. Sure, you won't be writing a fleet command script like RDav's, but you won't write one of those horrible (performance wise) deck visualization scripts either... And you'll still get lots of stuff done and the actual code pieces the script is generated from is written by a professional so the performance impact will be much better.
     
  26. Ljorius Trainee Engineer

    Messages:
    75
  27. Allammo Apprentice Engineer

    Messages:
    337
    Im not a programmer but there is solution for those who are not. For sophisticated automations, builds you can use script called Easy Automation Script.
    https://steamcommunity.com/sharedfiles/filedetails/?id=694296356
    Basically it provides power to control blocks via simple, similar to pascal language. It requires familiarization with each aspect of it but in general within a day or two you can learn to do amazing stuff, smart rovers, crafts, factories you name it. Combine it with Control Module to spread array of possibilities.
    https://steamcommunity.com/sharedfiles/filedetails/?id=655948251
     
    Last edited: Apr 19, 2018
  28. Bumber Senior Engineer

    Messages:
    1,018
    There was kScript, but the dev lost all his code somehow.

    Is this similar?
     
    Last edited: Apr 20, 2018
  29. Malware Master Engineer

    Messages:
    9,625
    Uh yeah. Don't use that @Bumber. The code it generates is not good. I just tested some simple stuff for fun and doesn't seem to reuse anything.
     
  30. Levits Senior Engineer

    Messages:
    2,122
    Actually, that would be good for me. I've never played online and likely never will. Whatever performance issues it may have, it probably wouldn't be that bad.

    ...is that the thing that no longer works? or is there a link somewhere for it?
     
Thread Status:
This last post in this thread was made more than 31 days old.