2008-03-12
[Source: gameres.com]
1.用什么语言和编译器来做游戏?
1、C语言
Advantages: Good for writing small fast programs. Easy to interface with assembly language. Very standardized, so versions on other platforms are similar.
Disadvantages: Does not easily support object-oriented techniques. Syntax can be difficult and lends itself to abuse.
Portability: While the core of the language and the ANSI function calls are very portable, they are limited to control-flow, memory management, and simple file-handling. Everything else is platform-specific. Making a program that's portable between Windows and the Mac, for instance, requires that the user-interface portions be using system-specific function calls. This generally means that you need to write the user-interface code twice. There are libraries, though, that make the process a bit easier.
Resources: The classic book about C is [The C Programming Language].It's gone through several iterations and has expanded to about three times its original size, but it's still a good introduction to the language. An excellent tutorial is [The Waite Group's C Primer Plus].
2、C++
Advantages: Much better than C for organizing large programs. Supports the object-oriented paradigm nicely. Libraries of common data structures, like linked lists and grow-able arrays, can remove much of the burden of having to deal with low-level details.
Disadvantages: Extremely large and complicated. Like C, the syntax lends itself to abuse. Can be slower than C. Not many compilers implement the entire language correctly.
Portability: Better than C, but still not great. While it shares the same disadvantage as C, most of the portable user-interface libraries are implemented as collections of C++ objects.
Games Written in C++: Lots and lots. Almost all commercial games are written in C or C++.
Resources: The latest edition of The C++ Programming Language is excellent. As for tutorials, there are two camps, ones that assume you know C, and ones you don't. By far the best ground-up C++ tutorials are Who's Afraid of C++ and Who's Afraid of More C++. If you already know C, try Teach Yourself C++.
3、汇编语言
Advantages: Is, by definition, the smallest and fastest language. A talented assembly programmer can write programs that are faster than anything that can be done in other languages. You'll be the first person to be able to take advantage of the processor's latest new features, because you can use them directly.
Disadvantages: Difficult to learn, cryptic syntax, tough to do efficiently, and it takes much more code to get something done --not for the faint of heart!
Portability: Zilch. Since the language is designed for a single processor, it is not portable by definition. If you use extensions specific to a particular brand of processor, your code isn't even portable to other processors of the same type (for example, AMD 3DNOW instructions are not portable to other Pentium-class processors).
Games Written in Assembly: I don't know of any commercial games that are written entirely in assembly. Some games, however, have the most time-critical portions done in assembly.
Resources: When you're looking for documentation for an assembly language, you're basically looking for the documentation for the chip. There is some online information at [Intel], [AMD][Motorola] for their processors. As for books, [Assembly Language: Step-By-Step] is well-reviewed.
4、Pascal语言
Advantages: Easy to learn. Platform-specific implementations (Delphi) are very nice.
Disadvantages: "World class" OO successors to Pascal (Modula, Oberon) have not been successful. Language standards are not adhered to by compiler-makers. Proprietary.
Portability: Dismal. The features of the language changes from platform to platform, and there are no portability toolkits to handle platform-specific features.
Games Written in Pascal: A couple. The DirectX components for Delphi have made the playing field more level.
Resources: The find out about Delphi, check out the Inprise Delphi page.
5、Visual Basic
Advantages: Neat IDE. Easy to learn. Instantaneous compiling makes for very fast and easy prototyping. Lots and lots of add-ons available. While there are currently third-party DirectX add-ons for Visual Basic, DirectX version 7 is going to include support for Visual Basic right out of the box.
Disadvantages: Apps are large and require several large runtime DLL's to run. While form and dialog-based apps are easy to make, writing good graphical apps is more difficult. Calling Windows API functions is clunky, because VB data structures don't map nicely to C. Has OO features, but is not fully object-oriented. Proprietary.
Portability: Worse than dismal. Since Visual Basic is owned by Microsoft, you're pretty-much limited to whatever platforms they've ported it too. That means that you've got the choice of Windows, Windows, or Windows. Note that there are, however, a couple of tools that help convert VB apps to Java.
Games Written in Visual Basic: A few. There are lots of shareware games done in VB, and a couple of commercial offerings.
Resources: The [Microsoft VB page].
6、Java
Advantages: Binaries are portable to other platforms. Apps can run embedded in web pages. The included class library is reasonably standardized and extremely robust. Automatic allocation and garbage collection all but eliminates resource leaks in applications. Zillions of code examples on the web.
Disadvantages: Uses a "virtual machine" to run portable byte-code rather than native machine code, so apps are slower than true compilers. There are technologies (like "Just In Time" compilers) that greatly improve the speed of Java, but the speed will likely always lag behind true machine-code solutions. Early features like the Abstract Windowing Toolkit were not well thought-out and, while officially abandoned, have to hang around for backward compatibility. Is very high-level, which makes dealing with any low-level machine features very difficult. Sun is pretty slow in adding new "blessed" features to the language.
Portability: The best of the lot, but still not what it should be. The low-level code is very portable, but a lot of the UI and newer features are wobbly on some platforms.
Games Written in Java: Lots of little applets in web pages, but only a couple of commercial offerings. Several commercial games use Java as the internal script language.
Resources: [Sun's official Java page] has some good info. IBM also has an excellent [Java page]. The [JavaLobby] is the best place to go for news about Java.
7、创作工具
Advantages: Fast prototyping --if your game fits the motif the tool's made for, you can probably get your game running faster than any other language. In many cases, you can make a rudimentary game without writing any code. You can broadcast many authored apps on web pages with plug-ins like Shockwave and IconAuthor Player.
Disadvantages: Proprietary, so you're at the mercy of the tool-maker as to what features will be added. You've gotta really look at these tools to see if they'll do everything that your game's gonna require, because there are things that authoring tools simply can't do. Some of these tools produce frighteningly bloated apps.
Portability: Since authoring tools are proprietary, your portability is limited to whatever they offer. Some systems, like Director, can author and run on several platforms. Some tools can author on one platform but play on several. Some are single-platform beasts.
Games Written in Authoring Tools: Myst and a few other "exploration" games of the same genre. All of the Shockwave games on the web.
资料:Director、HyperCard、SuperCard、IconAuthor、Authorware。
2.游戏程式开发相关领域
游戏构架、图形图像、图形特效、游戏逻辑、游戏界面、人工智能、声音音效、网络连接、系统优化等。
3.相关书籍
Book List Link
4.OpenGL与Direct 3D
Direct 3D是基于微软的通用对象模式COM(Common Object Mode)的3D图形API。它是由微软一手树立的3D API规范,微软公司拥有该库版权,它所有的语法定义包含在微软提供的程序开发组件的帮助文件、源代码中。Direct3D是微软公司DirectX SDK集成开发包中的重要部分,适合多媒体、娱乐、即时3D动画等广泛和实用的3D图形计算。自1996年发布以来,Direct3D以其良好的硬件兼容性和友好的编程方式很快得到了广泛的认可,现在几乎所有的具有3D图形加速的主流显示卡都对Direct3D提供良好的支持。但它也有缺陷,由于是以COM接口形式提供的,所以较为复杂,稳定性差,另外,目前只在Windows平台上可用。
OpenGL是近几年发展起来的一个性能卓越的三维图形标准,它是在SGI等多家世界闻名的计算机公司的倡导下,以SGI的GL三维图形库为基础制定的一个通用共享的开放式三维图形标准。目前,包括Microsoft、SGI、IBM、DEC、SUN、HP等大公司都采用了OpenGL做为三维图形标准,许多软件厂商也纷纷以OpenGL为基础开发出自己的产品,其中比较著名的产品包括动画制作软件Soft Image和3D Studio MAX、仿真软件Open Inventor、VR软件World Tool Kit、CAM软件ProEngineer等。Microsoft公司在Windows NT和最新的Windows 95中提供了OpenGL标准及OpenGL三维图形加速卡(如北京黎明电子技术公司的AGC-3D系列三维图形加速卡)的推出,OpenGL将在微机中有广泛地应用,同时也为广大用户提供了在微机上使用以前只能在高性能图形工作站上运行的各种软件的机会。
“从易用性来说Direct 3D和OpenGL很接近,D3d是有一些小的毛病,但是不幸的是,OpenGL的问题更大。。。。所以,尽管我是OpenGL的粉丝,但是我必须说Direct3D是未来必行之路”。---John Carmarck
Tuesday, August 12, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment