用于基于图块的游戏的 Java 2D 游戏引擎
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/903760/
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
Java 2D Game engine for tile-based Game
提问by
Can anyone recommend a good Java game engine for developing simple tile-based games? I'm looking for an engine that will allow me to build maps using something like Tiled www.mapeditor.org
任何人都可以推荐一个好的 Java 游戏引擎来开发简单的基于 tile 的游戏吗?我正在寻找一种引擎,可以让我使用 Tiled www.mapeditor.org 之类的东西来构建地图
Slick is exactly what I'm looking for, slick.cokeandcode.com but I can't get it working on Vista-64. The best I can manage is:Can't load IA 32-bit .dll on a AMD 64-bit platform (and this after downloading the latest LWJGL version).
Slick 正是我正在寻找的,slick.cokeandcode.com,但我无法让它在 Vista-64 上运行。我能管理的最好的是:无法在 AMD 64 位平台上加载 IA 32 位 .dll(这是在下载最新的 LWJGL 版本后)。
Can anyone suggest something similar that will run on 64-bit vista?
任何人都可以建议类似的东西可以在 64 位 vista 上运行吗?
采纳答案by Sam Barnum
I'd recommend purchasing the book "Developing Games in Java" by David Brackeen, it includes a tile-based game framework which seems excellent (I haven't implemented anything with it yet though).
我建议购买 David Brackeen 所著的“Developing Games in Java”一书,它包含一个基于 tile 的游戏框架,看起来很棒(不过我还没有用它实现任何东西)。
You could also download the code without getting the book, but I'd recommend the book.
你也可以在没有得到这本书的情况下下载代码,但我推荐这本书。
回答by Chii
回答by Engineer
PulpCoreis utterly cool, supports tiling, but uses a software renderer and cannot run as a desktop application. Its development paradigm is very, very similar to Flash, except it has the benefit of being Java ;).
PulpCore非常酷,支持平铺,但使用软件渲染器,不能作为桌面应用程序运行。它的开发范式与 Flash 非常非常相似,只是它具有 Java 的优点;)。
Slickalso supports tiling, is hardware accelerated (OpenGL via LWJGL), and can run as applet, desktop or webstart (JNLP), but on the downside it's not nearly as clean as Pulpcore in terms of ease-of-coding.
Slick还支持平铺、硬件加速(OpenGL 通过 LWJGL),并且可以作为小程序、桌面或 webstart (JNLP) 运行,但不利的一面是,它在易于编码方面不如 Pulpcore 干净。
If you need serious onscreen action (as in action/arcade) then go Slick, otherwise I recommend PulpCore. If I didn't need hardware support for my game, I'd be on PulpCore in a second.
如果你需要严肃的屏幕动作(如动作/街机),那就去 Slick,否则我推荐 PulpCore。如果我的游戏不需要硬件支持,我马上就会使用 PulpCore。
回答by Reustonium
Just to address your secondary issue, you can run Slick on a 64 bit architecture without needing to uninstall 64-bit java...
只是为了解决您的次要问题,您可以在 64 位架构上运行 Slick,而无需卸载 64 位 java...
All you need to do is grab the latest LWGJL jarfile and import it into your project. Then you need to load the naitive libraries (including the win64 dll) from the LWGJL jar. This will allow you to run Slick2D in Win64 without messing around with your Java version.
您需要做的就是获取最新的LWGJL jar文件并将其导入到您的项目中。然后您需要从 LWGJL jar 加载原始库(包括 win64 dll)。这将允许您在 Win64 中运行 Slick2D,而不会弄乱您的 Java 版本。
回答by DaedalusUsedPerl
There's Slick, JGame, GLib (very new, rather buggy), and XNA (C#, similar to Java). Take your pick.
有 Slick、JGame、GLib(非常新,相当有缺陷)和 XNA(C#,类似于 Java)。随你挑。
-Slick: http://goo.gl/CXsp
-JGame: http://goo.gl/Kdjrj
-GLib: http://goo.gl/LGFAw
-XNA: http://goo.gl/n4X1A
-Slick:http
: //goo.gl/CXsp
-JGame:http: //goo.gl/Kdjrj-GLib:http: //goo.gl/LGFAw-XNA:http
: //goo.gl/n4X1A
回答by dan
I don't know about Java Game Engines, but your "Can't load IA 32-bit .dll on a AMD 64-bit platform"problem can be solved by uninstalling the 64-bit version of Java, and installing the 32-bit version instead. (It may be possible to have both 32-bit and 64-bit versions running in parallel, but if you're not doing 64-bit programming, then you're probably better off just sticking with the one version).
我不知道关于Java游戏引擎,但你的“无法在AMD 64位平台上加载IA 32位的.dll”问题可以通过卸载Java的64位版本,并安装32位来解决位版本代替。(有可能同时运行 32 位和 64 位版本,但如果您不进行 64 位编程,那么您最好坚持使用一个版本)。
The 32-bit version is the version for "Windows", rather than "Windows x64". Note that the 32-bit version of Java will live in Program Files (x86)rather than Program Files- you may need to update some paths if you've already configured Slick and/or an IDE.
32 位版本是“Windows”的版本,而不是“Windows x64”。请注意,32 位版本的 Java 将位于Program Files (x86)而不是Program Files- 如果您已经配置了 Slick 和/或 IDE,则可能需要更新一些路径。
回答by Joshcorpia
Libgdx is brilliant and includes support for TMX such as tiled. https://libgdx.badlogicgames.com/You can also combine this with box2d fairly easily.
Libgdx 非常出色,包括对 TMX 的支持,例如平铺。https://libgdx.badlogicgames.com/你也可以很容易地将它与 box2d 结合起来。

