我应该学习什么语言来制作 2D 回合制视频游戏?
我想制作 PC 上的二维回合制游戏。类似于早期的《最终幻想》或《时空之轮》。 C++ 是唯一可行的选择吗?我一直被告知 C++ 是游戏的首选语言,但即使对于 2D 回合制游戏也是如此吗?还有其他语言适合这种事情吗?我真的很喜欢干净、可读、可扩展的代码,所以一种能够促进这种事情的语言会很棒。
这样做是为了好玩,而不是为了生意。 Java 是我目前唯一真正熟悉的语言。
顺便说一句,这是我的第一个问题,我是菜鸟。我阅读了常见问题解答,但如果我做了任何愚蠢的事情,那么我很抱歉。
I want to make 2 dimensional turn-based games for the PC. Something like early Final Fantasy or Chrono Trigger. Is C++ the only plausible option? I keep getting told that C++ is the language of choice for games, but is this the case even for 2D, turn-based games? Are any other languages good for this sort of thing? I'm really big on clean, readable, extendible code, so a language that fosters that sort of thing would be great.
Doing this for fun, not business. Java is the only language I really know well right now.
By the way, this is my first question and I'm a noob. I read the FAQ, but if I'm doing anything noobish anyway, then I'm sorry.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
对于 2D 游戏,尤其是回合制游戏,任何语言都可以。即使像 Python 和 Ruby 这样高级的语言也完全没问题,并且有相关的库(例如 pygame )。
For 2D games, especially turn based, any language will do. Even languages as high level as Python and Ruby are perfectly fine, and have relevant libraries (e.g. pygame).
仔细研究一下 C# 和 Microsoft 开发的 XNA Framework。 XNA 框架允许您为桌面、XBOX 和 ZUNE 构建游戏。
Take a hard look at C# and the XNA Framework developed by Microsoft. The XNA Framework allows you to build games for the desktop, XBOX, and ZUNE.
如果需要,您可以使用 javascript 编写软件 3D 引擎 。它不会跑得快。人们使用 C++ 的原因是,通常,通过良好的编译器编译为机器代码可以获得最佳性能。也就是说,我见过很多用 Java、Actionscript、Python 和许多其他语言编写的游戏(2D 和 3D)。您可以使用任何您想要的语言,但请注意,只要您知道自己在做什么,使用汇编器最有可能获得最佳性能;)
You can write a software 3D engine in javascript if you want. It won't run fast. The reason people use C++ is because, generally, you get best performance with a good compiler compiling to machine code. That said, I've seen plenty of games (2D and 3D) written in Java, Actionscript, Python and a whole host of other languages. You can use whichever language you want but be aware you are most likely to get best performance using assembler, provided you know what you are doing ;)
C++ 不是唯一选项,但它拥有大量出色的图形(包括 2D)库,可以简化开发。
这是一个很好的起点:http://www.thefreecountry.com/sourcecode/graphics。 shtml
C++ is not the only option, but it has a whole bunch of great graphics (including 2D) libraries that would simplify development.
This is a good place to start: http://www.thefreecountry.com/sourcecode/graphics.shtml
好吧,如果您喜欢 Java,Slick2D 是一个构建在 LWJGL(轻量级 Java 游戏库)之上的出色库,我会检查它们:
LWJGL
Slick2D
PS LWJGL 也适用于 3D 游戏,这也是 Minecraft 的基础。
Well if you like Java, Slick2D is a great library built on top of LWJGL (LightWeight Java Game Library) I would check both of them out:
LWJGL
Slick2D
P.S. LWJGL works with 3D games too, it's what Minecraft was built on.
我会使用 Java 来开发 2D 游戏,因为它已经有了 JFrame 和 JPanel 等图形库!
I would use Java for a 2D game because it already has graphics libraries like JFrame, and JPanel!
几乎任何语言都可以。
C、C++、Java、C#——它们都有很好的支持库。
如果您了解 Java,请坚持使用它,为它找到一个好的 2D 库并尝试一下。
这里是来自 Sun 的官方 Java 2D 图形教程。
这里是一个 Java 图形库。
Just about any language will do.
C, C++, Java, C# - they all have good supporting libraries.
If you know Java, stick with it, find a good 2D library for it and play around.
Here is the official Java 2D Graphics tutorial from Sun.
Here is one graphics library for Java.