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.
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.
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).
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.
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++ 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
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.
I would use Java for a 2D game because it already has graphics libraries like JFrame, and JPanel!
精彩评论