Getting Started
Py2D has the following requirements:
- Python 2.7 (it might work on older pythons, but I did not test it)
- pygame (only if you would like to run the examples!)
After installing the requirements, download Py2D onto your local machine and run some examples. Then check out the Documentation or the examples’ source code.
Running examples
You can see some functionality of Py2D in the examples package. Just run the script run_examples.py.
$ python2 run_examples.py -e EXAMPLE_NAME
Example names are given as Packagename.Classname
- Valid example names are:
- Logo.Logo - A bouncing Py2D logo made of vectors. Neat!
- Logo.Opaque - A bouncing Py2D logo made of filled polygons. Demonstrates convex decomposition of text.
- Draw.Draw - Draw polygons using the mouse
- Math.Boolean - Demonstrate boolean operations on polygons
- Math.Offset - Demonstrate polygon offsetting (also known as polygon buffering)
- Math.Decompose - Demonstrate convex decomposition
- FOV.FOV - Field of View calculation
- Navigation.Mesh - Navigation Mesh generation and pathfinding
- Navigation.Walker - Movement of an agent on a navigation path
If you get lost, press F1 in the example runner to display a help text. And remember to use the source, Luke!