Announcement

Collapse
No announcement yet.

UE4 favors Blueprints over C++?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    UE4 favors Blueprints over C++?

    So I'm kinda frustrated here because I don't consider blueprints valuable to me as a C++ programmer who 's learning UE4 and just wants to get experiences in programming, and not just coding simple behaviors. But a lot of times, tutorials online, even UE docs just supports blueprints not c++. So I'm forced to go deep in the engine's code to find out how to get the same behavior of a blueprint function via code, or how to simply reference something inside the engine. And let me tell you, this is just no fun. What do you think? Does Epic games favor and support visual scripting over actual programming?

    #2
    I apologize in advance if you know all this already but I find people often don’t.

    If you build the engine from source you can usually right click a blueprint node and be taken straight to the code (Alt-g?) for the node in Visual Studio. Eventually you will get used to digging through the code when you have errors or want to replicate something that the engine already does. If you are really green you can look through a book like this:

    https://www.packtpub.com/game-develo...le.of.contents

    It hits a lot of topics and you can just jump to the sections you want info on after you get started with the beginning. It covers a lot.

    Also when you get build errors you don’t understand, check the output tab and start reading backwards for errors. There’s a lot of weird things you can do to make errors that simply show as the build fails but then you’ll have real messages in the output like you tried to make a function visible to blueprints but the class isn’t or other oddities. Also use the link in the crash window to go to the logs, as well as looking at the engine code reported in the error and if all else fails close the built editor and run the project from Visual Studio to debug and work backward.

    Theres also lots of stuff you can search online for once you know what to look for but getting used to finding your answers in the code really speeds up development. I wrote a custom thumbnail renderer yesterday for some of my assets and my Google fu failed me but after looking through the source code for the classes and references I found the links in the baseengine.ini and was able to add new ones in my editor module and project defaultengine.ini. I also had to make my editor module load sooner to be found by the code that goes and looks for packages. This is pretty much how all my c++ development works with UE4.

    The sooner you get comfortable digging through the code the sooner you will be able to answer your own questions quickly and not fall into out of date info or hard to find topics online. Learning how to dig into the engine is an amazing skill that you should really continue doing.

    For me digging into the engine is fun because I have done it enough to not be intimidated and I can easily learn stuff myself and not be frustrated trying to find info online. It can be frustrating for a while when you aren’t used to it. And Of course anytime you have large amounts of indirection for something it can be a lot trickier to figure out =)

    Good luck!

    Comment


      #3
      I was just like you about 2 weeks ago when I started learning, so I get where you're coming from.

      That's kind of the idea of game engines though, favouring everything that's faster and less error prone. I was very reluctant about blueprints when I started learning and I did everything with cpp code, surfing through the engine with right click->go to definition/declaration.
      Right now I can't imagine not having blueprints, the way you can setup cpp to blueprint communication makes game making incredibly fast, coding in cpp alone cannot even compare. And the UMG widget system, it would be kind of ridiculous to create widgets without blueprints.

      Besides, I don't think using blueprints where it's faster is making your programming experience any worse or less educational, since you have to get a good understanding of macros and the way objects communicate in the engine.

      Epic definitely encourages people to use blueprints where it's possible. We're currently in a time where game making is becoming more and more comfortable for game designers and I believe that to be an absolute success of the gaming industry. People who are enthusiastic about creating "the best game ever" can now make games out of little building blocks without being bothered with syntax and constant crashes. Well sort of, because there's a lot of things you can't do without cpp.

      Comment


        #4
        Does Epic games favor and support visual scripting over actual programming?
        If ONLY! ... The truth is Blueprints are a toy, a brilliant toy, but still a toy (often more of a marketing tool than a complete solution etc). The hard truth is, flying first-class with the engine is all about C++. That said, a lot of devs at Epic and around the world use a hybrid of both, where it makes sense. Read this or this, or follow other threads such as this one to learn more pros / cons etc...

        Comment


          #5
          Being a programmer for over 30 years, I tend to dislike programming in blueprints. However, when I view blueprints as a tool for power users or as a tool for when I am assembling the behavior of my games it really shines through. Being able to change a parameter in the blueprint (inheriting from my C++ classes) and then just clicking Play is powerful iteration.

          Comment


            #6
            If you're making a game you'll learn to appreciate both.

            Comment


              #7
              to second MarkcusD.... I use both, but tbh i only go into blueprints for things like triggering animations (timelines) and audio; expose a function in c++ and call it. That is not that i don't like the visual coding, i just find that a spaghetti of blueprints equals a few lines of c++. Both are tools, so use each as you need.
              -------------------------------------------------
              [Marketplace] Worn Furniture Pack 1
              -------------------------------------------------
              [Marketplace] Beach Props Pack 1
              -------------------------------------------------

              Comment


                #8
                I use both BP and C++, but mostly C++. Here are some of my reasons I don't use BP that much, though :

                - Work Safety : I had too many non-programmers coming to me and say "Hey man, what are you doing ? You broke the game !!". All of it only to find out that THEY accidentally broke my work into pieces and submit to Perforce. That's when you realize you should have done this in C++, since no one except programmers will ever access those. Better be safe than sorry.

                - Git/Perforce conflict : C++ uses .h and .cpp files, which no one except you will use. When you submit them, all the others have to do is click on "Compile" and voilà. BP, on the other hand, uses .uassets, a file artists can happen to use at the same time. This means if that happens, you have a risk of disrupting someone's work. Since an .uasset is considered a binary file, good luck resolving the file conflict.

                - Spaghetti : A personal choice, but I prefer debugging in a wall of text than in a giant spaghetti.

                Comment


                  #9
                  Click image for larger version

Name:	dsmGaKWMeHXe9QuJtq_ys30PNfTGnMsRuHuo_MUzGCg.jpg
Views:	410
Size:	141.8 KB
ID:	1715086

                  ...... ....
                  | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                  Comment


                    #10
                    Shipped three UE4 products at work from 4.9 to 4.22 (working on 4th and 5th now). Blueprints are forbidden to use in any project except for the HUD layout blueprint. So far we haven't been forced to use them for anything else (yet).

                    Comment


                      #11
                      In the absence of support for XML or HTML5 wrapping, I tend to use blueprints for creating the UI, because I have found Slate unnecessarily esoteric. Every other aspect of game programming, on the other hand, I definitely prefer to do with C++.

                      To be frank, I can appreciate the intentions Epic Games had when instituting Blueprints, i.e. "artists can now program." However, using BP still requires some programming sensibility, so I suppose the purpose is lost.

                      Now, if you don't mind me being really pedantic, the C++ in Unreal Engine 4 is not *actually* C++. The constructor (both the starterwire as well as the carburettor of the engine, so to speak) of most applications made with the help of Unreal Engine 4, UnrealBuildTool, is made with C#. This is actually not a bad design decision, since you can still get reasonably low-level to optimalise your game thanks to the C++ part, yet the C# core rids you of all the ******** around with memory issues.
                      Last edited by M.M. Gabai; 01-31-2020, 10:38 AM.
                      Total Rendition (Twitter - Patreon - YouTube) - the game they don't want you to play!

                      Comment


                        #12
                        UnrealBuildTool / UnrealHeaderTool are just parsers. It doesn't handle actual objects. UE4 is very much C++, albeit with some macro magic to paste in some boiler plate.
                        Able Ability System - A high performance, robust ability system for UE4. Now Available!

                        Comment


                          #13
                          Originally posted by ExtraLifeMatt View Post
                          albeit with some macro magic to paste in some boiler plate.
                          So which ones handle that?

                          Might be worth discussion in a separate thread.

                          Total Rendition (Twitter - Patreon - YouTube) - the game they don't want you to play!

                          Comment


                            #14
                            It generates C++ files, that's what you get in Intermediate folders and that's why you have to include yourheader.generated.h when the header contains UCLASS() objects.

                            Those C# applications don't exist in the running built game / application.
                            | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                            Comment


                              #15
                              For me is very difficult to find good tutorials about c++.... and I prefer expend my time in learning c++ in UE4 than blueprints, because I know a little bit of c#. I have to trust in some tutorials without beeing sure that are the best ones to learn (well, sometimes I see that are not the best ones because they are not using the coding and naming rules of UE4) I think it would be a really good investment from Epic to create some tutorials of all levels for the ones that wanted to learn to code c++ in UE4.

                              Comment

                              Working...
                              X