Live data from Hacker News

Why C++ for Unreal 4

forums.unrealengine.com

21–30 of 178 posts

Re: Why C++ for Unreal 4

#21
post #16

The upshot is likely that a community-created Lua or JS binding will gain a significant userbase.

That's fairly likely, and there are several of those projects underway in the forums. Unfortunately the engine is filled with weird macros and their own reimplementation of STL-like types, so any full binding is going to require quite a lot of wrapping.

I think the more effective solution for most developers will be to keep all the engine-adjacent code in C++, but integrate a scripting engine of your choice just with your game logic.

Re: Why C++ for Unreal 4

#23

Earlier quoted context omitted.

Unity caters to new game developers though. I'm not saying you can't make real games with it, but I'd be surprised if it was used for AAA titles, and definitely not as much as Unreal Engine. Also, I found this comment from later in the thread really interesting about how easy it is for hackers to abuse the reversibility of managed (.NET) code. Granted, this could just be due to poor design on the developers part, but…

I think Unity also caters to indie developers with new game ideas, as well as to rapid prototypers. (The two often overlap.) Would we have gotten games as cool and varied as Receiver[1], Broforce[2] and Hearthstone with UE? I kinda doubt it. [1] http://store.steampowered.com/app/234190/ [2] http://store.steampowered.com/app/274190/

I completely agree and I don't mean to knock on indie developers or unity. I just was trying to make the point that for UE's bread and butter market, this is probably a good decision.

Re: Why C++ for Unreal 4

#24
post #20

The whole C# vs C++ discussion going on the forum shows how little current generations understand of compiler design and language implementations, oh well...

Exactly.

What's most distressing is people (as normal) are completely ignoring the garbage collection overhead, which is mostly where the advantage of having complete control is, in terms of micro-managing your memory allocation, e.g. using slab allocators, memory pools, pre-allocation, etc.

C# code in theory (ignoring things like intrinsics support and inline asm) can be as fast as C++ for tight loops, but in my experience (writing 2D/3D software for the VFX industry) +85% of the time if you profile something, it'll be the memory allocation which is killing things performance wise.

Re: Why C++ for Unreal 4

#25
post #24
post #20

The whole C# vs C++ discussion going on the forum shows how little current generations understand of compiler design and language implementations, oh well...

Exactly. What's most distressing is people (as normal) are completely ignoring the garbage collection overhead, which is mostly where the advantage of having complete control is, in terms of micro-managing your memory allocation, e.g. using slab allocators, memory pools, pre-allocation, etc. C# code in theory (ignoring things like intrinsics support and inline asm) can be as fast as C++ for tight loops, but in my exp…

Note that Unreal uses a C++ GC.

Re: Why C++ for Unreal 4

#27
post #9
post #2

The phrase > 'What starts out as a sandbox full of toys eventually grows into a desert of complexity and duplication.' is beautiful and is a pattern I've seen multiple times before. Its not feature creep per-se, but more something a bit more insidious in software development.

I love the irony of the contrast between this article and https://news.ycombinator.com/item?id=7584285 . Not that either are wrong, but it demonstrates the constant flux of the software world.

There's a world of difference between a web server handling each requests within ~1-30 ms and a game simulating the entire world made from thousands of entities under ~16ms.

It is very possible to write games in high-level languages, but you will lose at least half the compute power of the machine by doing so. Note that unless you're writing a Gears of Wars, you don't really need such performance and productivity wins once again.

Re: Why C++ for Unreal 4

#28
post #10

Maybe UnrealScript was just too damn complex. Having not used it, and just Googled it, my first reaction was "this looks just like C++ anyway". What's language features are there specificity catered for games? It doesn't seem very DSLy

You're so unreal.If you don't stop I might give you. give you.

you know.

pleasure.and you will like it,

Re: Why C++ for Unreal 4

#29
Right now I sit through the second week of non-stop iOS crash logs of our Unity game, which are opaque, unclear and mysterious for the most part, and I can't agree more.

Re: Why C++ for Unreal 4

#30
post #16

The upshot is likely that a community-created Lua or JS binding will gain a significant userbase.

Note that you'll need a language capable of AOT compilation if you want to target consoles which only run signed code (or use an interpreter, which will be rather slow). JIT is not an option on those systems.
Post reply on HN