Announcement

Collapse
No announcement yet.

Why C++ for Unreal 4?

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

    I'll be glad once Epic Games improves the workflow a little more. Right now, when we add variables to a Class we have to close down the editor and restart. This is lost productivity. My guess over there they are usuing SSD drives which has become pretty standard in the industry. I guess I will get an SSD at home.

    For now though I am trying to stick to only defining core stubs in C++ and extend the gameplay in blueprints.

    Blueprints really are quite wonderful. I suspect I will slowly become much more active over there (in the Blueprint forum)

    It's just so easy and intuitive.
    Godz for UT '99 / UT 2003

    Comment


      Originally posted by sandboxgod View Post
      I'll be glad once Epic Games improves the workflow a little more. Right now, when we add variables to a Class we have to close down the editor and restart. This is lost productivity. My guess over there they are usuing SSD drives which has become pretty standard in the industry. I guess I will get an SSD at home.

      For now though I am trying to stick to only defining core stubs in C++ and extend the gameplay in blueprints.

      Blueprints really are quite wonderful. I suspect I will slowly become much more active over there (in the Blueprint forum)

      It's just so easy and intuitive.
      You don't have to close the editor in order to compile your C++ game code. Just use the "Compile"-button in the editor's toolbar to compile your code. That'll work just fine and you don't have to close the editor at all.

      Comment


        Originally posted by sandboxgod View Post
        I'll be glad once Epic Games improves the workflow a little more. Right now, when we add variables to a Class we have to close down the editor and restart. This is lost productivity. My guess over there they are usuing SSD drives which has become pretty standard in the industry. I guess I will get an SSD at home.

        For now though I am trying to stick to only defining core stubs in C++ and extend the gameplay in blueprints.

        Blueprints really are quite wonderful. I suspect I will slowly become much more active over there (in the Blueprint forum)

        It's just so easy and intuitive.
        Out of curiosity, what kind of load times are you talking about here? With a SSD and 8GB of RAM ( probably the two most determining factors for load time ) on Win8.1, it takes about 9 seconds to load the Strategy demo, then another 3 or so seconds to perform in editor actions. It's annoying, but certainly no major loss of productivity. What time frame are you seeing to load a level without a SSD?


        What's actually killing my Unreal usage is CPU usage. The Unreal Editor is seemingly designed to max out one core. On a desktop this is no big deal, but I do the majority of my work while out and about. If I am not near a plug, that simply means no Unreal work for me. On my primary laptop, I am lucky to get an hour and a half on battery. On my Macbook Air, I get a whopping 31 minutes from full battery to dead! For comparison, I could run Unity on that machine for about 5 hours on battery, and about 4 on my PC machine.

        Fortunately Unreal have acknowledged the issue and are hopefully working to fix it.
        Last edited by Serapth; 04-17-2014, 11:57 AM. Reason: I spel gud

        Comment


          Originally posted by ShawnBaxe View Post
          You don't have to close the editor in order to compile your C++ game code. Just use the "Compile"-button in the editor's toolbar to compile your code. That'll work just fine and you don't have to close the editor at all.

          Depends, if you add a class or change it's signature, you have to restart the editor. If you simply change code, you do not.
          Last edited by Serapth; 04-17-2014, 11:59 AM. Reason: Quick reply doesnt quote...

          Comment


            Originally posted by ShawnBaxe View Post
            You don't have to close the editor in order to compile your C++ game code. Just use the "Compile"-button in the editor's toolbar to compile your code. That'll work just fine and you don't have to close the editor at all.
            There are cases where you have to close the editor for sure. Like adding a new Class
            Godz for UT '99 / UT 2003

            Comment


              Originally posted by Serapth View Post
              Out of curiosity, what kind of load times are you talking about here? With a SSD and 8GB of RAM ( probably the two most determining factors for load time ) on Win8.1, it takes about 9 seconds to load the Strategy demo, then another 3 or so seconds to perform in editor actions. It's annoying, but certainly no major loss of productivity. What time frame are you seeing to load a level without a SSD?


              What's actually killing my Unreal usage is CPU usage. The Unreal Editor is seemingly designed to max out one core. On a desktop this is no big deal, but I do the majority of my work while out and about. If I am not near a plug, that simply means no Unreal work for me. On my primary laptop, I am lucky to get an hour and a half on battery. On my Macbook Air, I get a whopping 31 minutes from full battery to dead! For comparison, I could run Unity on that machine for about 5 hours on battery, and about 4 on my PC machine.

              Fortunately Unreal have acknowledged the issue and are hopefully working to fix it.

              Yeah UnrealEd sends my fan into overdrive. I noticed a friend of mine doesn't have this problem because he's water cooled

              Let's see, sometimes it appears to take quite awhile for this Editor to startup if I don't give it a default project. I'm not home right now so I don't have the numbers. Sometimes it can take 2 mins or so. But if I'm on a roll then it might only take 20-30 secs.

              I'm pretty thrilled at how nice Blueprint is though. Will probably only do the bare minimum in C++ and do everything possible in Blueprint.
              Godz for UT '99 / UT 2003

              Comment


                Originally posted by Serapth View Post
                ... this is a perfect example. People use scripting languages for many reasons that have nothing to do with the programmer's talent level. Hell, many single developer C++ based games still expose a scripting language. Just a few reasons:

                Programmer productivity
                Security/sandboxing
                Modding/extensibility by end user
                Data storage (Especially LUA/JSON)
                Easy Tooling
                Optimize link/build cycle
                (Logical) Separation of responsibility

                and yes
                Ease of Use.
                I agree 100% with this. I dropped out of the industry to go indie and wrote an engine in C++ and use Lua as a scripting language. You almost couldn't find two languages that are more opposite. Lua is duck typed and that leads to a lot of potential issues but for a small developer with only 1 or 2 people actually writing Lua code that's ok.

                Where I think the benefits of a dedicated scripting language start to get more grey is on much larger teams with lots of people of varying skill sets banging away on the script code. I think to choice of language to use for scripting in that case is heavily influenced how big and how much script gets written. Duck typing certainly has issues and statically typed languages, while arguably less flexible, do remove a large set of common errors.

                Definitely a trade off. In the case of UE4 I think C++ and Blueprints are a good balance.

                Another point I'd add is that writing Actor classes and gameplay in Unreal C++ does not force you into the esoteric and complex parts of the language. The frameworks they provide do the heavily lifting. Most of the code you need to write for gameplay in UE4 will be very straightforward C++, and all of the "hard to do things" are managed for you by the engine. It's actually a great environment to learn the C++ language.

                Comment


                  The only thing that really bothers me is the size of the generated code. The size of the intermediate folder for my small project is already ~2.5GB.

                  Comment


                    Originally posted by maikklein View Post
                    The only thing that really bothers me is the size of the generated code. The size of the intermediate folder for my small project is already ~2.5GB.
                    Intermediate code is never part of the shipping process and its size should be disregarded, it is temporary!

                    I send my team updated C++ binaries sometimes several times a day, and only sending the binaries and the source is under 100mb



                    Rama
                    Last edited by Rama; 04-17-2014, 01:21 PM.
                    100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

                    UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                    Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

                    Comment


                      Originally posted by sandboxgod View Post
                      Let's see, sometimes it appears to take quite awhile for this Editor to startup if I don't give it a default project. I'm not home right now so I don't have the numbers. Sometimes it can take 2 mins or so. But if I'm on a roll then it might only take 20-30 secs.
                      This tends to happen when files are spread out across a hard drive, and take much longer to load initially than subsequently when the files are cached. For optimal performance, compile and run from an SSD such as this awesome one: http://www.newegg.com/Product/Produc...9SIA2W014B1465

                      Comment


                        Originally posted by ShawnBaxe View Post
                        You don't have to close the editor in order to compile your C++ game code. Just use the "Compile"-button in the editor's toolbar to compile your code. That'll work just fine and you don't have to close the editor at all.
                        You have to, when you change the memory layout. so you can't create new classes/functions/variables but you can modify existing ones.

                        Comment


                          Ah okay...yeah...guess my brain was on vacation on this one Thanks for clarifying

                          Comment


                            Originally posted by Tim Sweeney View Post
                            and take much longer to load initially than subsequently when the files are cached.
                            Actually Tim and Epic,

                            This is something I've been meaning to congratulate you on!

                            I love how fast UE4 loads, after that first initial load! I open and close the editor frequently due to my workflow of testing from commandline, coding in c++, and loading editor for asset changes.

                            And UE4 loads so fast!

                            After the initial load, which does take longer, subsequent loads of UE4 are actually about 3-5 seconds on my computer, which is sooo nice, even faster than the UE3 UDK, by far

                            So congratulations on your cached Editor loading system, it is something I've always wanted to mention enjoying.



                            Rama
                            Last edited by Rama; 04-17-2014, 02:32 PM.
                            100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

                            UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                            Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

                            Comment


                              Originally posted by zoid View Post
                              Another point I'd add is that writing Actor classes and gameplay in Unreal C++ does not force you into the esoteric and complex parts of the language. The frameworks they provide do the heavily lifting. Most of the code you need to write for gameplay in UE4 will be very straightforward C++, and all of the "hard to do things" are managed for you by the engine. It's actually a great environment to learn the C++ language.
                              As someone who teaches people how to program, specifically games, I have struggled with this for a while. I have been asked dozens of times if Unity was a good way to learn to program. Should I learn to program then learn Unity, or should I learn to program while learning Unity? The same applies to Unreal Engine, and after all this time I dont have a good answer.

                              I can see merits both ways. One of the things that make learning easier is being hands on. If I could go back in time and learn 12th year math knowing it was directly applicable to game programming, I would have groked Matrix math, translations, etc... a heck of a lot easier. Learning something as a completely abstract concept is never easy.

                              On the other hand, without a foundation you are basically just putting magic numbers into a text file. How much of this is actually learning? I remember wayyyyy back, I used to enter page after page of basically binary code printed in a magazine to create a game. Did I learn anything in this exercise? Other than how to type, not really.

                              Learning with UE first would present some fairly interesting learning problems. First C++ syntax is a bit unwieldy to start with... without learning from scratch, its going to be pretty daunting. Templating syntax for example, isn't going to make any ****** sense until you know what a template is and what problem they solve. Then there are macros... a powerful feature of C++, and something UE relies on heavily, but also something that should be avoided like the plague while a learner.


                              I think in the end, my recommendation for people starting with C++ and UE4 is the same as people starting with Unity + C#. Start with the language basics, run through a beginner book and make the obligatory console apps, then try picking up UE4.

                              Comment


                                Originally posted by Serapth View Post
                                As someone who teaches people how to program, specifically games, I have struggled with this for a while. I have been asked dozens of times if Unity was a good way to learn to program. Should I learn to program then learn Unity, or should I learn to program while learning Unity? The same applies to Unreal Engine, and after all this time I dont have a good answer.

                                I can see merits both ways. One of the things that make learning easier is being hands on. If I could go back in time and learn 12th year math knowing it was directly applicable to game programming, I would have groked Matrix math, translations, etc... a heck of a lot easier. Learning something as a completely abstract concept is never easy.

                                On the other hand, without a foundation you are basically just putting magic numbers into a text file. How much of this is actually learning? I remember wayyyyy back, I used to enter page after page of basically binary code printed in a magazine to create a game. Did I learn anything in this exercise? Other than how to type, not really.

                                Learning with UE first would present some fairly interesting learning problems. First C++ syntax is a bit unwieldy to start with... without learning from scratch, its going to be pretty daunting. Templating syntax for example, isn't going to make any ****** sense until you know what a template is and what problem they solve. Then there are macros... a powerful feature of C++, and something UE relies on heavily, but also something that should be avoided like the plague while a learner.


                                I think in the end, my recommendation for people starting with C++ and UE4 is the same as people starting with Unity + C#. Start with the language basics, run through a beginner book and make the obligatory console apps, then try picking up UE4.
                                I agree, I should have been a little more clear: I think UE4 is a great environment to learn C++. I'd definitely recommend having a beginning C++ programming book with some examples under your belt.

                                UE4 eliminates is having to deal with setting up your programming environment, dealing with user input, and some of the peripheral things that can get in the way of pure programming.

                                Comment

                                Working...
                                X