织梦CMS - 轻松建站从此开始!

罗索

当前位置: 主页>基础技术>Soft.Eng>

用什么语言和编译器来做游戏?二【转】

罗索客 发布于 2008-06-11 23:01 点击:次 
标签:游戏开发 娱乐 分类:游戏开发 5、Pascal语言 Pascal语言是由Nicolas Wirth在七十年代早期设计的,因为他对于FORTRAN和COBOL没有强制训练学生的结构化编程感到很失望,“空心粉式代码”变成了规范,而当时的语言又不反对它。Pascal被设计来强行使用结构化编程。
TAG:

标签:游戏开发 娱乐 分类:游戏开发

5、Pascal语言
  Pascal语言是由Nicolas Wirth在七十年代早期设计的,因为他对于FORTRAN和COBOL没有强制训练学生的结构化编程感到很失望,“空心粉式代码”变成了规范,而当时的语言又不反对它。Pascal被设计来强行使用结构化编程。最初的Pascal被严格设计成教学之用,最终,大量的拥护者促使它闯入了商业编程中。当 Borland发布IBM PC上的 Turbo Pascal时,Pascal辉煌一时。集成的编辑器,闪电般的编译器加上低廉的价格使之变得不可抵抗,Pascal编程了为MS-DOS编写小程序的首选语言。
  Pascal was designed by Nicolas Wirth in the early 70's, because he was dismayed to see that FORTRAN and COBOL were not enforcing healthy structured programming disciplines in students. "Spaghetti code" was becoming the norm, and the languages of the time weren't discouraging it. Pascal was designed from the ground up to enforce structured programming practices. While the original Pascal was designed strictly for teaching, it had enough advocates to eventually make inroads into commercial programming. Pascal finally took the spotlight in a big way when Borland released Turbo Pascal for the IBM PC. The integrated editor, lightning-fast compiler, and low price were an irresistible combination, and Pascal became the preferred language for writing small programs for MS-DOS.

  然而时日不久,C编译器变得更快,并具有优秀的内置编辑器和调试器。Pascal在1990年Windows开始流行时走到了尽头,Borland放弃了Pascal而把目光转向了为Windows 编写程序的C++。Turbo Pascal很快被人遗忘。
  The momentum, however, did not stay. C compilers became faster and got nice built-in editors and debuggers. The almost-final nail in Pascal's coffin happened in the early 1990's when Windows took over, and Borland ignored Pascal in favor of C++ for writing Windows applications. Turbo Pascal was all but forgotten.

  最后,在1996年,Borland发布了它的“Visual Basic杀手”— Delphi。它是一种快速的带华丽用户界面的 Pascal编译器。由于不懈努力,它很快赢得了一大群爱好者。
  Finally, in 1996, Borland released its "Visual Basic Killer", Delphi. Delphi was a fast Pascal compiler coupled with a gorgeous user interface. Against all odds (and the Visual Basic juggernaut), it gained a lot of fans.

  基本上,Pascal比C简单。虽然语法类似,它缺乏很多C有的简洁操作符。这既是好事又是坏事。虽然很难写出难以理解的“聪明”代码,它同时也使得一些低级操作,如位操作变得困难起来。
  On the whole, Pascal is simpler than C. While the syntax is similar, it lacks a lot of the shortcut operations that C has. This is a good thing and a bad thing. It's harder to write inscrutable "clever" code, but it makes low-level operations like bit-manipulation more difficult.

  优点:易学、平台相关的运行(Dephi)非常好。
  Advantages: Easy to learn. Platform-specific implementations (Delphi) are very nice.

  缺点:“世界潮流”面向对象的Pascal继承者(Modula、Oberon)尚未成功。语言标准不被编译器开发者认同。专利权。
  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.

  使用Pascal编写的游戏:几个。DirectX的Delphi组件使得游戏场所变大了。
  Games Written in Pascal: A couple. The DirectX components for Delphi have made the playing field more level.

  资料:查找跟Delphi有关的资料,请访问:Inprise Delphi page。
  Resources: The find out about Delphi, check out the Inprise Delphi page.


6、Visual Basic
  哈,BASIC。回到八十年代的石器时代,它是程序初学者的第一个语言。最初的BASIC形式,虽然易于学习,却是可怕的无组织化,它义无返顾的使用了GOTO充斥的“空心粉式代码”。当回忆起BASIC的行号和GOSUB命令,没有几个人能止住眼角的泪水。
  Ahh, BASIC. Way back in the stone-age of the 80's, it was the first language for budding programmers. The original incarnations of BASIC, while easy to learn, were horribly unstructured, leading to the a rash of GOTO-laden "spaghetti-code". Not many people wipe away tears when reminiscing about BASIC's line numbers and the GOSUB command.

  快速前进到九十年代早期,虽然不是苹果公司所希望的巨人,HyperCard仍然是一个在Windows下无法比拟的吸引人的小型编程环境。 Windows下的HyperCard克隆品如ToolBook又慢又笨又昂贵。为了与HyperCard一决高下,微软取得了一个小巧的名为 Thunder编程环境的许可权,并把它作为Visual Basci 1.0发布,其用户界面在当时非常具有新意。这门语言虽然还叫做Basic(不再是全部大写),但更加结构化了,行号也被去除。实际上,这门语言与那些内置于TRS-80、Apple II及Atari里的旧的ROM BASIC相比,更像是带Basic风格动词的Pascal。
  Fast-forward to the early 1990's. While not the monster that Apple was hoping for, HyperCard was a compelling little programming environment that had no equal under Windows. Windows-based HyperCard clones like ToolBook were slow, clunky, and expensive. To finally compete with HyperCard, Microsoft licensed a neat little programming environment named Thunder, releasing it as Visual Basic 1.0. The user-interface was very innovative for the time. The language, while still called Basic (and no longer all-caps), was much more structured. Line numbers were mercy-killed. The language was, in fact, much closer to Pascal with Basic-style verbs than the old ROM BASIC that was built into every TRS-80, Apple ][, and Atari.

  经过六个版本,Visual Basic变得非常漂亮。用户界面发生了许多变化,但依然保留着“把代码关联到用户界面”的主旨。这使得它在与即时编译结合时变成了一个快速原型的优异环境。
  Six versions later, Visual Basic is pretty deluxe. The user-interface has made some changes, but still retains its "attach bits of code to the user-interface" motif. This, in combination with instantaneous compiling, makes it a terrific environment for fast prototyping.

  优点:整洁的编辑环境。易学、即时编译导致简单、迅速的原型。大量可用的插件。虽然有第三方的DirectX插件,DirectX 7已准备提供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.

  缺点:程序很大,而且运行时需要几个巨大的运行时动态连接库。虽然表单型和对话框型的程序很容易完成,要编写好的图形程序却比较难。调用 Windows的API程序非常笨拙,因为VB的数据结构没能很好的映射到C中。有OO功能,但却不是完全的面向对象。专利权。
  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.

  移植性:非常差。因为Visual Basic是微软的产品,你自然就被局限在他们实现它的平台上。也就是说,你能得到的选择是:Windows,Windows或Widnows。当然,有一些工具能将VB程序转变成Java。
  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.

  使用Visual Basic编写的游戏:一些。有很多使用VB编写的共享游戏,还有一些是商业性的。
  Games Written in Visual Basic: A few. There are lots of shareware games done in VB, and a couple of commercial offerings.

  资料:微软的VB页面有一些信息。
  Resources: The [Microsoft VB page].

(iwgh)
本站文章除注明转载外,均为本站原创或编译欢迎任何形式的转载,但请务必注明出处,尊重他人劳动,同学习共成长。转载请注明:文章转载自:罗索实验室 [http://www.rosoo.net/a/200806/6983.html]
本文出处: 作者:iwgh
顶一下
(0)
0%
踩一下
(1)
100%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:点击我更换图片
栏目列表
将本文分享到微信
织梦二维码生成器
推荐内容