Announcement

Collapse
No announcement yet.

Why C++ for Unreal 4?

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

    I still play CRPG mod for M&B good times.

    Comment


      I have spent the past couple of days reading through this very long, sometimes-interesting, and mostly-tedious thread, and would like to share a summary of what I see.
      ( For the record, I know C++, C# and Python, and have experience using all 3 and more )


      I just started watching a course I bought from 3DBuzz, about developing plugins for UE4, and was thoroughly-horrified...
      They spend the first HOUR AND A HALF, about 25% of the entire course, just composing the most basic of scaffolds...
      It involves a huge-mess of stuff:
      1. A very complex folder-hierarchy that one MUST manually create and maintain (doing things from within visual-studio brakes everything and it doesn't work)
      2. A custom JSON file that is used to be a manifest, which you MUST manually create and fill-out, with tons of cryptic data.
      3. A custom C# file that is ONLY used to guide their custom build-tooling - and again, you can't use VS properly for managing that, as it needs to be injected into a solution-file that UE itself needs to re-generate.
      4. Tons of headers you must #include, that must manually-match the ones you already noted in your C# file.
      5. IntelliSense doesn't even work - not for the MANDATORY C# file, and not even later for the C++ code - it CONSTANTLY brakes-down, as well as having tons of "squiggly" lines all-over the place, because VS can't reason-about the solution, since the entire reference-mechanism is heavily-macro'ed and relies on an external custom build-tool. So, you CAN'T see you mistakes (as you can't trust non-squiggly-lines) AND you don't have IntelliSense at all AND you have to re-compile all the time AND it takes a lot of time each time you do, which would more-often-then-not result in it eventually failing, and giving you errors...
      They actually had to stop the video when compiling, and fix things on-camera when it's done trying to compile, and do so without any help from VS, which resulted in them having to go through ~7 cycles of such non-sense in a row, just to get a foot in the door of UE4 ans seeing their plugin show-up...

      What a complete nightmare...

      How can anyone in their right-mind could possibly fathom such a process as being anything even remotely-reminiscent of being ""productive"" - is completely beyond me...


      The fact of the matter is, that using a heavily-template'd and macro'ed flavor of C++, with a custom and non-standard build-process that brakes all of VS strengths, just for doing simple-to-moderately-complex non-performance-critical game-logic, makes ZERO pragmatic-sense - it's a huge encumbrance, and adds such a productivity-overhead that is very difficult to justify FOR THAT TASK.

      Let me tell you what it REALLY is meant for, if your'e actually interested:

      Big Game-Studios (!)

      When you have a staff of hundreds, many of them experienced C++ programmers, and you have a huge budget to invest in paying them for a few years, than having something like a code-base of UE4 all accessible for them to study and build-upon, is a god-sent - it very-well may save them many millions of dollars and a few years development of their own equivalent (if they had had to start from scratch...) - This is very welll worth the 5% revenue, and Epic knows that, and that's why theiy are charging it - THIS is the REAL target-audience of this code-base!

      For the rest of us, it SHOULD be - at best - a "necessary-evil" of LAST-RESORT, when ALL else fails with Blueprints/other-scripting-languages, either in terms of flexibility or performance-critical parts - end EVEN-THEN, it would be for just a small number of pain-points, that should be relatively rare.


      As for the people posting here on this thread:
      On one camp, there are those who are content with the current situation, and looking forward to writing their games in C++.
      For the most part, it seems to me that NONE of them have had ANY experience using higher-level languages, so they can only speak out of what they know, and not what they don't know (that's just how the human-brain works - it's not magical, it's simple physics). It seems that anyone that has posted here that has experience in both C++ AND higher-level languages, either has trouble justifying using C++ in the context of coding "most" general game-logic for "most" games, or is actually in the second camp that is NOT comfortable with the current situation, and is actually willing to leave his ego aside and acknowledge that publicly.

      I would further sub-categorize this first camp into 3 sub-camps (DISCLAIMER: Much scorn on this part... Sorry...):

      1. The Noobs : People who are new to the whole fiasco, and just know that "AAA games are written in C++".... They just regurgitate mantras, without necessarily knowing what they are talking about (I can live with those - they are cute...)

      2. The Wannabees : People who have little-to-no experience in C++, who are just comparing d***-sizes, and shouting in favor of the biggest-one - they want their Ferrari... It's Fast... It's Sexy... (This is so immature... But a little amusing... I can live with those also, because it is easy to disregard them...)

      3. The Zealots (These are the worst of the three...): People who actually have experience using C++ and know it well. They obviously like very-much the fact that they have full-access to the source-code in their preferred language. The thing is, I am having real trouble buying their "act", as if they are "actually enjoying" the prospect of coding in C++ against a heavily-template'd and macro'ed API - whatever it may be - you have to be clinically-masochistic to enjoy that, and the only way I can explain that otherwise, is a very deep-state of "denial" on their part. And that is actually understandable - Unreal Engine 4 is by-far the best thing that has ever happened to the game-industry - period, full-stop. - and the prospect of having full-access to the C++ code of the engine and the editor, is nothing short of "sexy" (IN THEORY! In "practice", it is VERY painful... Hence the "denial"...). Probably, some barely-conscious-part of them secretly wishes there were better alternatives, but since it's UE4 and is so cool, and since they already know C++, their conscious-mind can-not acknowledge that fact... It just doesn't register... Their entire "identity" and self-esteem is by now very-much wrapped-around their amazing-skills as C++ developers, and they can not hear anything jeopardizing their world-view in which C++ is the ultimate-language, and their proficiency in it makes them grate. (These I just hate... They would have their time better-spend at a shrink, then posting long-comments in forums...)


      As for the second camp - I would call them "the pragmatic" or "the reasonable" or at all "the rational":
      These people know what C++ IS and what it IS NOT, what it IS FOR and what it IS NOT FOR, and also know what managed-languages ARE and what they ARE NOT, and what they ARE FOR, and what they ARE NOT FOR. Some of them explain it remarkably well (These I like a lot...) - but some less then others...

      These people (myself included), are rightfully and justly frustrated, for now...
      They KNOW in their "gut" that there is currently a missing piece in the UE4 puzzle, and they can't wait to get the gap filled...
      They are anxious to start learning to use UE4, but not wanting to have to go the deep dive just yet into the C++ (which is currently a huge pile of mess...)

      My suggestion for them and myself is:
      Start learning what you can about the Blueprints and experiment a lot - by doing so, we would get comfortable and familiar with the API. This would take many months anyways, and by that time, hopefully, there would be language-bindings for one of your preferred managed-languages, and perhaps even a better build-story for C++, with more/better starter-projects (for plugins and other use-cases) and perhaps even a wizard/GUI-tool for managing build-definitions, as well as faster compile-times and/or a more fully-featured "live-reloads" story... (Hell, we might even get IntelliSense working for us...)
      Maybe Epic-engineers would even jump-the-wagon at some-point and go for re-factoring much of their macros into more powerful and concise templates, using some of the new C++14 features in the next VS release... (Dream...)

      In general, though, I think learning the API and the event-model is going to be beneficial down the line anyways, as it is going to be useful for whatever language one may ultimately choose to use to develop UE4 games with (of which there are bound to be plenty in years to come...)

      And remember - these are STILL very early-days for UE4 - Things WILL get better for everyone in the years to come - I have no doubt!

      Cheers!

      Comment


        Originally posted by EruArnold View Post
        I have spent the past couple of days reading through this very long, sometimes-interesting, and mostly-tedious thread, and would like to share a summary of what I see.
        ( For the record, I know C++, C# and Python, and have experience using all 3 and more )


        I just started watching a course I bought from 3DBuzz, about developing plugins for UE4, and was thoroughly-horrified...
        Not sure that bashing C++ in UE4 is justified when you look at plugin development specifically. From what I gathered, it's still very much a work in progress. To develop your game you don't need to develop your own plugins.

        Or in other words, if the engine was developed in C# that doesn't mean that plugin development would necessarily be so much easier. It could still be a mess.

        Intellisense not working is mostly an issue of Visual Studio unable to handle a huge code base like that. VisualAssist does a much better job.
        Last edited by Gigantoad; 07-23-2014, 11:00 PM.

        Comment


          I vote to have this thread locked. Tim answered it. It's just a waste of internet ink now.

          Comment


            Originally posted by Bino View Post
            I vote to have this thread locked. Tim answered it. It's just a waste of internet ink now.
            But where would we then get our drama from? Soap operas on TV just won't do.
            In any case, to add my two Zimbabwean dollars for those who feel intimidated by C++, hang in there baby, it's just a programming RPG - just keep playing, you will eventually level up.

            Comment


              Originally posted by EruArnold View Post
              ...
              Actually, to the intellisense part - it works for me, raise the number in VS which is responsible for the limit of memory used by intellisense.

              To the c++ part, actually I didn't have problems yet, I was using the old engine (udk) a lot, so I've got experience with UScript too,and I must say that, if you know the api, c++ is not so much difference.

              To the compile times, yep they are pretty long, but if you've got a decent pc it's not that long, and epic is working on compile times so you can expect it to be better in the near future.

              Comment


                Originally posted by EruArnold View Post
                I just started watching a course I bought from 3DBuzz, about developing plugins for UE4, and was thoroughly-horrified...
                They spend the first HOUR AND A HALF, about 25% of the entire course, just composing the most basic of scaffolds...
                It involves a huge-mess of stuff:
                1. A very complex folder-hierarchy that one MUST manually create and maintain (doing things from within visual-studio brakes everything and it doesn't work)
                2. A custom JSON file that is used to be a manifest, which you MUST manually create and fill-out, with tons of cryptic data.
                3. A custom C# file that is ONLY used to guide their custom build-tooling - and again, you can't use VS properly for managing that, as it needs to be injected into a solution-file that UE itself needs to re-generate.
                4. Tons of headers you must #include, that must manually-match the ones you already noted in your C# file.
                5. IntelliSense doesn't even work - not for the MANDATORY C# file, and not even later for the C++ code - it CONSTANTLY brakes-down, as well as having tons of "squiggly" lines all-over the place, because VS can't reason-about the solution, since the entire reference-mechanism is heavily-macro'ed and relies on an external custom build-tool. So, you CAN'T see you mistakes (as you can't trust non-squiggly-lines) AND you don't have IntelliSense at all AND you have to re-compile all the time AND it takes a lot of time each time you do, which would more-often-then-not result in it eventually failing, and giving you errors...
                They actually had to stop the video when compiling, and fix things on-camera when it's done trying to compile, and do so without any help from VS, which resulted in them having to go through ~7 cycles of such non-sense in a row, just to get a foot in the door of UE4 ans seeing their plugin show-up...
                To add more to the drama.
                I completely disagree with all this. Visual Studio was never good for C++ to begin with, Intellisense for C++ was always sloppy at best. And huge code bases (regardless of software type), are always bringing visual studio to it's knees.

                Custom Build Tool-Chain is here to allow easy portability between platform, to build naively on the platform you happen to develop your game.

                Is the Build Tool Chain very easy to use ? No. Is it hard. You must have never used make, if you think that UBT is nightmare (;.
                For added benefit os portability, I could even use make, if I had to.

                I honestly don't see where you have problem. Or Unreal Engine is the first game engine you had work with, using C++.
                I can tell, it's easiest to use from engines I have used so far.

                As a side note. I find C++ in UE4 much more confotable to use than UnrealScript in UDK.
                I can honestly say, I could never get anything done in US .
                https://github.com/iniside/ActionRPGGame - Action RPG Starter kit. Work in Progress. You can use it in whatever way you wish.

                Comment


                  Originally posted by iniside View Post
                  I honestly don't see where you have problem. Or Unreal Engine is the first game engine you had work with, using C++.
                  I can tell, it's easiest to use from engines I have used so far.

                  As a side note. I find C++ in UE4 much more confotable to use than UnrealScript in UDK.
                  I can honestly say, I could never get anything done in US .
                  I have to agree with inside on this one. Since using UE4, I have only worked on the C++, I rarely use blueprints (except for my 2D game, and that was an experiment to only use blueprints, I much prefer the C++ side) except to prototype some basic functionality before I write it up in C++.
                  FluidSurface Plugin: https://github.com/Ehamloptiran/UnrealEngine/releases
                  TextureMovie Plugin: https://github.com/Ehamloptiran/TextureMoviePlugin

                  Comment


                    Just to mention C/C++ compilers are more than 30 years old and are very highly optimized!
                    Why would you develop a game and graphics stuff in javascript/C# or in any other language that is not as highly optimized as a compiler?
                    Also if you use some good practices developing in c++ is not memory management.
                    Both C# and c++ has their disadvantages but if you need more power you will decide to use c++.

                    Comment


                      Originally posted by Azarus View Post
                      Just to mention C/C++ compilers are more than 30 years old and are very highly optimized!
                      Why would you develop a game and graphics stuff in javascript/C# or in any other language that is not as highly optimized as a compiler?
                      Modern optimizing JIT compilers like Java's HotSpot and LuaJIT offer performance that can often match or even beat statically compiled code. Add to that no waiting for compiles and live in-game debugging tools that scripting languages can offer and scripting languages often make sense for development.

                      Not every game needs AAA FPS type performance. Do you think a game like Tappy Chicken should be written in C++?

                      Also if you use some good practices developing in c++ is not memory management.
                      Both C# and c++ has their disadvantages but if you need more power you will decide to use c++.
                      A good software developer should have many tools in his toolbox and know how and when to use each.

                      Comment


                        Originally posted by iniside View Post
                        To add more to the drama.
                        I completely disagree with all this. Visual Studio was never good for C++ to begin with, Intellisense for C++ was always sloppy at best. And huge code bases (regardless of software type), are always bringing visual studio to it's knees...
                        I think this is important for many to understand, one can find public complaints about this on other frameworks going back some time. For Epic's sake, sometimes feel as if this particular issue is directed wrongly at them. Otherwise...

                        Seems like there are plenty of arguments to go around no matter which side you prefer. I have my preference and it's not C++, but what's the point of complaining if we are using UE4? It's not like programming games is easy in any language. If those here are looking to build in UE4, then C++ is what you have and blueprints which IMHO are about as innovative and advanced as it gets. There was some talk from some developers about adding more language interfaces, I'd recommend finding those threads for those who are interested to lend support and suggestions since the debate over languages will never be settled. In an effort to be neutral on the subject, there are probably better outlets in helping to add new features than an attempt to change another's opinion.

                        Could be that this thread may have a happier home under General? Maybe it's more fitting in this group, but this is a topic that generates more anger than being informative.

                        Comment


                          Originally posted by jCoder View Post
                          Not every game needs AAA FPS type performance. Do you think a game like Tappy Chicken should be written in C++?
                          Well 10-15 years ago a tappy chicken style game was written in c, for a good reason.



                          Originally posted by jCoder View Post
                          A good software developer should have many tools in his toolbox and know how and when to use each.
                          It's true but if youre making a game that must run on any device and it needs the best performance you may consider to write it in c or java.
                          But it's your choice what language you use. I prefer to write my things in C++ or C#.


                          Originally posted by jCoder View Post
                          Modern optimizing JIT compilers like Java's HotSpot and LuaJIT offer performance that can often match or even beat statically compiled code. Add to that no waiting for compiles and live in-game debugging tools that scripting languages can offer and scripting languages often make sense for development.
                          Eh?

                          Comment


                            Originally posted by Azarus View Post
                            Just to mention C/C++ compilers are more than 30 years old and are very highly optimized!
                            Why would you develop a game and graphics stuff in javascript/C# or in any other language that is not as highly optimized as a compiler?
                            Did you even read the thread? Performance has been discussed to death already, and wasn't even one of the reasons Tim Sweeney cited.

                            Originally posted by Azarus View Post
                            Well 10-15 years ago a tappy chicken style game was written in c, for a good reason.
                            The last I checked, it's not 10 or 15 years ago.
                            Last edited by furrykef; 07-24-2014, 11:11 AM.

                            Comment


                              All I'm really waiting for is for JetBrains (who do absolutely fantastic IDE's and Plugins) to finish working on their C++ IDE, and for Epic to allow us to generate MAKE files for different IDE's. In the meantime, if you have VSPro, you can buy a great plugin called Visual Assist X from WholeTomato. It certainly offsets the pain a little.

                              Comment


                                Originally posted by furrykef View Post
                                The last I checked, it's not 10 or 15 years ago.
                                If by that you mean to say that Tappy Chicken was written in C++, you're wrong. It was done entirely in blueprint.

                                https://www.unrealengine.com/blog/sh...-tappy-chicken

                                Comment

                                Working...
                                X