Python libraries for games

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

🐍 🎮 pygame (the library) is a Free and Open Source python programming language library for making multimedia applications like games built on top of the excellent SDL library. C, Python, Native, OpenGL.

pygame/pygame

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

buildconfig: Bump SDL 2.28.1 for windows

Git stats

Files

Failed to load latest commit information.

README.rst

Pygame is a free and open-source cross-platform library for the development of multimedia applications like video games using Python. It uses the Simple DirectMedia Layer library and several other popular libraries to abstract the most common functions, making writing these programs a more intuitive task.

We need your help to make pygame the best it can be! New contributors are welcome.

If you are just getting started with pygame, you should be able to get started fairly quickly. Pygame comes with many tutorials and introductions. There is also full reference documentation for the entire library. Browse the documentation on the docs page. You can also browse the documentation locally by running python -m pygame.docs in your terminal. If the docs aren’t found locally, it’ll launch the online website instead.

The online documentation stays up to date with the development version of pygame on github. This may be a bit newer than the version of pygame you are using. To upgrade to the latest full release, run pip install pygame —upgrade in your terminal.

Best of all, the examples directory has many playable small programs which can get you started playing with the code right away.

Pygame is a powerful library for game development, offering a wide range of features to simplify your coding journey. Let’s delve into what Pygame has to offer:

Graphics: With Pygame, creating dynamic and engaging graphics has never been easier. The library provides simple yet effective tools for 2D graphics and animation, including support for images, rectangles, and polygon shapes. Whether you’re a seasoned game developer or just starting out, Pygame has you covered.

Sound: Pygame also includes support for playing and manipulating sound and music, making it easy to add sound effects and background music to your games. With support for WAV, MP3, and OGG file formats, you have plenty of options to choose from.

Input: Pygame provides intuitive functions for handling keyboard, mouse, and joystick input, allowing you to quickly and easily implement player controls in your games. No more struggling with complex input code, Pygame makes it simple.

Game Development: Lastly, Pygame provides a comprehensive suite of tools and features specifically designed for game development. From collision detection to sprite management, Pygame has everything you need to create exciting and engaging games. Whether you’re building a platformer, puzzle game, or anything in between, Pygame has you covered.

If you want to use features that are currently in development, or you want to contribute to pygame, you will need to build pygame locally from its source code, rather than pip installing it.

Installing from source is fairly automated. The most work will involve compiling and installing all the pygame dependencies. Once that is done, run the setup.py script which will attempt to auto-configure, build, and install pygame.

Much more information about installing and compiling is available on the Compilation wiki page.

To contribute to the main project documentation, see docs/README.md or view more detailed instructions here.

There is a draft of «Let’s write a unit test!» which is a step by step guide on how to write your first unit test in python for pygame, which is very similar to how you would do it for other projects.

Beginner developers looking for ways to contribute to the project can look at issues labeled «good first issue» or «Difficulty: Easy».

Thanks to everyone who has helped contribute to this library. Special thanks are also in order.

  • Marcus Von Appen: many changes, and fixes, 1.7.1+ freebsd maintainer
  • Lenard Lindstrom: the 1.8+ windows maintainer, many changes, and fixes
  • Brian Fisher for svn auto builder, bug tracker and many contributions
  • Rene Dudfield: many changes, and fixes, 1.7+ release manager/maintainer
  • Phil Hassey for his work on the pygame.org website
  • DR0ID for his work on the sprite module
  • Richard Goedeken for his smoothscale function
  • Ulf Ekström for his pixel perfect collision detection code
  • Pete Shinners: original author
  • David Clark for filling the right-hand-man position
  • Ed Boraas and Francis Irving: Debian packages
  • Maxim Sobolev: FreeBSD packaging
  • Bob Ippolito: MacOS and OS X porting (much work!)
  • Jan Ekhol, Ray Kelm, and Peter Nicolai: putting up with early design ideas
  • Nat Pryce for starting our unit tests
  • Dan Richter for documentation work
  • TheCorruptor for his incredible logos and graphics
  • Nicholas Dudfield: many test improvements
  • Alex Folkner for pygame-ctypes

Thanks to those sending in patches and fixes: Niki Spahiev, Gordon Tyler, Nathaniel Pryce, Dave Wallace, John Popplewell, Michael Urman, Andrew Straw, Michael Hudson, Ole Martin Bjoerndalen, Herve Cauwelier, James Mazer, Lalo Martins, Timothy Stranex, Chad Lester, Matthias Spiller, Bo Jangeborg, Dmitry Borisov, Campbell Barton, Diego Essaya, Eyal Lotem, Regis Desgroppes, Emmanuel Hainry, Randy Kaelber Matthew L Daniel, Nirav Patel, Forrest Voight, Charlie Nolan, Frankie Robertson, John Krukoff, Lorenz Quack, Nick Irvine, Michael George, Saul Spatz, Thomas Ibbotson, Tom Rothamel, Evan Kroske, Cambell Barton.

And our bug hunters above and beyond: Angus, Guillaume Proux, Frank Raiser, Austin Henry, Kaweh Kazemi, Arturo Aldama, Mike Mulcheck, Michael Benfield, David Lau

There’s many more folks out there who’ve submitted helpful ideas, kept this project going, and basically made our life easier. Thanks!

Many thank you’s for people making documentation comments, and adding to the pygame.org wiki.

Also many thanks for people creating games and putting them on the pygame.org website for others to learn from and enjoy.

Lots of thanks to James Paige for hosting the pygame bugzilla.

Also a big thanks to Roger Dingledine and the crew at SEUL.ORG for our excellent hosting.

Pygame is obviously strongly dependent on SDL and Python. It also links to and embeds several other smaller libraries. The font module relies on SDL_ttf, which is dependent on freetype. The mixer (and mixer.music) modules depend on SDL_mixer. The image module depends on SDL_image, which also can use libjpeg and libpng. The transform module has an embedded version of SDL_rotozoom for its own rotozoom function. The surfarray module requires the Python NumPy package for its multidimensional numeric arrays. Dependency versions:

CPython >= 3.6 (Or use PyPy3)
SDL >= 2.0.8
SDL_mixer >= 2.0.0
SDL_image >= 2.0.2
SDL_ttf >= 2.0.11
SDL_gfx (Optional, vendored in)
NumPy >= 1.6.2 (Optional)

This library is distributed under GNU LGPL version 2.1, which can be found in the file docs/LGPL.txt . We reserve the right to place future versions of this library under a different license.

This basically means you can use pygame in any project you want, but if you make any changes or additions to pygame itself, those must be released with a compatible license (preferably submitted back to the pygame project). Closed source and commercial games are fine.

The programs in the examples subdirectory are in the public domain.

See docs/licenses for licenses of dependencies.

About

🐍 🎮 pygame (the library) is a Free and Open Source python programming language library for making multimedia applications like games built on top of the excellent SDL library. C, Python, Native, OpenGL.

Источник

9 библиотек Python для разработки игр

Разработка игр на Python — это не только PyGame, Tower Defense и платформеры, а это и DOOM, и MMORPG, и симуляторы свиданий/отношений, и визуальные новеллы, и конкурсы DARPA, и моделирование вселенной, и автотрекинг низкоорбитальных спутников.

Под катом список 9 библиотек для разработки игр и полезные гайды к каждой библиотеке.

image

Pygame

Pygame — набор модулей (библиотек) языка программирования Python, предназначенный для написания компьютерных игр и мультимедиа-приложений. Pygame базируется на мультимедийной библиотеке SDL. Изначально Pygame был написан Питом Шиннерсом (Pete Shinners). Начиная примерно с 2004/2005 года поддерживается и развивается сообществом свободного программного обеспечения. Игры: Frets on Fire и Dangerous High School Girls in Trouble и «Save the Date»

  • Персональный зоопарк или немного о Pygame — Часть 1
  • Doodle Jump на pygame
  • Соединяем эллиптический тренажер и pygame
  • Пишем платформер на Python, используя pygame
  • Пишем платформер на python, используя pygame. Часть 2 подчасть 2. Редактор уровней
  • Создание игр на Python 3 и Pygame: Часть 1
  • Создание игр на Python 3 и Pygame: Часть 2
  • Библиотека Pygame / Часть 1. Введение
  • Физика в Python с использованием Pymunk
  • Conways Game of life на Python
  • Выращивание Магических Квадратов с помощью Python
  • DARPA Challenge в песочнице
  • Автотрекинг низкоорбитальных спутников или Слушаем радиосигнал с МКС
  • Моделируем вселенную: небесная механика наглядно
  • Сотворение мира Опыт создания разумной жизни своими руками
  • Необыкновенный способ генерации лабиринтов
  • Создаем симулятор солнечной системы
  • Пишем платформер на Python, используя pygame
  • Пишем платформер на Python. Часть 2. Подчасть 1, подготовка к созданию редактора уровней
  • Создание игры на Python 3 с использованием PyGame
  • Программирование игры на Pygame
  • 2020 Pygame Projects
  • Pygame
  • 2020 Pygame Projects
  • The Stolen Crown — A Fantasy RPG written in Python using Pygame

Arcade

image

Arcade — это среда разработки на Python для создания игр с привлекательной графикой и звуком. Она проста в использовании и очень эффективна, когда вы набираетесь опыта. Автор библиотеки преподавал геймдев и был разочарован медленными обновлениями PyGame и сделал свой инструмент.

Cocos2d

image

Cocos2d — это фреймворк для создания 2D-игр, демонстраций и других графических/интерактивных приложений.

Harfang3D

image

Harfang3D — фреймворк Python для 3D, VR и разработки игр.

Panda3D

image

Panda3D — 3D игровой движок, разрабатываемый Disney с 2002 года. Включает работу с графикой, звуком, вводом-выводом, обнаружением столкновений. С 2008 года стал opensource.
Disney сделал две MMORPG — Toontown Online и Pirates of the Caribbean Online.
Так же на Панде сделаны Ghost Pirates of Vooju Island и A Vampyre Story

PyOgre

image

PyOgre — привязка для 3д-рендерингового движка Ogre 3D для разработки игр и симуляций. Отлично подходит для новичков и быстрого прототипирования 3д-игр с простотой Python.

Ren’Py

RenPy — это бесплатный, свободный и открытый движок для создания как некоммерческих, так и коммерческих визуальных романов (графических квестов с диалоговой системой) в 2D-графике. Свыше 4800 игр [5] используют движок Ren’Py, подавляющее большинство игр на английском языке. Автором данного движка является PyTom.

PyOpenGL

PyOpenGL — Привязки Python ctypes для OpenGL и связанных с ним API.

PySDL2

PySDL2 — Основанная на ctypes оболочка для библиотеки SDL2.

Источник

Читайте также:  Java parameter data types
Оцените статью