@@ -18,8 +18,7 @@ $ conda activate pybox2d
18
18
```
19
19
20
20
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.
23
22
24
23
What is it?
25
24
-----------
@@ -30,8 +29,8 @@ prismatic, wheel, etc.).
30
29
31
30
Getting Started
32
31
---------------
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
35
34
look at the
36
35
[ getting started manual] ( https://github.com/pybox2d/pybox2d/wiki/manual )
37
36
located on the pybox2d wiki.
40
39
----
41
40
Please submit any bugs that you find to the
42
41
[ 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