Why C++ for Unreal 4?

[=VegasRich;47548]

As far as this raging debate goes, the engine was provided as is. If you want to add a scripting language, go for it. If you don’t want to, then don’t. Arguing over which language is better is pointless - I use several, each for different reasons. Like speaking, you should use the language that allows you to express yourself most appropriately for your purpose.
[/]

+1 to that, amen.

I know I’m a minority, and that it’d sure make my life easier if I could just stay with C#, but I see little point in complaining. Not like I don’t have other choices, but I chose to relearn C++ for this, so…yeah. As far as the price of the engine goes…gee, I dunno, I think coming from the perspective of potentially making a game that has a slight chance of becoming my day job, I’d call that reasonable. Never once even thought about it’s use for modding, so maybe ought to think on that…except, I dunno, something tells me that with the engine source out there and a great many still learning the system for themselves, it may not be long until somebody develops a modding extension for the marketplace. Would be kinda shocked if this turned out to be an impossible thing to plug into UE4.

But anyway, that’s probably a topic for another thread. If UE4 ever came out with an update that allowed other languages/scripting, well by that time I’d know C++ in and out. So that’s my take on it, much as I’d enjoy not having my brain catch fire every couple days in code here, it’s rather beating a dead horse. Best thing we can do is just put the suggestion out there under the suggestion forum, or make a poll. That may speak greater volumes than the mods crawling through posts. (Forum moderation is a bear, I’m a fan of polls personally, no wall-o-texts)

Edit: Some might find this thread of interest, just stumbled on it myself: Scripting Language extensions via plugins - C++ - Epic Developer Community Forums

In regards to plugins/mods… I hope to see the old way of people releasing mods for free and not getting any cash for their work get flushed down the toilet. Instead I want to see publishers (like Epic Games/Valve-TF2), embrace the idea of empowering the modding community to optionally sale their work. If you give your users the option to sale their work then they may have no problem tossing out $19. But if you want them to just mod your games for free- well, of course they probably won’t go for it.

Looking forward to the new Unreal Tournament with a marketplace. This is a very exciting time for indies.

@, you are a machine!

edit- And that being said- even though my opinion may differ drastically from some of the rest of you I still hope you can find an arrangement that will work for you. It is interesting, Unity Pro has the same issue. I see this topic popup quite often

[=;47672]

@, you are a machine!

[/]

Hee heeee!

I bought UT99, UT2004, and UT3 just to make maps and mod them. in the community then did. It didn’t stop people like myself buying a full priced game back then and $19 won’t now.

[=VegasRich;47548]
As far as this raging debate goes, the engine was provided as is. If you want to add a scripting language, go for it. If you don’t want to, then don’t. Arguing over which language is better is pointless - I use several, each for different reasons. Like speaking, you should use the language that allows you to express yourself most appropriately for your purpose.
[/]

Ofcorse, but problem discussed in this debate (which died off anyway) currently engine only provides programming via C++ and blueprint and there people for which C++ is terrifying and they can’t used to graphical programming, not to mention Blueprint don’t give 100% access to engines APIs. As they don’t like C++ they can’t implement scripting language themselves and they need to relay on others and they want to do things now. adding fact hat Unity spawned lot of C# programmers in indie community most C# become most demanded language, so it turned in to C++ vs C# debate even thru every one knows there few people working in community to implement it even with editor integration :stuck_out_tongue:

[]
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.

[=mikepurvis;48990]
I bought UT99, UT2004, and UT3 just to make maps and mod them. 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.

[=;49066]
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. :slight_smile:

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.

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, .

[=;49384]
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.

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 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.

[=Devlin Kain;15318]
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?

[=TDoro;71630]
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++ – 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?

[=furrykef;71645]
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++ – 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.

Benchmark

[=;15332]
The Unity core is not written in C#, it’s in C/C++, they exposed the 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…****)

[=furrykef;49418]
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, .
[/]

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!

[=furrykef;71645]

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?

[=;71655]
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.

[=Gamonos;84713]
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”.

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?

[=TDoro;84759]
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. :stuck_out_tongue:

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.

[=TDoro;84759]
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 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.

[=;49384]
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).