Announcement

Collapse
No announcement yet.

Why C++ for Unreal 4?

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

    Hey guys, sorry to necromance this thread, but I have some questions:

    First I wanna say that I'd really love to replace the current engine I'm using (Unity) with UE4, not only because of the features but also cause of opensauce. I however simply can't start doing the things I do in Unity quickly. I admit that part of the problem is because I don't know the API very well but I've been hitting wall after wall because of C++, mostly because of the kind of nonsense seen in that Scott Meyers video (assuming things should work consistently while there are exceptions for every case).

    I know that Mono is full of licensing nonsense (that's the reason why Unity still uses a methuselanic version), and I don't like Mono very much personally, mostly because of performance, although it's orders of magnitude better in recent versions, is not very good compared to JVMs(hotspot/openjdk's) or MS's CLR.

    That however brings me to the actual question: Recently MS opensourced their CLR (CoreCLR, incl. JIT/GC/etc) along with mscorlibs and msbuild. Everything was released under the very permissive HIT license. There are efforts to port all of that to a cornucopia of different platforms, and I'm sure it's not gonna take too long to have them up and running at least on the main platforms and architectures out there (Win/Mac/Lin - x86/ARM).

    I wonder if there's any interest, perhaps not officially, in creating something (perhaps a plugin) that allows you to code in the good ole C# using that newly open technology... since both are opensource I think eventually something will pop out, I'd like to hear different povs on the subject.

    Personally, I'm very excited about the opensourcing of MS's CLR. It's soooo fast and memory efficient . I'm sure good things are coming soon. (Unless there's something shady I'm not aware of, like something fundamental that's missing :P ).
    Last edited by Szabo; 10-08-2015, 10:37 PM.

    Comment


      Well you could start new thread instead of resurrecting this hell

      There is consistent interest in C#, there some project poping in and one, one of them got cancelled due to some UE4 EULA issues... but i don't remember names of those projects ^^' just search in forums you should find it.

      Also what exact walls you hitting in C++? You know C# in UE4 will not be much different in terms of APIs, or else creator of implementation will go some crazy route
      =========
      My Tutorials:
      Basic knowledge about Classes and UObject environment and stuff like that

      Comment


        I want to put my 2 cents in and I am sure that I am just restating what some one has already stated. Unity only uses C# for scripting which in my opinion is better, however just like someone stated Unity is programmed in C++ which is the language of choice in high end game engines. Can you make a game engine in VB and or C#? yes but it will not be on the same level. C++ isn't really that hard to learn, or at least enough to work with Unreal.

        Comment


          To use UE4 well, as a C# scripter, all you need to become comfortable with are dealing with pointers/references + minor syntax:
          (learn when and why you should use "*obj", "obj*", "obj&", etc; learn when and why you use "::", ":", "." or "->" while in C# every access is just ".")
          Close to anything else inside of UE4's C++, which is different from regular C++, is just a matter of reading docs, Answers.com and accumulating experience.
          | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

          Comment


            Originally posted by Shadowriver View Post
            Well you could start new thread instead of resurrecting this hell

            There is consistent interest in C#, there some project poping in and one, one of them got cancelled due to some UE4 EULA issues... but i don't remember names of those projects ^^' just search in forums you should find it.

            Also what exact walls you hitting in C++? You know C# in UE4 will not be much different in terms of APIs, or else creator of implementation will go some crazy route
            The problem is not only that I'm not very used to what BrUnO XaVIeR said, but also the kind of nonsense in that video. I don't aim to be a full-time specialized programmer, so perhaps that's why I'm not very happy with C++. The fact is, as a solo developer, I found in Unity the best 'overall game designer' experience. It's easy for one person to accomplish all the tasks needed to put a game together, like scripting, importing models (I model in Blender these days, and they are imported much more nicely than UE4), configuring settings like texture compression for your assets, some basic level editing (although I don't like it personally), and to do all of that I don't need a specialization in all these areas. The 'advanced' topics I learned was mostly by experience and for necessity.

            Unreal unfortunately is not that friendly, perhaps for a small team, say, at least 3 (programmer, artist, designer), the experience is good, but as a single developer I'm sorry but it's overwhelming.

            Originally posted by BIrvin View Post
            I want to put my 2 cents in and I am sure that I am just restating what some one has already stated. Unity only uses C# for scripting which in my opinion is better, however just like someone stated Unity is programmed in C++ which is the language of choice in high end game engines. Can you make a game engine in VB and or C#? yes but it will not be on the same level. C++ isn't really that hard to learn, or at least enough to work with Unreal.
            I don't agree... Unity is a high performance C++ engine with C# scripting, and as I said, Mono really sucks in Unity, but still, it's somewhat the best of both worlds. I'm very sure that since MS opensourced their CLR, we are going to see some quite good pure-C# engines/frameworks pretty soon. My guess is C++ still rules because of the inertia in the industry. It's faster, yes, but if you really needed that extra speed you won't be using a general purpose engine at all.
            Last edited by Szabo; 10-27-2015, 12:13 PM.

            Comment


              Originally posted by Szabo View Post
              The problem is not only that I'm not very used to what BrUnO XaVIeR said, but also the kind of nonsense in that video. I don't aim to be a full-time specialized programmer, so perhaps that's why I'm not very happy with C++. The fact is, as a solo developer, I found in Unity the best 'overall game designer' experience.
              In that case it would make sense for you to switch back to unity.
              If you could handle C#, you should be able to handle C++ in Unreal as well, because you don't NEED advanced features here and there are facilities in place to make your life easier. Failing that, there are blueprints.

              Comment


                Originally posted by NegInfinity View Post
                In that case it would make sense for you to switch back to unity.
                If you could handle C#, you should be able to handle C++ in Unreal as well, because you don't NEED advanced features here and there are facilities in place to make your life easier. Failing that, there are blueprints.
                I hear people saying that all the time, but so far I didn't actually find anything (guide/tutorial or docs) that doesn't make me feel I'm going backwards in terms of technology.

                Comment


                  If you were able to learn basic C# you can learn enough C++ to do UE in a very short time. It's pretty trivial and lots of help and information is available. The UE framework itself is far more difficult to comprehend and that wouldn't change regardless of what language it used.

                  If you're comfortable limiting yourself to last-gen stuff then Unity is fine for your needs.

                  Comment


                    Since you've resurrected this dead horse, I will beat it again by saying that if you are gonna try UE4, you should give Blueprints a chance; you will be genuinely surprised how much you do not need code. BPs are more or less a visual wrapper of UnrealScript...writing BPs IS writing code!

                    Comment


                      Originally posted by bleeds187 View Post
                      Since you've resurrected this dead horse, I will beat it again by saying that if you are gonna try UE4, you should give Blueprints a chance; you will be genuinely surprised how much you do not need code. BPs are more or less a visual wrapper of UnrealScript...writing BPs IS writing code!
                      Too bad you can't compile a plugin out of blueprints.

                      Comment


                        Not exactly the first thing a new developer to UE4 does, especially when transferring from Unity. Hate on BPs == premature optimization.

                        Comment


                          Originally posted by bleeds187 View Post
                          Not exactly the first thing a new developer to UE4 does, especially when transferring from Unity. Hate on BPs == premature optimization.
                          Yep; I had 3 years experience on Unity and other half a dozen engines, from objective-C to C# and C++ plugins and tools I've built, some used by known studios...
                          Yet I invested more than 4 months exclusively to Blueprints never touching any code at all just to see till where it could take me. I then knew for sure that if you don't need engine customizations, you pretty much don't need C++.
                          | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                          Comment


                            You even have a plugin in your sig. :P

                            Can't compile a blueprint to a plugin as far as I'm aware. We need to add a side case where we understand that plugins are like packaged engine customizations. I certainly can't talk to DLLs using blueprints. All the stuff Rama does works way better as C++ modules.

                            Comment


                              Thanks guys.

                              My problem with BP is not the performance (although I have plenty of prototypes on hold because of performance issues, and BP isn't exactly performant), but the problem is, I think writing code is a really nice way to program. I don't like visual programming at all. I can't even stand the material nodes in most 3D packages and surely don't want something similar to create logic.

                              Also, I don't consider my C# knowledge 'basic'. I once opened an 'advanced' book on C#, and perhaps that book was just not very advanced, but I knew 90% of what was there, like Threads, Generics, Events, Lambdas, Delegates, etc. I've programmed in C a lot in the past too (AVR microcontrollers), and I did try some technologies like Allegro and SDL on the old days before I started using Blitz Research products.

                              I really appreciate having an 'easy' language for stuff that doesn't actually need performance, but visual stuff just scares me away.

                              Another point is that I just can't seem to find docs when I need. For example, procedural generation is a thing for most of my games, recently I've been using a modular approach since the ROI is better imho, but I'm very interested in Mesh generation. For Unity it's simple to find, I type "Unity Mesh" on Google/Duckngo/Official_Docs and I end up exactly where I want, all info I need on my fingertips. In case of UE4 I'm yet to find the equivalent docs (in a concise and exemplified way if possible), and I'm sporadically searching for that for months, no kidding. I've seen the pages on "UMeshComponent", "UProceduralMeshComponent", "UStaticMesh", etc. but nothing conclusive. Perhaps that's just me being real dumb but the docs are failing miserably for me. The API also seems too much complicated for a newbie. UObject has 2000 derivates. I'm not saying that's bad per se, but definitely it's not noob friendly.

                              Also, on a less important note, header files annoy the **** out of me.

                              Comment


                                C++ is not like C#, especially with the UE4 macros, conventions and added complexity; its not for the feint of heart (not saying you are, but until you do a big project with UE4 C++ you should want to do nothing more than a Hello World and work up the chain).

                                As for perf concerns that just loom these threads....there arent any; in a single folder of a UE4 project I am currently on we have over 1000 Blueprints (one thousand, yes) that weigh in at over 300mbs in file size. I have personally made a procedural placement system capable of randomly generating large interior spaces with props, AI, etc. all controlled by 3 Blueprints and 3 interfaces (you are not limited here).

                                Considering perf before you are even out of the project wizard is, to put it mildly, putting the cart before the horse. Code is slow, the Editor takes upwards of 20 minutes to compile with Incredibuild and 200GHz of power via helpers; you also would need to compile your client and server targets. At best iterating a single code file and relying on hot reload takes several minutes with incremental linking; changing a BP and hitting play...seconds.

                                Regardless of BPs or code you should not consider optimization until you are much further along and/or are having problems; at that point you are a Ctrl + Shift + , (frame profiler shortcut) from having 90% of your perf answers.

                                Comment

                                Working...
                                X