【Tim Sweeney】Why C++ for Unreal 4?

The first three generations of the Unreal Engine included a sandboxed
scripting language, UnrealScript, which provided a simple interface for gameplay
programming that was shielded from the complexity of the C++ engine.
The
scripting approach is very welcoming to new programmers, but eventually it
breaks down and becomes an obstacle to innovation and shipping. We experienced
this over time as the Unreal Engine grew until finally, in 2011, we moved to a
pure C++ architecture. The causative factors were both pervasive and
general:
- As an engine and its community grows, there is increasing pressure
to expose more of the its native C++ features to the scripting environment. What
starts out as a sandbox full of toys eventually grows into a desert of
complexity and duplication.
- As the script interface expands, there is a
seemingly exponential increase in the cost and complexity of its
interoperability or "interop" layer where C++ and script code communicate
through a multi-language interface for calling functions and marshaling data.
Interop becomes very tricky for advanced data types such as containers where
standard scripting-language idioms differ greatly in representation and
semantics from their templated C++ counterparts.
- Developers seeking to take
advantage of the engine‘s native C++ features end up dividing their code
unnaturally between the script world and the C++ world, with significant
development time lost in this Interop Hell.
- Developers need to look at
program behavior holistically, but quickly find that script debugging tools and
C++ debugging tools are separate and incompatible. Seeing where script code had
gone wrong is of little value if you can‘t trace the C++ that code led to it,
and vice-versa.
It is these reasons, ultimately, that led to Epic‘s move to
pure C++. And the benefits are numerous: UE4 is a unified and fully-debuggable
code base, freed from Interop Hell and totally open to programmers to study,
modify, and extend. There are side-benefits, too, such as increased performance
in gameplay code, and ease of integrating other middleware written in
C++.
Building Unreal Engine 4 as a unified C++ codebase has been very
freeing, giving engine and gameplay programmers enormous flexibility to write
code without unnecessary interop barriers.
This isn‘t to say that C++ is the
ideal language for simple gameplay code. It is more complex and more dangerous
than UnrealScript, C#, and JavaScript. But that is another way of saying that
it‘s more powerful.
By making peace with complexity and writing code in C++,
there is absolutely no limit to what you can accomplish, whether it involves
debugging your entire codebase in-context, interfacing to low-level engine
systems, modifying them, or talking to the operating system or advanced
third-party libraries.

【Tim Sweeney】Why C++ for Unreal 4?,布布扣,bubuko.com

时间: 2024-11-16 11:15:10

【Tim Sweeney】Why C++ for Unreal 4?的相关文章

【HAPPY FOREST】用Unreal Engine4绘制实时CG影像

用Unreal Engine绘制实时CG影像 近年来,对实时CG的关心热度越来越高,但要想弥补与预渲染方式的差异并不是那么容易.这里就有影像业界的先锋进行挑战的MARZA ANIMATION PLANET.本文中通过Demo Movie的制作,来看看实时CG的可能性. 对应现状的问题意识与先见之明相结合的实验性项目 近年来的实时CG的品质的提升特别显著,最新的影像出现使得CG影像的相关人员兴奋起来,不光是影像的美丽程度,还感到了这种技术的可能性.这次介绍的MARZA ANIMATION PLAN

Python自动化 【第一篇】:Python简介和入门

Python简介: 一.什么是python Python是一门动态解释性的强类型定义语言. pythonde 特点:“优雅”.“明确”.“简单”. 二.Python由来 python的创始人为吉多·范罗苏姆(Guido van Rossum).1989年的圣诞节期间,吉多·范罗苏姆为了在阿姆斯特丹打发时间,决心开发一个新的脚本解释程序,作为ABC语言的一种继承. 三.目前Python主要应用领域 云计算: 云计算最火的语言, 典型应用OpenStack WEB开发: 众多优秀的WEB框架,众多大

【真正福利】成为专业程序员路上用到的各种优秀资料、神器及框架

转载,原地址:http://www.cnblogs.com/jasondan/p/6380597.html 据说看到好文章不推荐的人,服务器容易宕机!本文版权归翟士丹(Stan Zhai)和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文链接,否则保留追究法律责任的权利. 好东西不是随便收集下,发篇博文,骗些点赞的!积累了5年多的东西,是时候放出来跟大家见见面了. 或许有的园友在14年的时候收藏过我的一篇"工欲善其事.必先利其器"的博文,时隔3年,已经

【POJ 2942】Knights of the Round Table(双联通分量+染色判奇环)

[POJ 2942]Knights of the Round Table(双联通分量+染色判奇环) Time Limit: 7000MS   Memory Limit: 65536K Total Submissions: 11661   Accepted: 3824 Description Being a knight is a very attractive career: searching for the Holy Grail, saving damsels in distress, an

【POJ 3034】 Whac-a-Mole(DP)

[POJ 3034] Whac-a-Mole(DP) Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 3621   Accepted: 1070 Description While visiting a traveling fun fair you suddenly have an urge to break the high score in the Whac-a-Mole game. The goal of the W

【BZOJ 1036】树的统计Count(树链剖分)

[BZOJ 1036]树的统计Count(树链剖分) 1036: [ZJOI2008]树的统计Count Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 12991  Solved: 5233 Description 一棵树上有n个节点,编号分别为1到n,每个节点都有一个权值w.我们将以下面的形式来要求你对这棵树完成 一些操作: I. CHANGE u t : 把结点u的权值改为t II. QMAX u v: 询问从点u到点v的路径上的节点的最大权

【第一篇】:Python简介和入门

python简介:   python简介2 一.什么是python Python(英国发音:/ pa θ n/ 美国发音:/ pa θɑ n/),是一种面向对象.直译式的计算机程序语言. 每一门语言都有自己的哲学: pythonde 设计哲学是:“优雅”.“明确”.“简单” 二.python由来  1989年的圣诞节期间,吉多·范罗苏姆为了在阿姆斯特丹打发时间,决心开发一个新的脚本解释程序,作为ABC语言的一种继承.之所以选中Python作为程序的名字,是因为他是BBC电视剧——蒙提·派森的飞行

【CEDEC 2015】【夏日课堂】制作事宜技术篇,新手职员挑战VR Demo开发的真相

日文原文地址 http://www.4gamer.net/games/277/G027751/20150829002/ PS:CEDEC 2015的PPT有些要到10月才有下载,目前的都是记者照片修图,一些无关紧要的细节就不翻译了,10月后有下载了再分享翻译后的PPT 2015年8月28日,CEDEC 2015最后一天,BANDAI NAMCO Entertainment( 万代南梦宫娱乐,)关于[夏日课堂]的会议3场连续进行着,分为产品篇,技术篇以及座谈会三个部分,这里要介绍的是第2部分的技术

【算法总结】树相关

[点分治] [模板代码] 1 void getroot(int x,int fa) 2 { 3 sz[x]=1;mx[x]=0; 4 for(int i=first[x];i;i=e[i].next) 5 { 6 int to=e[i].to; 7 if(to==fa||vis[to])continue; 8 getroot(to,x); 9 sz[x]+=sz[to]; 10 mx[x]=max(mx[x],sz[to]); 11 } 12 mx[x]=max(mx[x],sum-sz[x])