游戏开发论坛

 找回密码
 立即注册
搜索
查看: 6813|回复: 14

Java for Games: too slow?

[复制链接]

42

主题

202

帖子

222

积分

中级会员

Rank: 3Rank: 3

积分
222
QQ
发表于 2004-8-18 09:20:00 | 显示全部楼层 |阅读模式
There is a mistaken belief amongst many commercial and hobbyist games developers that java is not suitable for games development. This is based on data that is 5 to 10 years old, and a misunderstanding of Java.

If you take a C++ program, compile it, and wait ten years, it will still run just as slowly with all the same bugs it had 10 years previously. If you do the same with a java program, you will often find it runs faster - on the same hardware - ten years later, and with fewer bugs.

Up until 1996, Java was very slow. Until 1998, it was slow. Until 2000, it was fast enough for most apps, but still on average only 50%-75% of the speed of C++.

Since around 2002, Java on average is less than 5% slower than the best C++ code. For most applications (including games) java is within 1% of the speed of C++ code; many of the improvements of the last few years have concentrated on making up the performance gap, so that now - finally! - Java is a realistic practical alternative even in games development - where RAW SPEED is usually the most important factor.

Note: Java also finally has full access to hardware-accelerated OpenGL; see the JGF tech page 3D graphics section

42

主题

202

帖子

222

积分

中级会员

Rank: 3Rank: 3

积分
222
QQ
 楼主| 发表于 2004-8-18 09:51:00 | 显示全部楼层

Re: Java for Games: too slow?

尝试着翻译了一下:

JAVA对于游戏:太慢了?

在很多商业的和沉溺于某中癖好的游戏开发者中有一种错误的信仰,就是JAVA不适合于游戏开发。这种错误的信仰是以5到10年前的旧数据为基础的,并且是对JAVA的误会。

如果你用C++编一个程序,之后编译它,然后等上十年,那么这个程序仍然会像十年前一样,运行的一样慢,带有先前一样多的BUG。如果你用JAVA编写同一个程序,你常常会发现,十年以后,在相同硬件的基础上,它运行的更快了,并且含有更少的BUG。

直到1996年,JAVA仍是很慢的。到了1998年,它速度慢。到2000年,对于大多数应用程序来说它已经足够快了,但平均速度仍只有C++的50%-75%。

从2002年左右开始,JAVA的平均速度只比设计的最好的C++代码慢5%。对于大多数应用程序(包括游戏),JAVA的速度比C++代码慢1%;最近几年所取得的多数改进都集中在缩短性能差距,因此现在——不可否认地——JAVA是现实实用的二中择一的选择,甚至在游戏开发领域——一个通常把RAW SPEED作为重要参考因素的地方。

注意:JAVA还有对OpenGL硬件加速的完全访问;参考JGF tech page 3D图形部分。

0

主题

1

帖子

0

积分

新手上路

Rank: 1

积分
0
发表于 2004-9-20 10:18:00 | 显示全部楼层

Re:Java for Games: too slow?

翻译还不错!支持一个!
但文章的内容不敢苟同。虽然偶4-5年来一直都在用JAVA,眼看着它的速度越来越快,但始终觉得它无法与C++想比拟

9

主题

290

帖子

290

积分

中级会员

Rank: 3Rank: 3

积分
290
发表于 2004-9-20 11:00:00 | 显示全部楼层

Re:Java for Games: too slow?

俺们都是铺路的,哈哈哈哈哈哈哈

42

主题

202

帖子

222

积分

中级会员

Rank: 3Rank: 3

积分
222
QQ
 楼主| 发表于 2004-9-20 13:01:00 | 显示全部楼层

Re: Re:Java for Games: too slow?

风神舞: Re:Java for Games: too slow?

翻译还不错!支持一个!
但文章的内容不敢苟同。虽然偶4-5年来一直都在用JAVA,眼看着它的速度越来越快,但始终觉得它无法与C++想比拟

java的执行方式决定它赶不上C++的的速度。
不过我觉得以后java的速度会超过现在C++的速度。
也许java一直会比C++慢,但是那又有什么关系呢?
只要java的速度完全可以满足我们的要求,C++的更快就失去了意义。
我不明白那些学c或c++的怎么老是说java慢?java即使慢也没慢到他们所说或所想的那种程度。
java现在的速度已经决定速度问题已经不再是个首当其冲的问题了。

不要再纠缠着速度问题不放了,那已经是过去的事了。 [em18]

41

主题

340

帖子

345

积分

中级会员

Rank: 3Rank: 3

积分
345
发表于 2004-9-20 16:38:00 | 显示全部楼层

Re:Java for Games: too slow?

Java的运行速度确是比较慢,特别是3D程序。不要说比C++,连C#都比不了,所以Java的优势在于网络游戏的服务器端。

42

主题

202

帖子

222

积分

中级会员

Rank: 3Rank: 3

积分
222
QQ
 楼主| 发表于 2004-9-20 21:59:00 | 显示全部楼层

Re: Re:Java for Games: too slow?

netcat: Re:Java for Games: too slow?

所以Java的优势在于网络游戏的服务器端。

这话说的有理,我同意。
[em16]

109

主题

1451

帖子

1475

积分

金牌会员

女神

Rank: 6Rank: 6

积分
1475
发表于 2004-9-24 23:54:00 | 显示全部楼层

Re:Java for Games: too slow?

Well,JAVA Technology is just a tool,and C++ is another one.It's no need to prove which is the best.That which language to use depends on your interest and your projects.I believe that JAVA will run more fast in the future,But I use C++ in game developing now,becase there are more E-Books for reference...at least for now...[em23]

12

主题

162

帖子

175

积分

注册会员

Rank: 2

积分
175
发表于 2004-11-28 10:34:00 | 显示全部楼层

Re:Java for Games: too slow?

java 慢主要就是和系统中间隔了一个虚拟机,这肯定和c++相比执行速度要慢!
电脑的性能提高,c++和java执行速度都提高!所以我觉得java永远无法比c++快!
因为那个虚拟机!但是c++无法和java的跨平台,系统无关相抗衡!还有那无穷的bug.
等到电脑的性能提高到一定水平,快和慢已经没有多大区别的时候(因为c++再快也只比java快一部分)人们不关心执行速度了,而是只在乎游戏的方便和安全的话,java会将c++淘汰的!
但是就目前来说没有办法!虽然有一部分java的大型网络游戏,但是那些技术我们怎么接触的到呢?你们说呢?而c++的书现在就像雪花一样,经典的书都够你看一辈子!所以想做游戏,就必须用c++但是最好现在开始学java因为他将有一天取代c++成为网络游戏的首选,因为他跨平台!
有一天,中国人大部分都在用免费的linux,windows被淘汰!那个时候就是java统一天下了!

109

主题

1451

帖子

1475

积分

金牌会员

女神

Rank: 6Rank: 6

积分
1475
发表于 2004-11-30 20:16:00 | 显示全部楼层

Re:Java for Games: too slow?

随着正版软件的普及,LINUX将会崛起,会成为WINDOWS的恶梦。。。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2025-12-23 20:54

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表