Skip to content

Commit b08dbe0

Browse files
committed
Move examples into README.md
1 parent 0e9ea97 commit b08dbe0

File tree

3 files changed

+91
-99
lines changed

3 files changed

+91
-99
lines changed

INSTALL.md

+4-95
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,10 @@
1-
### Install pre-built conda package (it's easy!)
2-
------------------------------------------------
3-
1. Install miniconda3. Download it from
4-
[here](http://conda.pydata.org/miniconda.html)
5-
2. Create a new environment (named py34 here) and activate it:
6-
7-
```bash
8-
$ conda create -n pybox2d -c conda-forge python=3.6 pybox2d pyglet
9-
$ conda activate pybox2d
10-
```
11-
12-
Recent builds should be available for Windows, Linux, and OS X, with Python
13-
3.6, 3.7, and 3.8.
14-
15-
3. Alternatively, you can build pybox2d from its source code. You should only
16-
really do this if you want the latest features not available in the
17-
release or if you want to help contribute to pybox2d. See the section below
18-
corresponding to your operating system for more instructions on how to do
19-
this.
20-
21-
### The testbed examples
22-
------------------------
23-
1. Install a backend such as pygame or pyglet to use as a renderer.
24-
25-
| Backend | Install | Homepage |
26-
| ------------- | ------------------------------------------------------------- | ------------------------------------ |
27-
| pygame | `pip install pygame` | http://pygame.org |
28-
| pyqt4 | `conda install pyqt4` | https://www.riverbankcomputing.com/ |
29-
| pyglet | `pip install pyglet` (or use conda-forge) | http://pyglet.org |
30-
| opencv | `pip install opencv` | http://opencv.org |
31-
32-
2. Run your first example with the pygame backend:
33-
```bash
34-
# As a start, try the web example with the pygame backend:
35-
$ python -m Box2D.examples.web --backend=pygame
36-
```
37-
38-
3. Take a look at the other examples, setting the backend as appropriate:
39-
40-
```bash
41-
$ python -m Box2D.examples.apply_force
42-
$ python -m Box2D.examples.body_types
43-
$ python -m Box2D.examples.box_cutter
44-
$ python -m Box2D.examples.breakable
45-
$ python -m Box2D.examples.bridge
46-
$ python -m Box2D.examples.bullet
47-
$ python -m Box2D.examples.cantilever
48-
$ python -m Box2D.examples.car
49-
$ python -m Box2D.examples.chain
50-
$ python -m Box2D.examples.character_collision
51-
$ python -m Box2D.examples.cloth
52-
$ python -m Box2D.examples.collision_filtering
53-
$ python -m Box2D.examples.collision_processing
54-
$ python -m Box2D.examples.confined
55-
$ python -m Box2D.examples.convex_hull
56-
$ python -m Box2D.examples.conveyor_belt
57-
$ python -m Box2D.examples.distance
58-
$ python -m Box2D.examples.edge_shapes
59-
$ python -m Box2D.examples.edge_test
60-
$ python -m Box2D.examples.gish_tribute
61-
$ python -m Box2D.examples.hello
62-
$ python -m Box2D.examples.liquid
63-
$ python -m Box2D.examples.mobile
64-
$ python -m Box2D.examples.motor_joint
65-
$ python -m Box2D.examples.one_sided_platform
66-
$ python -m Box2D.examples.pinball
67-
$ python -m Box2D.examples.pulley
68-
$ python -m Box2D.examples.pyramid
69-
$ python -m Box2D.examples.raycast
70-
$ python -m Box2D.examples.restitution
71-
$ python -m Box2D.examples.rope
72-
$ python -m Box2D.examples.settings
73-
$ python -m Box2D.examples.theo_jansen
74-
$ python -m Box2D.examples.tiles
75-
$ python -m Box2D.examples.time_of_impact
76-
$ python -m Box2D.examples.top_down_car
77-
$ python -m Box2D.examples.tumbler
78-
$ python -m Box2D.examples.vertical_stack
79-
$ python -m Box2D.examples.web
80-
```
81-
82-
### Simple examples
83-
84-
There are also some simple examples that are not weighed down by testbed architecture.
85-
You can browse them on GitHub
86-
[here](https://github.com/pybox2d/pybox2d/tree/master/library/Box2D/examples/simple)
1+
### Note
2+
--------
873

88-
These can also be run directly from your pybox2d installation:
4+
This building from source documentation is likely out-of-date.
895

90-
```bash
91-
$ python -m Box2D.examples.simple.simple_01
92-
$ python -m Box2D.examples.simple.simple_02
93-
```
6+
Please consider using conda and installing via conda-forge.
947

95-
A similar opencv-based example is here:
96-
```bash
97-
$ python -m Box2D.examples.simple_cv
98-
```
998

1009
### Building from source: Linux
10110
--------------------------------

MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ include INSTALL
22
include LICENSE
33
include MANIFEST.in
44
include README
5+
include *.md
56
include setup.py
67
recursive-include library/Box2D *.png *.tga *.ttf *.txt *.ui *.xcf

README.md

+86-4
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ $ conda activate pybox2d
1818
```
1919

2020
Recent builds should be available for Windows, Linux, and OS X, with Python
21-
3.6, 3.7, and 3.8. More detailed installation instructions are available in
22-
[INSTALL.md](INSTALL.md).
21+
3.6, 3.7, and 3.8.
2322

2423
What is it?
2524
-----------
@@ -30,8 +29,8 @@ prismatic, wheel, etc.).
3029

3130
Getting Started
3231
---------------
33-
For installation or building instructions, see [INSTALL.md](INSTALL.md). Check
34-
out the testbed [examples](examples) to see what pybox2d can do. Then take a
32+
For building instructions, see [INSTALL.md](INSTALL.md). Check out the testbed
33+
[examples](examples) to see what pybox2d can do. Then take a
3534
look at the
3635
[getting started manual](https://github.com/pybox2d/pybox2d/wiki/manual)
3736
located on the pybox2d wiki.
@@ -40,3 +39,86 @@ Bugs
4039
----
4140
Please submit any bugs that you find to the
4241
[issue tracker](https://github.com/pybox2d/pybox2d/issues).
42+
43+
Testbed examples
44+
----------------
45+
46+
You can browse the testbed examples on GitHub
47+
[here](https://github.com/pybox2d/pybox2d/tree/master/library/Box2D/examples)
48+
49+
1. Install a backend such as pygame or pyglet to use as a renderer.
50+
51+
| Backend | Install | Homepage |
52+
| ------------- | ------------------------------------------------------------- | ------------------------------------ |
53+
| pygame | `pip install pygame` | http://pygame.org |
54+
| pyqt4 | `conda install pyqt4` | https://www.riverbankcomputing.com/ |
55+
| pyglet | `pip install pyglet` (or use conda-forge) | http://pyglet.org |
56+
| opencv | `pip install opencv` | http://opencv.org |
57+
58+
2. Run your first example with the pygame backend:
59+
```bash
60+
# As a start, try the web example with the pygame backend:
61+
$ python -m Box2D.examples.web --backend=pygame
62+
```
63+
64+
3. Take a look at the other examples, setting the backend as appropriate:
65+
```bash
66+
$ python -m Box2D.examples.apply_force
67+
$ python -m Box2D.examples.body_types
68+
$ python -m Box2D.examples.box_cutter
69+
$ python -m Box2D.examples.breakable
70+
$ python -m Box2D.examples.bridge
71+
$ python -m Box2D.examples.bullet
72+
$ python -m Box2D.examples.cantilever
73+
$ python -m Box2D.examples.car
74+
$ python -m Box2D.examples.chain
75+
$ python -m Box2D.examples.character_collision
76+
$ python -m Box2D.examples.cloth
77+
$ python -m Box2D.examples.collision_filtering
78+
$ python -m Box2D.examples.collision_processing
79+
$ python -m Box2D.examples.confined
80+
$ python -m Box2D.examples.convex_hull
81+
$ python -m Box2D.examples.conveyor_belt
82+
$ python -m Box2D.examples.distance
83+
$ python -m Box2D.examples.edge_shapes
84+
$ python -m Box2D.examples.edge_test
85+
$ python -m Box2D.examples.gish_tribute
86+
$ python -m Box2D.examples.hello
87+
$ python -m Box2D.examples.liquid
88+
$ python -m Box2D.examples.mobile
89+
$ python -m Box2D.examples.motor_joint
90+
$ python -m Box2D.examples.one_sided_platform
91+
$ python -m Box2D.examples.pinball
92+
$ python -m Box2D.examples.pulley
93+
$ python -m Box2D.examples.pyramid
94+
$ python -m Box2D.examples.raycast
95+
$ python -m Box2D.examples.restitution
96+
$ python -m Box2D.examples.rope
97+
$ python -m Box2D.examples.settings
98+
$ python -m Box2D.examples.theo_jansen
99+
$ python -m Box2D.examples.tiles
100+
$ python -m Box2D.examples.time_of_impact
101+
$ python -m Box2D.examples.top_down_car
102+
$ python -m Box2D.examples.tumbler
103+
$ python -m Box2D.examples.vertical_stack
104+
$ python -m Box2D.examples.web
105+
```
106+
107+
Simple examples
108+
---------------
109+
110+
There are also some simple examples that are not weighed down by testbed architecture.
111+
You can browse them on GitHub
112+
[here](https://github.com/pybox2d/pybox2d/tree/master/library/Box2D/examples/simple)
113+
114+
These can also be run directly from your pybox2d installation:
115+
116+
```bash
117+
$ python -m Box2D.examples.simple.simple_01
118+
$ python -m Box2D.examples.simple.simple_02
119+
```
120+
121+
A similar opencv-based example is here:
122+
```bash
123+
$ python -m Box2D.examples.simple_cv
124+
```

0 commit comments

Comments
 (0)