Announcement

Collapse
No announcement yet.

Why C++ for Unreal 4?

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

    These are all very good points, of course, but why doesn't the same logic apply to Blueprint? What makes it so different?
    The factors making Blueprints more manageable than a full-fledged scripting language include:

    The surface area of the engine exposed to Blueprints is smaller and more focused than what existed in Unreal Engine 3 with UnrealScript, since the audience is designers and not traditional programmers.

    Further, it's exposed via the C++ metadata generator which is about as simple and minimal as it could be -- I'll guess 2 orders of magnitude simpler than e.g. Mono.

    However, the problem of separate debuggers still exists, since you can't seamlessly transition from the C++ debugger to the Blueprint debugger.

    Ultimately, it's much less slippery a slope in this case because there is much less overlap between Blueprint designers and C++ programmers than, say, C++ and UnrealScript/LUA/C# programmers.

    Comment


      Originally posted by mikepurvis View Post
      I bought UT99, UT2004, and UT3 just to make maps and mod them. Everyone in the community then did. It didn't stop people like myself buying a full priced game back then and $19 won't now.
      But things are different now. Would you have bought those games if an SDK equivalent to the current one were available? Why make a mod when you can make the whole FPS?

      Not to mention that those games target a different sort of player. The Unreal games were AAA titles that could hold their own against technological juggernauts like Quake III Arena and Doom 3. They were among the games everybody had to have. If you bought the Unreal games just to mod them, that's because they were such big hits and played by hundreds of thousands of players. That situation is analogous to mine how, exactly?

      I mentioned how I'm reluctant to spend much money when buying an individual game. That wasn't always the case. It used to be you had to buy a game in a box at the store, and if you wanted something modern, you probably had to pay out the ear for it. Nowadays there are tons of gamers, myself included, who have more games than they know what to do with, thanks to the indie scene and frequent sales on Steam and gog, not to mention Humble Bundles. (I don't buy Humble Bundles, but I know plenty of people who do.) So we're not looking to spend tons of cash on any one game. There are of course still AAA titles that manage to sell just fine at $60 per copy -- but the game I'm developing isn't one of them. The people who would buy my game probably have more in common with me and the way I buy games than the people buying AAA stuff. Steam is currently releasing 2000 games a year, and while I'm confident I can make a game that is better than at least 90% of those games, it will still be difficult not to get lost in that sea. I will need every bit of help that I can get, and providing mod functionality for free certainly can't hurt.


      Originally posted by Tim Sweeney View Post
      The factors making Blueprints more manageable than a full-fledged scripting language include:

      The surface area of the engine exposed to Blueprints is smaller and more focused than what existed in Unreal Engine 3 with UnrealScript, since the audience is designers and not traditional programmers.

      Further, it's exposed via the C++ metadata generator which is about as simple and minimal as it could be -- I'll guess 2 orders of magnitude simpler than e.g. Mono.

      However, the problem of separate debuggers still exists, since you can't seamlessly transition from the C++ debugger to the Blueprint debugger.

      Ultimately, it's much less slippery a slope in this case because there is much less overlap between Blueprint designers and C++ programmers than, say, C++ and UnrealScript/LUA/C# programmers.
      Ah, thanks for the clarification.

      Comment


        You guys that want to make your games moddable- have you modded a game before? If you have like I had- then you know modders tend to only flock to games with a mega huge fanbase (like Skyrim, Unreal, Half Life, Quake, etc). I would think your first priority would be acquiring that big fanbase. Then you worry about adding on modding capability but probably not before. You probably want to make sure your game is fun to begin with and has a solid following first

        I know back in the day we made Godz (UT mod) moddable. We had a decent size fanbase and some servers. You know how many mods that popped up? Like zero (unless you count the player run servers that changed their settings). Luckily we didn't invest much time at all exposing our tools to the community.
        Godz for UT '99 / UT 2003

        Comment


          I would think it's much easier and more sensible to build a game for modding from the ground up than to bolt on a modding system afterward, which would likely imply heavily reworking large, significant sections of code, and then testing all that code all over again. If nobody uses the modding system, then oh well. Still better to take the chance than to be unprepared, IMO.

          Comment


            Originally posted by sandboxgod View Post
            You guys that want to make your games moddable- have you modded a game before? If you have like I had- then you know modders tend to only flock to games with a mega huge fanbase (like Skyrim, Unreal, Half Life, Quake, etc). I would think your first priority would be acquiring that big fanbase. Then you worry about adding on modding capability but probably not before. You probably want to make sure your game is fun to begin with and has a solid following first

            I know back in the day we made Godz (UT mod) moddable. We had a decent size fanbase and some servers. You know how many mods that popped up? Like zero (unless you count the player run servers that changed their settings). Luckily we didn't invest much time at all exposing our tools to the community.
            Steam workshop has changed this.

            Comment


              This thread is frightening.
              The ignorance of c++ developers arguing about c# is absolutely mind-blowing.

              Really if you don't know what you are talking about (ie 5 years of professional experience in a language) you should really say nothing at all.

              The main reasons why c++ is so prevelant for games is that opengl and directx predate other languages and are written in c++. It *IS* faster provided you sit down and optimise it. By that i mean you have a very strong understanding of algorithms and the interactions of code with the cpu, branch prediction, cache misses etc. However if you are on here reading this then i think that is WELL over your head. As such perhaps you should be picking a language that lets you get stuff done. With unreal the choice is made for you its c++, however in terms of productivity c# will blow your mind - howerver this engine seems to have an amazing editor so that is a huge learning curve diminished. As for optomisation, cross platform, multi threading c# can get close, very close, but you get there faster. The bigger the app the faster you get there.

              The tooling for c# when you add things like resharper is second to none, i love c++ but leaving c# makes me cry. There isnt anything for c++ that comes close to visual studio and resharper. (Please prove me wrong i have invested a lot of time and money in finding it) It is a pure pleasure to code in and everything i write works because it is c and it lends itself to acceptance test driven development so well. With c++ you get wierd *** interactions because you can.

              Really when you pick a language performance of the language now is not the concern, the expensive resource is developers and the hours of work they have to put in. Computers are cheap and by the time you release computers will of caught up with whatever you need them to anyway. If they do not its usually because your algorithms suck.

              Comment


                Originally posted by Devlin Kain View Post
                I was just curious, why did Unreal 4 decide to go with C++?
                ...
                new programmer on engines here
                ...
                Dev
                You answered already to your question.

                Stop asking for C# please.. some one gives you a Ferrari and you still want to drive a second hand car?

                Comment


                  Originally posted by TDoro View Post
                  You answered already to your question.
                  What a condescending attitude. Unity is not developed by or for new programmers, at least primarily, and they get by just fine. While I think UE4 suits my style better than Unity, I don't think Unity is an engine only suitable for noobs and idiots. Do you?


                  Stop asking for C# please.. some one gives you a Ferrari and you still want to drive a second hand car?
                  C++ is faster, sure, but it's also inferior in terms of features. I could just as well counter your argument with "Someone gives you a handaxe and you still want a chainsaw?"

                  Again with the performance canard. It isn't even why UE4 uses C++ -- Tim Sweeney's post on page 1 never even mentions performance. Do I have to remind you that I coded a game in Python that ran at hundreds of FPS on my old 2006 computer? Moreover, how many of us are making games that will be pushing the hardware to the limit? I have two games I'm toying around with developing. One of them is a real-time strategy game with a low unit count and the other is an adventure game. Neither of them is going to require the latest and greatest. Why would I trade off usability for performance I don't even need?

                  Comment


                    Originally posted by furrykef View Post
                    What a condescending attitude. Unity is not developed by or for new programmers, at least primarily, and they get by just fine. While I think UE4 suits my style better than Unity, I don't think Unity is an engine only suitable for noobs and idiots. Do you?




                    C++ is faster, sure, but it's also inferior in terms of features. I could just as well counter your argument with "Someone gives you a handaxe and you still want a chainsaw?"

                    Again with the performance canard. It isn't even why UE4 uses C++ -- Tim Sweeney's post on page 1 never even mentions performance. Do I have to remind you that I coded a game in Python that ran at hundreds of FPS on my old 2006 computer? Moreover, how many of us are making games that will be pushing the hardware to the limit? I have two games I'm toying around with developing. One of them is a real-time strategy game with a low unit count and the other is an adventure game. Neither of them is going to require the latest and greatest. Why would I trade off usability for performance I don't even need?
                    You can always wait for someone who will make C# bindings.

                    Epic for high level coding is using Blueprints, and its there where all the effort id going.
                    https://github.com/iniside/ActionRPGGame - Action RPG Starter kit. Work in Progress. You can use it in whatever way you wish.

                    Comment


                      Benchmark

                      Originally posted by enlight_2014 View Post
                      The Unity core is not written in C#, it's in C/C++, they exposed the public API via a C# wrapper. I don't have the latest benchmarks on just how much slower C# is than C++ these days, but with anything but a toy engine the performance hit you'd take by writing your entire engine core in C# is not going to be acceptable.
                      Last time I checked, for standard math applications C# is ~30-50 times slower than C++ native. With todays powerful machines though, it doesn't really matter as much as it once did, unless of course you are working on some uber project that uses some hardcore bleeding edge features. Anyhow that's my two cents for what they are worth (with inflation they seem to have depreciated though...****)

                      Comment


                        Originally posted by furrykef View Post
                        I would think it's much easier and more sensible to build a game for modding from the ground up than to bolt on a modding system afterward, which would likely imply heavily reworking large, significant sections of code, and then testing all that code all over again. If nobody uses the modding system, then oh well. Still better to take the chance than to be unprepared, IMO.
                        That's what 2.0 is for. If your first game out the gate sells a million copies then you'll have the resources to make a second and a primed market for it. Here's to hoping!

                        Comment


                          Originally posted by furrykef View Post
                          C++ is faster, sure, but it's also inferior in terms of features.
                          Could you name some missing features from C++ and what C# got better if you want anyone to take your statement seriously?

                          Originally posted by iniside View Post
                          You can always wait for someone who will make C# bindings.
                          Some of us are here to make games and not wait, and use that it's proven to be good for years. The fact that Unreal use C++ is even better for me and some others.

                          Originally posted by Gamonos View Post
                          Last time I checked, for standard math applications C# is ~30-50 times slower than C++ native.
                          There is no doubt C# is slower that C/C++ right now, and 30% speed is HUGE, in some contexts.


                          In other order of ideas, I've seen peoples here and in some other threads claiming 10-25 years of experience in 10-25 programing languages, and explaining how good is C#. Folks, years of "experience" proves nothing, and can only intimidate kids. You can't use that as argument, to prove that C# is better that C++, just because "you know it".

                          Comment


                            For those users who have difficulty learning C++, the blueprint is currently at the same level of C++? That only serves to prototype the base game as well as kismet?
                            Currently study the programming language C++, but I have difficulty. I know use the pascal language for programming. It would be possible pascal in UE4.x?
                            Unreal Development Kit/Unreal Engine 4 User

                            "You're not getting what you want? Then calm, relax, push yourself a little more and wait for your moment to arrive, because everything has its time."

                            Comment


                              Originally posted by TDoro View Post
                              Could you name some missing features from C++ and what C# got better if you want anyone to take your statement seriously?
                              The way you're allowed to screw up without having the compiler ever spit out reams of gobbledygook that even experts can't decipher would be a good start. :P

                              On a more serious note, I can't speak for C#, but my language of choice, Python, has things like hash table literals, list comprehensions, and generator expressions (which are basically list comprehensions without the list part). These two things alone come in handy all the time, and there are many more examples I can name. Can you write equivalent C++ code? Yes, of course you can. You can write equivalent C or ASM code too; that isn't the point. The point is the code is more concise and keeps you closer to the problem domain, meaning less time is spent on technical drudgery. Every time I write in C++, I find myself sorely missing these conveniences. If you're not missing them, it's probably because you've never taken advantage of them.


                              Originally posted by TDoro View Post
                              There is no doubt C# is slower that C/C++ right now, and 30% speed is HUGE, in some contexts.
                              Yes, and how many of us are going to be dealing with any of those contexts? And those contexts are going to account for what percentage of the overall program?

                              Remember that Tim Sweeney didn't even cite performance as a reason for dropping scripting support. I don't know why everybody in this thread keeps harping about it.

                              Comment


                                Originally posted by sandboxgod View Post
                                You guys that want to make your games moddable- have you modded a game before? If you have like I had- then you know modders tend to only flock to games with a mega huge fanbase (like Skyrim, Unreal, Half Life, Quake, etc). I would think your first priority would be acquiring that big fanbase. Then you worry about adding on modding capability but probably not before. You probably want to make sure your game is fun to begin with and has a solid following first
                                Not really true. Look at Mount & Blade. The game only became hugely popular (for an indie) AFTER the community took it upon themselves to reverse engineer the file formats for the game's data, and implement their own modding tools.

                                I know because I was the first one to reverse the graphics format in order to allow modders to add uniquely textured items, faces, horses etc. and made the first graphical mods.

                                M&B would not have had the success it did if not for the community wanting to mod it, and it was a small community back then (in 2004-2005).
                                Storyteller - An immersive VR audiobook player

                                Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

                                Comment

                                Working...
                                X