Search Unity

Bolt coding capacity

Discussion in 'Visual Scripting' started by Poppyflower, Oct 19, 2020.

  1. Poppyflower

    Poppyflower

    Joined:
    Oct 19, 2020
    Posts:
    12
    Hello everyone who is here, Im very green to coding and my question is what is bolt coding capacity ? i give simple example, can you create entirely complex games like "Oxygen not included" or "Frostpunk" using only current "Unity" bolt visual scripting without any line coding?
     
  2. Ex-Crow

    Ex-Crow

    Joined:
    Aug 14, 2020
    Posts:
    111
    Bolt can do about 90-95% of what C# can. So it can effectively do any game at the cost of some performance since it runs using reflection.

    If you're dedicated enough, you can get far with just Bolt. But it's pretty hard to work on large, complex projects with just Bolt currently. It doesn't have any refactoring or search functionality. Variables can't be renamed without hunting down all instances of them in all your graphs and changing them manually there too. Variables can be reordered, but can't be grouped or organized with headers and separators.

    The only way to communicate between graphs is the Custom Events system, which is based on string matching. There's no way to overview all your events or even find them. You have to manually dig through the graphs.

    Unity have plans of improving all these issues going forward. But right now making complex games, especially systems and data driven games like Oxygen Not Included, is pretty difficult(but not impossible) in just Bolt.
     
    L82093 likes this.
  3. Poppyflower

    Poppyflower

    Joined:
    Oct 19, 2020
    Posts:
    12
    thank you for very comprehensive answer.

    So it can effectively do any game at the cost of some performance since it runs using reflection. - "Ex-Crow"

    How much performance loss is inevitable due bolt ? Since in nowadays many games have very poor optimization.
    ... using reflection" it means that CPU cannot directly calculate bolt visual code , it goes some additional proccess before execution?
     
  4. Ex-Crow

    Ex-Crow

    Joined:
    Aug 14, 2020
    Posts:
    111
    I did my own test for a limited use case:
    So Bolt is around 5-6 times slower than native C# code in this test case. In many game types it wouldn't be an issue, depends on what you're making. Unity also have plans to significantly improve performance going forward.
     
  5. Poppyflower

    Poppyflower

    Joined:
    Oct 19, 2020
    Posts:
    12
    1.what about speed of creation ?

    i just gathered information that c# is pretty easy to learn ~3months

    Also i repeating my question ... using reflection" it means that CPU cannot directly calculate bolt visual code , it goes some additional proccess before execution?
     
  6. Ex-Crow

    Ex-Crow

    Joined:
    Aug 14, 2020
    Posts:
    111
    Speed of creation? You can get pretty fast with Bolt, especially if you do your own macro library and what not. But written C# code these days will always be faster due to autocomplete. Bolt assumes you don't know what you want to write hence you have the Fuzzy finder step which searches for the closest matches based on input and there's no autocomplete there. A C# script assumes you know exactly what you want to write and you can't browse around like in Bolt, although Intellisense still gives you reasonable suggestions.

    C# in Unity is not exceedingly hard to learn per se, but I couldn't get it for the longest time. Then I picked up Bolt and all of it just clicked. Bolt is not its own unique language. There are very few nodes that are truly unique to Bolt, most of them are automatically generated via reflection based on Unity's scripting API. Bolt is C# in visual form. If you learn one, you learn the other.

    Bolt is just much more beginner friendly for several reasons - you can edit Bolt graphs at runtime and instantly see results without the need to leave Play mode and re-compile like you'd have to with a C# script. This lets you problem solve and experiment at a lot more rapid pace. You visually see code execution order and what values are being passed between nodes in real time - there's no equivalent for that in C#. The fuzzy finder lets you browse around Unity, and it reveals how the engine is structured. You almost never need to leave the engine to search the scripting API because you have the fuzzy finder. So for beginners, I think Bolt is a lot friendlier way of learning to code in Unity. You can later switch to C#, the transition is almost effortless.

    As for performance. It's hard for me to explain why reflection is slow. Essentially, you are correct to assume that it requires running a lot more additional processes. The code is not executed directly. Posts like this go into more detail on the technicalities. All visual scripting tools have a performance overhead and always will have unless that tool generates C# code as an output.
     
    Last edited: Oct 20, 2020
    REDvsGREEN likes this.
  7. Poppyflower

    Poppyflower

    Joined:
    Oct 19, 2020
    Posts:
    12
    thank you very much, its very good yo know that if you learn Bolt or vice versa C# you learn essence of other.
    but i feel i will beggin with C# since my creation aim is building base simulation and as you mentioned Bolt will have difficiulties with such type of game.

    I think if Bolt is visual C#, why there's no programical solution for perfomance sake to reverse Bolt Code to C# code after game is done for playing ? if Bolt come out from C# so by transformation logic you can return it to original form with all content.

    CPU cannot directly calculate and execute Bolt, because it designed in wrong way. How many times you have same thing as me ? then game doesnt exploit all CPU and GPU resources and dont give all possible fps. i counted many. CPU and GPU must have have much faster mutual communication. OS systems as Windows, as best they are in market, as worst they are in reall. they all written in not perfect language. so hardware clock power cannot go 100% smooth trought it. to invent perfect coding languange you need to be pretty much of mathematical&physical%philosophical Genius. and Genius is simple thing Passion/Devotion/Constant Hardwork.
     
    Last edited: Oct 20, 2020
  8. tigme

    tigme

    Joined:
    Jul 1, 2014
    Posts:
    37
    I Would like to add completing my first App on Unity. It is a simple calculator I made. Initially, I tried to do the whole project in Bolt but because I go through a lengthy sample data allocation process I found the App to be very slow on both older Android phones and WebGL. I decided to scrap the project and start over. 2nd or should I say 3rd time around I managed to do a hybrid between using Bolt for the overall logic and C# for crunching the numbers and data allocation ("database lookup"). Because I'm working on my own and also had little experience using C# I found using Bolt made it easier for me because I could use Bolt as the "glue" while I started learning to program in C#.

    I'm now starting my second project and I'm most probably going to be using Bolt again as my overhead logic while mixing it in with more and more C# code.

    Look at:
    Stream: A* Path Finding?? - Work on Future Tutorials

    by One Wheel Studio. Can't recall if it was in this video but he ran into some performance issues wrt Bolt while implementing the pathfinding script
     
    Last edited: Dec 15, 2020
    Haneferd likes this.