Announcement

Collapse
No announcement yet.

Why C++ for Unreal 4?

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

    Originally posted by ShadowKindGames View Post
    @sandboxgod: What are you talking about? How about you be more constructive and add a bit of detail to your post? That reply was in "Poor taste"..
    Whoops! Turns we know each other from Unity forums. Small world, small world....
    Godz for UT '99 / UT 2003

    Comment


      Originally posted by smallB View Post
      I genuinely don't want to hear about python, javascript, java nor c# where games (AAA games) are involved.
      Go here http://readwrite.com/2011/06/06/cpp-...oBB4syd7S289Rq,
      see how some of the languages compare to C++.

      Why would anyone choose anything but C++ for AAA game development is beyond me.

      But it is not even about the performance.
      The deeper you go with coding the more you starting realize that C# or Java are not only not easier but lots of things are far more difficult to do with them than with C++.

      Guys, is C++ perfect? Absolutely not. Is it better for games development than C# or Java or any other modern language. Without any doubt.
      Well main reason why they did that was to let users to play with the code and "mod" the game without needs of giving out header files, i reamber hearing developer interviews back then saying you can modify game whatever you like thanks to python. Same goes with UnrealScript, in UE1 editor even have text editor for them
      =========
      My Tutorials:
      Basic knowledge about Classes and UObject environment and stuff like that

      Comment


        Originally posted by smallB View Post
        I genuinely don't want to hear about python, javascript, java nor c# where games (AAA games) are involved.
        Go here http://readwrite.com/2011/06/06/cpp-...oBB4syd7S289Rq,
        see how some of the languages compare to C++.

        Why would anyone choose anything but C++ for AAA game development is beyond me.

        But it is not even about the performance.
        The deeper you go with coding the more you starting realize that C# or Java are not only not easier but lots of things are far more difficult to do with them than with C++.

        Guys, is C++ perfect? Absolutely not. Is it better for games development than C# or Java or any other modern language. Without any doubt.
        Not sure why you have such a high disdain for other languages. Normally, your game logic will literally run circles around a render frame. Sometimes your game thread can make multiple game logic passes before the render thread even has a chance to consume the frame

        So this is how things work in a few game engines I've seen that use a multithreaded renderer. There are normally 2 approaches (trying to stay brief no one needs a wall of text)

        Approach 1:
        Game/Main thread produces the logic for the frame and submits this to the multithreaded renderer. After this frame has been submitted, it does a lot of busy work. Like run physics jobs in parallel, animation jobs for next frame, etc. Afterwards, it may stop and wait for the render thread to come back

        Approach 2:
        Game/Main thread runs parallel with the render thread. Game thread runs through logic for the frame and then submits this data when it's done. But unlike approach #1, it doesn't stop and wait on render thread. It keeps going, working on the next frame. It is possible render thread will 'miss' a game frame. So to present this case the Game thread is busy making sure all the data he is going to pass on contains complete information, tricking render thread into thinking he has a 'complete' up-to-date frame copy

        In both cases, your game thread is so fast, he is waiting on rendering. Render thread is often busy computing shadows (Cascade shadow maps, etc), running post effects, running the deferred renderer, etc.

        My point is that in most engines you usually have plenty of CPU left for a high level language.

        Where problems creep up in AAA games or rather, porting these games, is getting that game to run on a lower target. This is when you might look at your scripts with a scope.

        My last title I worked on it was running at 60 fps. I think the game had 2 script VMs running and we were still GPU bound. Not CPU bound. We didn't have to change not a single script when we down-ported it to other platforms

        So my main point is for sure you have plenty of bandwidth for other languages.

        [edit] I just made a very broad statement there. And of course I only refer to using these other languages for Game logic. Plus, physics was run on another thread. On our target platforms, we had at least 4 cores available to run jobs and at least 3 you have 100% control over without the 'system OS' interrupting
        Last edited by sandboxgod; 04-16-2014, 09:33 AM.
        Godz for UT '99 / UT 2003

        Comment


          (Sorry forums for all the posts but I felt my other post was too long winded and didn't even answer his question)

          Originally posted by smallB View Post
          Why would anyone choose anything but C++ for AAA game development is beyond me.
          Ok, another try to see if we can find some middle ground here.

          Usually you go with a scripting language because you have a Designer/Artist/VFX/Audio sitting there and they usually outnumber the programmers by a wide margin. Plus, their salaries are lower (see game industry surveys).

          What to do? You have a 100+ studio and an army of non-programmers. So you toss them into your codebase. But wait- if you let these 'newbies' into your C++ codebase you've just unleashed HELL. Memory stomps, memory overruns, etc. Nightmare! And no one really does code reviews like they should to begin with.

          So you give them a scripting language. And to encourage their productivity you make it a rapid prototyping language.

          At one company I worked it, it got so bad at one point C++ was taking like 20 mins to compile even with that popular Agent everyone uses (Incredibuild). It was our fault. But it happened. Eventually we got SSDs and they got it down to 5mins or less.

          Back then I did mostly gameplay programming so I would do all my hacks in the scripting language too. After all, virtually no compile time > 5 mins


          Granted, I am seeing a shift now where a lot of smaller studios ((50<) are dumping scripting languages in favor of visual scripting. I think the Designers were happier when they had both scripting and visual scripting. This gave them full control.

          But I digress. I gave you my point of view. I don't expect to change your point of view. But I think this worked really well. And it's surprising. You'll see even Artists scripting little things if you let them
          Godz for UT '99 / UT 2003

          Comment


            Originally posted by sandboxgod View Post
            (Sorry forums for all the posts but I felt my other post was too long winded and didn't even answer his question)



            Ok, another try to see if we can find some middle ground here.

            Usually you go with a scripting language because you have a Designer/Artist/VFX/Audio sitting there and they usually outnumber the programmers by a wide margin. Plus, their salaries are lower (see game industry surveys).

            What to do? You have a 100+ studio and an army of non-programmers. So you toss them into your codebase. But wait- if you let these 'newbies' into your C++ codebase you've just unleashed HELL. Memory stomps, memory overruns, etc. Nightmare! And no one really does code reviews like they should to begin with.

            So you give them a scripting language. And to encourage their productivity you make it a rapid prototyping language.

            At one company I worked it, it got so bad at one point C++ was taking like 20 mins to compile even with that popular Agent everyone uses (Incredibuild). It was our fault. But it happened. Eventually we got SSDs and they got it down to 5mins or less.

            Back then I did mostly gameplay programming so I would do all my hacks in the scripting language too. After all, virtually no compile time > 5 mins


            Granted, I am seeing a shift now where a lot of smaller studios ((50<) are dumping scripting languages in favor of visual scripting. I think the Designers were happier when they had both scripting and visual scripting. This gave them full control.

            But I digress. I gave you my point of view. I don't expect to change your point of view. But I think this worked really well. And it's surprising. You'll see even Artists scripting little things if you let them
            Actully most artists usally don't understand scripting languages either and they searching for programer, for them UnrealScript looks same as "bad" as C++ visual scripting helps them out
            =========
            My Tutorials:
            Basic knowledge about Classes and UObject environment and stuff like that

            Comment


              Yeah I agree but every so often you get that rare gem that can script. For instance, here our Technical Artist can code in C#, script in Maya (MELScript), help with shader code, etc.

              Ideally though you don't want the Audio/SFX guys touching any script but I do recall most of them were fully capable.
              Godz for UT '99 / UT 2003

              Comment


                Originally posted by sandboxgod View Post
                Yeah I agree but every so often you get that rare gem that can script. For instance, here our Technical Artist can code in C#, script in Maya (MELScript), help with shader code, etc.

                Ideally though you don't want the Audio/SFX guys touching any script but I do recall most of them were fully capable.
                I can do art and code C++. Maybe I'm not best at C++, but good enough to watch my self, and ready to go library in form of UE4 helps a lot. GC in UE4 resloves many possible issues for memory management, though you still want to watch yourself, and preferably delete objects manually when you no longer need them. Just to be safe.

                For me, it is really not about what you can do. But what you want to learn.
                As a side point, if start with "nooo it's to hard I don't know how to do it, let someone else do it for me", then you probably never learn anything.

                edit:
                To be honest I also would prefer some other languague instead of C++. Header files drive my crazy, no built in reflection system also doesn't help, some of syntax is just atrocious compares to C# (lambdas), lack of LINQ for collections browsing also can be PITA.

                Important thing to realize that for gameplay programming we only use small subset of C++ functionality. If you are pro you can get all the power, but if you are not, can still produce working code without known any of more esoteric functionality of C++.
                Last edited by iniside; 04-16-2014, 12:29 PM.
                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 MonsOlympus View Post
                  I dont think it matters what IDE or language it uses
                  To some it doesn't, to some who actually want to do more than just bare minimum and are not afraid to put sweat and blood into it, it does matter a lot.

                  Comment


                    Originally posted by smallB View Post
                    I genuinely don't want to hear about python, javascript, java nor c# where games (AAA games) are involved.
                    Go here http://readwrite.com/2011/06/06/cpp-...oBB4syd7S289Rq,
                    see how some of the languages compare to C++.

                    Why would anyone choose anything but C++ for AAA game development is beyond me.

                    But it is not even about the performance.
                    The deeper you go with coding the more you starting realize that C# or Java are not only not easier but lots of things are far more difficult to do with them than with C++.

                    Guys, is C++ perfect? Absolutely not. Is it better for games development than C# or Java or any other modern language. Without any doubt.
                    The thing is we are NOT AAA developers, as much as I believe in the power of one person or small teams or even mid tier size teams. There is only so many hours in a day and only so much we can get through, whatever makes life easier for us.. Games development is difficult and making the equivalent of Dragon Age 3 for a team of ten could take 5 years + although thankfully due to quicker iterations, scripting for junior engineers and better workflow in engines like Unity and now Unreal 4 things are a lot brighter for us.

                    Unity found merit in allowing small developers to have access to rapid workflow concepts, including rapid language choices. But this conversation is Moot anyway, Epic give us access to Blueprint's, the engines in Beta and I think it's nothing short of amazing. We have C# coming to UE4 anyway.. It's win win for everyone.

                    The language choice is largely irrelevant to me, when you have staff eating away at your funds the only things I care about is making a good product, time and money. If said language stopped me from making a "good product" then it would become an issue.

                    Comment


                      Originally posted by ShadowKindGames View Post
                      The thing is we are NOT AAA developers
                      I am and I'm pretty sure some others too.


                      Originally posted by ShadowKindGames View Post
                      The language choice is largely irrelevant to me
                      To me is very relevant.
                      If I have a choice between mediocrity and excellence I go for excellence each and every time.
                      C#/Java/python and what not are mediocre languages allowing at best mediocre results. It is not for me.

                      Comment


                        Originally posted by smallB View Post
                        I am and I'm pretty sure some others too.



                        To me is very relevant.
                        If I have a choice between mediocrity and excellence I go for excellence each and every time.
                        C#/Java/python and what not are mediocre languages allowing at best mediocre results. It is not for me.
                        These languagues are not medicore, but they were never meant for creating high perfomance applications like games in first place.
                        C# is closest to it, with new native compiler. But when we will see this compiler in public is whole another question, and it will probably be locked only to Microsoft platform anyway.
                        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 smallB View Post
                          I am and I'm pretty sure some others too.



                          To me is very relevant.
                          If I have a choice between mediocrity and excellence I go for excellence each and every time.
                          C#/Java/python and what not are mediocre languages allowing at best mediocre results. It is not for me.
                          I've got to admit, I'm intrigued.. There isn't that many AAA's left out there, most of them use their own internal engines because it makes more sense to..

                          Which one are you with?

                          Comment


                            Originally posted by sandboxgod View Post
                            Yeah I agree but every so often you get that rare gem that can script. For instance, here our Technical Artist can code in C#, script in Maya (MELScript), help with shader code, etc.

                            Ideally though you don't want the Audio/SFX guys touching any script but I do recall most of them were fully capable.


                            Scripting language for non-programmers (artists, rule designers, testers…) for productivity is fully naive fantasy. Whatever they use, non-programmer people are not able to *design* and *debug* program structure, and their code is simply full of patchworks and bugs - ultimately wastes programmers' time. And if you're running a large team, then you probably want best people in their profession. And best people (artist or whoever) usually never give a **** on any other profession - such as scripting.

                            I know a few of people can do both of code and art, but that's pretty exceptional case.

                            And, CG TAs are different. Because their script is not their *product*. Whatever they put on their script, it will not be shipped to customers. It will break only their system. What they ship is just rendered images. I wouldn't care whatever script they use for their own work, but for the product? That's pretty harmful.

                            The only way to make them to work properly on final product stuff is providing declarative and static authoring tool which performs full validation on everything to prevent their bugs. That's what GUI editors do.

                            In that context, a programming language should be chosen only for programmers.

                            Comment


                              Ah, if only the budgets were big enough to staff only engineers (but they never are). Then Designers could just focus on 'planning' the game.

                              And sadly, I've seen programmers introduce way worse bugs then designers. Designers are within a 'sandbox' and are firmly restrained. But the programmer can wreck great havok in C++. For the average AAA project I am that guy that gets pulled in to fix those buffer overruns, data race conditions, NaNs, and memory stomps (sometimes for optimization but not often). I would estimate many, many man hours are wasted away putting out fires

                              Granted, some of this might get alleviated if people didn't have such strong egos in my industry and would let someone peer review their submits
                              Godz for UT '99 / UT 2003

                              Comment


                                Originally posted by smallB View Post
                                I am and I'm pretty sure some others too.
                                --SNIP--
                                C#/Java/python and what not are mediocre languages allowing at best mediocre results. It is not for me.
                                I have trouble picturing too many AAA studios that would hire someone with such a closed minded perspective on tools.

                                Comment

                                Working...
                                X