pybox2d

2D Game Physics for Python

https://github.com/pybox2d/pybox2d

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.5%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

2D Game Physics for Python

Basic Info
  • Host: GitHub
  • Owner: pybox2d
  • License: other
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 9.04 MB
Statistics
  • Stars: 500
  • Watchers: 21
  • Forks: 91
  • Open Issues: 21
  • Releases: 2
Created over 11 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

Build Status Coverage Status

pybox2d

2D Game Physics for Python

https://github.com/pybox2d/pybox2d

How to get it

pybox2d is available on conda-forge with the package name pybox2d. To create a new conda environment with pybox2d, run the following:

bash $ conda create -n pybox2d -c conda-forge python=3.6 pybox2d $ conda activate pybox2d

Recent builds should be available for Windows, Linux, and OS X, with Python 3.6, 3.7, and 3.8.

What is it?

pybox2d is a 2D physics library for your games and simple simulations. It's based on the Box2D library, written in C++. It supports several shape types (circle, polygon, thin line segments), and quite a few joint types (revolute, prismatic, wheel, etc.).

Getting Started

For building instructions, see INSTALL.md. Check out the testbed examples to see what pybox2d can do. Then take a look at the getting started manual located on the pybox2d wiki.

Bugs

Please submit any bugs that you find to the issue tracker.

Testbed examples

You can browse the testbed examples on GitHub here

  1. Install a backend such as pygame or pyglet to use as a renderer.

    | Backend | Install | Homepage | | ------------- | ------------------------------------------------------------- | ------------------------------------ | | pygame | pip install pygame | http://pygame.org |
    | pyqt4 | conda install pyqt4 | https://www.riverbankcomputing.com/ | | pyglet | pip install pyglet (or use conda-forge) | http://pyglet.org | | opencv | pip install opencv | http://opencv.org |

  2. Run your first example with the pygame backend: ```bash

    As a start, try the web example with the pygame backend:

    $ python -m Box2D.examples.web --backend=pygame ```

  3. Take a look at the other examples, setting the backend as appropriate: bash $ python -m Box2D.examples.apply_force $ python -m Box2D.examples.body_types $ python -m Box2D.examples.box_cutter $ python -m Box2D.examples.breakable $ python -m Box2D.examples.bridge $ python -m Box2D.examples.bullet $ python -m Box2D.examples.cantilever $ python -m Box2D.examples.car $ python -m Box2D.examples.chain $ python -m Box2D.examples.character_collision $ python -m Box2D.examples.cloth $ python -m Box2D.examples.collision_filtering $ python -m Box2D.examples.collision_processing $ python -m Box2D.examples.confined $ python -m Box2D.examples.convex_hull $ python -m Box2D.examples.conveyor_belt $ python -m Box2D.examples.distance $ python -m Box2D.examples.edge_shapes $ python -m Box2D.examples.edge_test $ python -m Box2D.examples.gish_tribute $ python -m Box2D.examples.hello $ python -m Box2D.examples.liquid $ python -m Box2D.examples.mobile $ python -m Box2D.examples.motor_joint $ python -m Box2D.examples.one_sided_platform $ python -m Box2D.examples.pinball $ python -m Box2D.examples.pulley $ python -m Box2D.examples.pyramid $ python -m Box2D.examples.raycast $ python -m Box2D.examples.restitution $ python -m Box2D.examples.rope $ python -m Box2D.examples.settings $ python -m Box2D.examples.theo_jansen $ python -m Box2D.examples.tiles $ python -m Box2D.examples.time_of_impact $ python -m Box2D.examples.top_down_car $ python -m Box2D.examples.tumbler $ python -m Box2D.examples.vertical_stack $ python -m Box2D.examples.web

These framework examples are included in the distribution, but they are also written in a way such that you can copy the examples directly and modify them yourself.

For example, the following would be possible:

bash $ git clone https://github.com/pybox2d/pybox2d pybox2d $ mkdir my_new_examples $ cp -R pybox2d/library/Box2D/examples/* my_new_examples $ cd my_new_examples $ python web.py --backend=pygame

Simple examples

There are also some simple examples that are not weighed down by testbed architecture. You can browse them on GitHub here

These can also be run directly from your pybox2d installation:

bash $ python -m Box2D.examples.simple.simple_01 $ python -m Box2D.examples.simple.simple_02

A similar opencv-based example is here: bash $ python -m Box2D.examples.simple_cv

Owner

  • Name: pybox2d
  • Login: pybox2d
  • Kind: organization

GitHub Events

Total
  • Issues event: 6
  • Watch event: 29
  • Issue comment event: 8
  • Push event: 2
  • Pull request event: 2
  • Fork event: 4
Last Year
  • Issues event: 6
  • Watch event: 29
  • Issue comment event: 8
  • Push event: 2
  • Pull request event: 2
  • Fork event: 4

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 158
  • Total Committers: 11
  • Avg Commits per committer: 14.364
  • Development Distribution Score (DDS): 0.323
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
kne s****e@g****m 107
sirkne@gmail.com s****e@g****m@b****2 24
sirkne s****e@b****2 13
goretkin g****n@g****m 7
Mateusz Bednarski m****i@w****m 1
Jarl Haggerty j****l@c****m 1
wangyueheng 1****1@q****m 1
Shital Shah s****s@g****m 1
Filipp Bakanov f****p@b****u 1
John Stowers j****s@g****m 1
bobbysoon b****n@u****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 82
  • Total pull requests: 26
  • Average time to close issues: about 1 year
  • Average time to close pull requests: 3 months
  • Total issue authors: 49
  • Total pull request authors: 15
  • Average comments per issue: 2.49
  • Average comments per pull request: 1.15
  • Merged pull requests: 17
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 3
  • Pull requests: 0
  • Average time to close issues: 4 days
  • Average time to close pull requests: N/A
  • Issue authors: 3
  • Pull request authors: 0
  • Average comments per issue: 0.33
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • kne (28)
  • pgr123 (3)
  • goretkin (3)
  • TTimo (2)
  • 8Observer8 (2)
  • cserpell (1)
  • tensor9 (1)
  • tstandley (1)
  • adwaithhs (1)
  • Philosoph228 (1)
  • PaulJSchellenberg (1)
  • varoudis (1)
  • DerThorsten (1)
  • JoanSymbio (1)
  • andysingal (1)
Pull Request Authors
  • kne (12)
  • fa-ribeiro (2)
  • xgenadam (1)
  • xzfn (1)
  • sytelus (1)
  • bobbysoon (1)
  • Jayeskumar (1)
  • raraizan (1)
  • mbednarski (1)
  • bakwc (1)
  • nzjrs (1)
  • kashif (1)
  • ryukinix (1)
  • wangweixuan (1)
  • jarl-haggerty (1)
Top Labels
Issue Labels
imported (26) bug (25) Priority-Low (20) Priority-Medium (5) invalid (4) help wanted (1) Type-Other (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 12,335 last-month
  • Total dependent packages: 5
    (may contain duplicates)
  • Total dependent repositories: 146
    (may contain duplicates)
  • Total versions: 7
  • Total maintainers: 1
pypi.org: box2d

Python Box2D

  • Versions: 5
  • Dependent Packages: 5
  • Dependent Repositories: 124
  • Downloads: 12,335 Last month
Rankings
Dependent repos count: 1.3%
Stargazers count: 2.9%
Average: 3.1%
Dependent packages count: 3.2%
Downloads: 3.3%
Forks count: 4.7%
Maintainers (1)
Last synced: 12 months ago
conda-forge.org: pybox2d
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 22
Rankings
Dependent repos count: 7.7%
Stargazers count: 19.0%
Forks count: 19.2%
Average: 24.4%
Dependent packages count: 51.6%
Last synced: 12 months ago

Dependencies

setup.py pypi