java Java物理引擎?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11200428/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 04:12:23  来源:igfitidea点击:

Java Physics Engine?

javaphysics

提问by user1229164

I have been playing around with Game development in Java, specifically with the Slick 2d game engine. I have an idea for a simple game, but I need a physics engine.

我一直在玩 Java 游戏开发,特别是 Slick 2d 游戏引擎。我有一个简单游戏的想法,但我需要一个物理引擎。

I have been searching the internet looking for a well-documented, free physics engine. I have never used a physics engine so I am looking for something relatively simple, with a lot of examples and documentation.

我一直在互联网上寻找一个有据可查的免费物理引擎。我从来没有使用过物理引擎,所以我正在寻找一些相对简单的东西,有很多例子和文档。

回答by Erica

Box2D is pretty much the standard 2d physics library for most games out there. There's a port to Java here which is quite easy to use:

Box2D 几乎是大多数游戏的标准 2d 物理库。这里有一个很容易使用的 Java 端口:

http://www.jbox2d.org/

http://www.jbox2d.org/

回答by Hyman

What about JBox2d? It's a straight port of the more notorious Box2D written in C++.

JBox2d怎么样?它是用 C++ 编写的更臭名昭著的 Box2D 的直接移植。

回答by ninjahoahong

For 2D and 100% java, dyn4jcan be considerred.

对于 2D 和 100% java,可以考虑使用dyn4j