|
| 1 | +.. image:: https://raw.githubusercontent.com/pygame-community/pygame-ce/main/docs/reST/_static/pygame_logo.svg |
| 2 | + :alt: pygame |
| 3 | + :target: https://pyga.me/ |
| 4 | + |
| 5 | + |
| 6 | +|DocsStatus| |
| 7 | +|PyPiVersion| |PyPiLicense| |
| 8 | +|Python3| |GithubCommits| |BlackFormatBadge| |
| 9 | + |
| 10 | +`English`_ **简体中文** |
| 11 | +---- |
| 12 | + |
| 13 | +Pygame_ 是一款自由且开源的跨平台库,用于开发电子游戏等多媒体应用。Pygame基于 `Simple DirectMedia Layer library`_ 以及其他几个广受欢迎的库,汲取其中最常见的函数,让编写游戏成为更加符合直觉的事情。 |
| 14 | + |
| 15 | +本发行版名为 **“pygame - Community Edition”** (简称 “pygame-ce”)。 |
| 16 | + |
| 17 | +pygame-ce是上游pygame项目的分支,由此前pygame项目的核心开发者创建。开发者们在上游的开发中受到了强烈的阻挠,无法继续,所以创建了这个发行版。新的发行版旨在提供更加频繁的版本更新,持续不断的bug修复与功能增强,以及更加民主的管理模式。 |
| 18 | + |
| 19 | +欢迎新的贡献者加入我们。 |
| 20 | + |
| 21 | +安装 |
| 22 | +------------ |
| 23 | + |
| 24 | +:: |
| 25 | + |
| 26 | + pip install pygame-ce |
| 27 | + |
| 28 | + |
| 29 | +入门 |
| 30 | +---- |
| 31 | + |
| 32 | +刚接触pygame的初学者应该可以快速入门。pygame提供了大量教程与介绍,也提供了整个库的完整参考文档。你可以在 `docs page`_ 浏览文档。也可以在终端中运行`python -m pygame.docs`,在本地浏览文档。如果找不到本地文档,会自动打开在线文档。 |
| 33 | + |
| 34 | +在线文档与github中的开发版pygame同步。文档版本可能比你正在用的pygame版本新一些。在终端中运行 ``pip install pygame-ce --upgrade`` 可以升级到最新完整版本。 |
| 35 | + |
| 36 | +最重要的是,examples目录中有许多可以玩的小程序,可以使你立即开启代码之旅。 |
| 37 | + |
| 38 | +从源码开始编译 |
| 39 | +-------------------- |
| 40 | + |
| 41 | +如果你想使用那些正在开发的特性,或者你想要为pygame做出贡献,你就需要从源码开始编译pygame,而不是用pip进行安装。 |
| 42 | + |
| 43 | +编译与安装的流程是高度自动化的。你要做的工作主要是pygame依赖的编译与安装。一旦完成,你就可以运行`setup.py`,它会尝试完成自动配置,编译,然后安装pygame。 |
| 44 | + |
| 45 | +更多关于编译与安装信息,参见 `Compilation wiki page`_ 。 |
| 46 | + |
| 47 | +鸣谢 |
| 48 | +------- |
| 49 | + |
| 50 | +感谢为本库做成贡献的每一个人。 |
| 51 | + |
| 52 | +特别鸣谢: |
| 53 | + |
| 54 | +* Marcus Von Appen: many changes, and fixes, 1.7.1+ freebsd maintainer |
| 55 | +* Lenard Lindstrom: the 1.8+ windows maintainer, many changes, and fixes |
| 56 | +* Brian Fisher for svn auto builder, bug tracker and many contributions |
| 57 | +* Rene Dudfield: many changes, and fixes, 1.7+ release manager/maintainer |
| 58 | +* Phil Hassey for his work on the pygame.org website |
| 59 | +* DR0ID for his work on the sprite module |
| 60 | +* Richard Goedeken for his smoothscale function |
| 61 | +* Ulf Ekström for his pixel perfect collision detection code |
| 62 | +* Pete Shinners: original author |
| 63 | +* David Clark for filling the right-hand-man position |
| 64 | +* Ed Boraas and Francis Irving: Debian packages |
| 65 | +* Maxim Sobolev: FreeBSD packaging |
| 66 | +* Bob Ippolito: MacOS and OS X porting (much work!) |
| 67 | +* Jan Ekhol, Ray Kelm, and Peter Nicolai: putting up with early design ideas |
| 68 | +* Nat Pryce for starting our unit tests |
| 69 | +* Dan Richter for documentation work |
| 70 | +* TheCorruptor for his incredible logos and graphics |
| 71 | +* Nicholas Dudfield: many test improvements |
| 72 | +* Alex Folkner for pygame-ctypes |
| 73 | + |
| 74 | +感谢发送补丁/修复的人:Niki Spahiev, Gordon |
| 75 | +Tyler, Nathaniel Pryce, Dave Wallace, John Popplewell, Michael Urman, |
| 76 | +Andrew Straw, Michael Hudson, Ole Martin Bjoerndalen, Herve Cauwelier, |
| 77 | +James Mazer, Lalo Martins, Timothy Stranex, Chad Lester, Matthias |
| 78 | +Spiller, Bo Jangeborg, Dmitry Borisov, Campbell Barton, Diego Essaya, |
| 79 | +Eyal Lotem, Regis Desgroppes, Emmanuel Hainry, Randy Kaelber |
| 80 | +Matthew L Daniel, Nirav Patel, Forrest Voight, Charlie Nolan, |
| 81 | +Frankie Robertson, John Krukoff, Lorenz Quack, Nick Irvine, |
| 82 | +Michael George, Saul Spatz, Thomas Ibbotson, Tom Rothamel, Evan Kroske, |
| 83 | +Cambell Barton. |
| 84 | + |
| 85 | +以及我们卓越的bug猎人:Angus, Guillaume Proux, Frank |
| 86 | +Raiser, Austin Henry, Kaweh Kazemi, Arturo Aldama, Mike Mulcheck, |
| 87 | +Michael Benfield, David Lau |
| 88 | + |
| 89 | +还有许多人提交了有用的想法,助力本项目前进,使我们的生活变得更加轻松。感谢你们! |
| 90 | + |
| 91 | +感谢对文档做成评论并将其添加到pygame.org wiki的人。 |
| 92 | + |
| 93 | +感谢制作游戏并把游戏放到pygame.org网站供人学习与娱乐的人。 |
| 94 | + |
| 95 | +感谢 James Paige 建立了pygame bugzilla。 |
| 96 | + |
| 97 | +感谢 Roger Dingledine 与SEUL.ORG上的crew,感谢我们优秀的主持。 |
| 98 | + |
| 99 | +依赖 |
| 100 | +------------ |
| 101 | + |
| 102 | +pygame显然依赖于SDL和Python。此外pygame还嵌入了几个较小的库:font模块依赖于SDL_ttf(SDL_ttf依赖于freetype);mixer模块(以及mixer.music模块)依赖于SDL_mixer;image模块依赖于SDL_image(SDL_image使用到libjpeg与libpng);transform模块内嵌了一个SDL_rotozoom来实现它的rotozoom函数;surfarray模块用到了Numpy中的多维数组。 |
| 103 | + |
| 104 | +依赖的版本要求如下: |
| 105 | + |
| 106 | + |
| 107 | ++----------+------------------------+ |
| 108 | +| CPython | >= 3.7 (或 PyPy3) | |
| 109 | ++----------+------------------------+ |
| 110 | +| SDL | >= 2.0.8 | |
| 111 | ++----------+------------------------+ |
| 112 | +| SDL_mixer| >= 2.0.0 | |
| 113 | ++----------+------------------------+ |
| 114 | +| SDL_image| >= 2.0.2 | |
| 115 | ++----------+------------------------+ |
| 116 | +| SDL_ttf | >= 2.0.11 | |
| 117 | ++----------+------------------------+ |
| 118 | +| SDL_gfx | (可选,内置) | |
| 119 | ++----------+------------------------+ |
| 120 | +| NumPy | >= 1.6.2 (可选) | |
| 121 | ++----------+------------------------+ |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | +许可证 |
| 126 | +------- |
| 127 | + |
| 128 | +本库在 `GNU LGPL version 2.1`_ 下发布,许可文件: ``docs/LGPL.txt`` 。我们保留将此库的未来版本置于其他许可证下的权利。 |
| 129 | + |
| 130 | +这基本代表着你可以在任意项目中使用pygame,但如果你修改或者增加了pygame库的内容,这些内容必须使用兼容的许可证发布(更可取的是将其提交回pygame项目)。闭源或者商业性游戏中可以使用pygame。 |
| 131 | + |
| 132 | +``examples`` 目录中的程序不受版权限制。 |
| 133 | + |
| 134 | +有关依赖项的许可证,请参阅 ``docs/licenses`` 。 |
| 135 | + |
| 136 | + |
| 137 | + |
| 138 | +.. |PyPiVersion| image:: https://img.shields.io/pypi/v/pygame-ce.svg?v=1 |
| 139 | + :target: https://pypi.python.org/pypi/pygame-ce |
| 140 | + |
| 141 | +.. |PyPiLicense| image:: https://img.shields.io/pypi/l/pygame-ce.svg?v=1 |
| 142 | + :target: https://pypi.python.org/pypi/pygame-ce |
| 143 | + |
| 144 | +.. |Python3| image:: https://img.shields.io/badge/python-3-blue.svg?v=1 |
| 145 | + |
| 146 | +.. |GithubCommits| image:: https://img.shields.io/github/commits-since/pygame-community/pygame-ce/2.1.4.svg |
| 147 | + :target: https://github.com/pygame-community/pygame-ce/compare/2.1.4...main |
| 148 | + |
| 149 | +.. |DocsStatus| image:: https://img.shields.io/website?down_message=offline&label=docs&up_message=online&url=https%3A%2F%2Fpyga.me%2Fdocs%2F |
| 150 | + :target: https://pyga.me/docs/ |
| 151 | + |
| 152 | +.. |BlackFormatBadge| image:: https://img.shields.io/badge/code%20style-black-000000.svg |
| 153 | + :target: https://github.com/psf/black |
| 154 | + |
| 155 | +.. _pygame: https://www.pyga.me |
| 156 | +.. _Simple DirectMedia Layer library: https://www.libsdl.org |
| 157 | +.. _We need your help: https://www.pygame.org/contribute.html |
| 158 | +.. _Compilation wiki page: https://www.pygame.org/wiki/Compilation |
| 159 | +.. _docs page: https://pyga.me/docs |
| 160 | +.. _GNU LGPL version 2.1: https://www.gnu.org/copyleft/lesser.html |
| 161 | + |
| 162 | +.. _English: ./../../README.rst |
0 commit comments