<type>how-to</type>
<domain>install</domain>
<id>pygame</id>
<title>Using Wing with pygame</title>
<date>$Date$</date>
<product>pro+</product>
<summary>Tips for using Wing with pygame.</summary>

.. image:: /images/screenshots/wing7-screenshot-dark.png
  :alt: Wing Screen Shot
  :width: 574
  :height: 423
  :popup: 1

`Wing Pro <https://wingware.com>`__ is a Python IDE that can be used to develop, test, and
debug Python code written for `pygame <http://www.pygame.org/>`__, an open
source framework for game development with Python. 

If you do not already have Wing Pro installed, `download it now <https://wingware.com/downloads/wingpro>`__.

This document describes how to configure Wing for pygame. To get started using Wing as
your Python IDE, please refer to the tutorial in Wing's ``Help`` menu or read the
`Quickstart Guide <ref:howtos/quickstart>`__.

Project Configuration
---------------------

Pygame works just fine with Wing without any special configuration. You'll need to first
install pygame according to the instructions on the `pygame <http://www.pygame.org/>`__
website.

To create a new project, use ``New Project`` in Wing's ``Project`` menu with
``Project Type`` set to ``Pygame``.   You'll be able to select or create a source
directory for your project and select or create a Python environment.  See
`Creating a Project <ref:proj/creating-a-project>`__ for details on creating
projects in Wing.

After you press ``Create Project`` in the ``New Project`` dialog, find your main entry
point, open it into Wing, and select ``Set Current as Main Entry Point`` in the ``Debug``
menu.

Debugging
---------

Now you can launch your game from Wing with ``Start/Continue`` in the ``Debug`` menu. Wing
will stop on any exceptions or breakpoints reached while running your game, and you can
use the debugger to step through code, inspect the value of variables, and try out new
code interactively.

.. image:: pygame/fishtank.png

To learn more about Wing's features, please refer to the tutorial in Wing's ``Help`` menu
or read the `Quickstart Guide <ref:howtos/quickstart>`__.

Related Documents
-----------------

Wing provides many other options and tools.  For more information:

* `pygame home page <https://www.pygame.org/>`__ provides downloads and 
  documentation.

* `Quickstart Guide <ref:howtos/quickstart>`__ contains additional basic information
  about getting started with Wing.
  
* `Tutorial <ref:intro/tutorial>`__ provides a gentler introduction to Wing's features.

* `Wing Reference Manual <ref:manual>`__ documents Wing in detail.

