街机(Arcadegame),是置于公共娱乐场所的经营性专用游戏机。也可称为大型电玩(在台湾又有俗称作“大台”),起源于美国酒吧、餐馆、娱乐场所中流行的商业投币式娱乐机械。这篇翻译说的是arcade模块和pygame模块之间的对比。
The Python Arcade Library has the same target audience as the well-known Pygame library. So how do they differ?
arcade模块和pygame游戏都是为设计游戏而生的,它们有什么不同之处?
Features that the Arcade Library has that Pygame does not:
Pygame不支持而arcade模块支持的一些功能:
- Supports Python 3 type hinting. 支持Python3的输入提示
- Thick ellipses, arcs, and circles do not have a moiré pattern. 椭圆/圆弧/圆形不再有云纹图案?(求更好的翻译)
- Ellipses, arcs, and other shapes can be easily rotated.椭圆/圆弧等其它形状支持旋转。
- Supports installation via standard Python package manager, using ‘pip install’ 支持通过标准的包管理命令pip install安装。(Pygame不是也支持吗?)
- Uses standard coordinate system you learned about in math. (0, 0) is in the lower left, and not upper left. Y-coordinates are not reversed.
- Has built-in physics engine for platformers. 已经为平台类型的游戏内置了物理引擎。
- Supports animated sprites.支持动画角色
- API documentation for the commands is better. Many commands include unit tests right in the documentation.命令的API文档更加友好,说明档中的许多命令包括单元测试。
- Command names are consistent. For example, to add to a sprite list you use the
append()
method, like any other list in Python. Pygame usesadd()
.命令的命名方式和它的函意一致,如append方法,是添加,而在Pygame中用的是add增加命令。 - Parameter and command names are clearer. For example, open_window instead of set_mode.参数与命名更加清晰,如 新建窗口屏幕用的是open_window而不是set_mode。
- Less boiler-plate code than Pygame.更少杂扰代码。
- Basic drawing does not require knowledge on how to define functions or classes or how to do loops.基本的绘画不需要有如何设计游戏循环或如何定义函数与类的知识。
- Encourages separation of logic and display code. Pygame tends to put both into the same game loop.游戏的运行逻辑和显示逻辑代码被设计为鼓励分离,而在Pygame中它们放在同一个循环中。
- Runs on top of OpenGL and Pyglet, rather than the old SDL1 library. 基于OpenGL和Pyglet模块,Pygame基于老的SDL1库。
- With the use of sprite lists, uses the acceleration of the graphics card to improve performance.当使用角色列表的时候,使用了图形卡加速来改善性能。
- Easily scale and rotate sprites and graphics. 角色与形状能容易的改变大小和比例。
- Images with transparency are transparent by default. No extra code needed.角色天然就支持透明。
- Lots of Example Code. 有许多例子。
源网址:http://arcade.academy/pygame_comparison.html
发表评论