|
官方原话:http://forums.bistudio.com/showpost.php?p=2073101&postcount=3
Few random remarks:
- the engine should be be able to run code written in any programming language that can compiled for Java Virtual Machine but we did not experiment with it so far ( quite few, Logo anyone )
- for now, bridge to all existing scripting commands is present
- it is possible create new scripting commands to take full advantage of JVM (performance, nicer interface)
- Arma 3 is going to build upon this technology, so if you can, Take On Java now and help us to shape it up
我靠,官方难道想用JVM来驱动整个可扩展环境?
针对大家的疑问,我仅从我个人对JVM的理解给大家抛砖引玉一下:
- JVM不等于Java,JVM是一种编译层技术,他可以将任何支持JVM字节码的语言编译为具体的机器指令,JVM是跨平台的,Java是一种“平台无关”的语言;
- 目前不知道官方对JVM的应用是怎么样的,结合运行效率问题我认为可能仅仅是将JVM用于扩展环境,用于将客户脚本编译为游戏运行的具体指令,所以在效率上应该影响不大;
- 用JVM的好处有很多,首先是支持大量的流行的脚本语言,比如Lua,可以实现真正面向对象的脚本编程,可以利用各种语言语法的先进性和灵活性实现更加优秀的开发效率和效果;
- 跨平台,这个结合ARMA一贯的Windows/Linux服务器端非常好理解,我觉得这是选择JVM的根本原因所在,你不能让在Windows上写的脚本在Linux上无法运行。
- 集成开发环境,现有的Java和Lua等语言都能够在Eclipse等开源继承开发环境(IDE)下进行搞笑开发和项目的管理,想一想语法着色、错误提示、智能感知、源代码管理甚至可视化编辑就让人万分的激动!
在我看来,这是ARMA系列有史以来最令人激动人心的革命性改进之一!ARMA3的可扩展性将达到一个前所未有的高度,任何游戏都将继续在其扩展性面前战栗!
另外,从此以后,写ARMA3的脚本再也不会被视为不务正业了,神马SQS、SQF,老子用的是Lua和Java,正经的编程语言!木哈哈哈!
以下是官方在《驾驭直升机》(TOH)补丁中使用新的脚本系统的说明,看来我猜想的没错:
Hi fellow scripters,
Initially we had hoped to release the major upgrade to our scripting technology with Patch 1.03, but we were not able to get it fully implemented in time. Therefore we're pushing the ability to use Java to the next patch
Why is this awesome™?- Using a widespread, proven and robust language with loads of documentation and tutorials.
- Using IDEs such as NetBeans and Eclipse for development and debugging.
- Using Object-Oriented programming architecture and design.
- Using generally much higher performance script execution.
- Using many standard Java libraries instead of reinventing the wheel.
Note: this will not replace SQF scripting, so the transition should be smooth.
|
|