简体   繁体   English

用于基于图块的游戏的Java 2D游戏引擎

[英]Java 2D Game engine for tile-based Game

Can anyone recommend a good Java game engine for developing simple tile-based games? 任何人都可以推荐一个好的Java游戏引擎来开发简单的基于平铺的游戏吗? I'm looking for an engine that will allow me to build maps using something like Tiled www.mapeditor.org 我正在寻找一种能让我使用像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. 光滑正是我正在寻找的,slick.cokeandcode.com但我无法让它在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). 我能管理的最好的是:无法在AMD 64位平台上加载IA 32位.dll(这是在下载最新的LWJGL版本之后)。

Can anyone suggest something similar that will run on 64-bit vista? 任何人都可以提出类似的东西,将在64位Vista上运行吗?

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所着的“开发Java游戏”一书,它包含一个基于磁贴的游戏框架,看起来很棒(尽管我还没有实现任何东西)。

Link to amazon 链接到亚马逊

You could also download the code without getting the book, but I'd recommend the book. 你也可以在不拿书的情况下下载代码,但我推荐这本书。

PulpCore is utterly cool, supports tiling, but uses a software renderer and cannot run as a desktop application. PulpCore非常酷,支持平铺,但使用软件渲染器,无法作为桌面应用程序运行。 Its development paradigm is very, very similar to Flash, except it has the benefit of being Java ;). 它的开发范例与Flash非常非常相似,只不过它具有Java的优点;)。

Slick also 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还支持平铺,硬件加速(通过LWJGL的OpenGL),并且可以作为applet,桌面或webstart(JNLP)运行,但是在缺点方面它在易编码方面不像Pulpcore那么干净。

If you need serious onscreen action (as in action/arcade) then go Slick, otherwise I recommend PulpCore. 如果你需要严肃的屏幕操作(如动作/街机),那么去光滑,否则我推荐PulpCore。 If I didn't need hardware support for my game, I'd be on PulpCore in a second. 如果我不需要硬件支持我的游戏,我会在一秒钟内使用PulpCore。

There's Slick, JGame, GLib (very new, rather buggy), and XNA (C#, similar to Java). 有Slick,JGame,GLib(非常新的,相当多的bug)和XNA(C#,类似于Java)。 Take your pick. 随便挑选。

-Slick: http://goo.gl/CXsp -Slick: http//goo.gl/CXsp
-JGame: http://goo.gl/Kdjrj -JGame: http//goo.gl/Kdjrj
-GLib: http://goo.gl/LGFAw -GLib: http//goo.gl/LGFAw
-XNA: http://goo.gl/n4X1A -XNA: http//goo.gl/n4X1A

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. 我不知道Java游戏引擎,但是你的“无法在AMD 64位平台上加载IA 32位.dll”问题可以通过卸载64位版本的Java并安装32-来解决。比特版本。 (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). (有可能同时运行32位和64位版本,但如果你不进行64位编程,那么你最好只坚持使用一个版本)。

The 32-bit version is the version for "Windows", rather than "Windows x64". 32位版本是“Windows”的版本,而不是“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位版本的Java将存在于Program Files(x86)而不是Program Files中 - 如果您已经配置了Slick和/或IDE,则可能需要更新某些路径。

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 jar file and import it into your project. 您需要做的就是获取最新的LWGJL jar文件并将其导入您的项目。 Then you need to load the naitive libraries (including the win64 dll) from the LWGJL jar. 然后你需要从LWGJL jar加载naitive库(包括win64 dll)。 This will allow you to run Slick2D in Win64 without messing around with your Java version. 这将允许您在Win64中运行Slick2D而不会搞乱Java版本。

Libgdx is brilliant and includes support for TMX such as tiled. Libgdx非常出色,包括对TMX的支持,例如平铺。 https://libgdx.badlogicgames.com/ You can also combine this with box2d fairly easily. https://libgdx.badlogicgames.com/你也可以很容易地将它与box2d结合起来。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM