Commits

Paul Craven committed ac4492b

Documentation updates to display, draw, joystick, and sprite.

Comments (0)

Files changed (8)

docs/reST/ref/code_examples/draw_module_example.png

Added
New image

docs/reST/ref/code_examples/draw_module_example.py

+# Import a library of functions called 'pygame'
+import pygame
+from math import pi
+ 
+# Initialize the game engine
+pygame.init()
+ 
+# Define the colors we will use in RGB format
+BLACK = (  0,   0,   0)
+WHITE = (255, 255, 255)
+BLUE =  (  0,   0, 255)
+GREEN = (  0, 255,   0)
+RED =   (255,   0,   0)
+ 
+# Set the height and width of the screen
+size = [400, 300]
+screen = pygame.display.set_mode(size)
+ 
+pygame.display.set_caption("Example code for the draw module")
+ 
+#Loop until the user clicks the close button.
+done = False
+clock = pygame.time.Clock()
+ 
+while not done:
+ 
+    # This limits the while loop to a max of 10 times per second.
+    # Leave this out and we will use all CPU we can.
+    clock.tick(10)
+     
+    for event in pygame.event.get(): # User did something
+        if event.type == pygame.QUIT: # If user clicked close
+            done=True # Flag that we are done so we exit this loop
+ 
+    # All drawing code happens after the for loop and but
+    # inside the main while done==False loop.
+     
+    # Clear the screen and set the screen background
+    screen.fill(WHITE)
+ 
+    # Draw on the screen a GREEN line from (0,0) to (50.75) 
+    # 5 pixels wide.
+    pygame.draw.line(screen, GREEN, [0, 0], [50,30], 5)
+ 
+    # Draw on the screen a GREEN line from (0,0) to (50.75) 
+    # 5 pixels wide.
+    pygame.draw.lines(screen, BLACK, False, [[0, 80], [50, 90], [200, 80], [220, 30]], 5)
+    
+    # Draw on the screen a GREEN line from (0,0) to (50.75) 
+    # 5 pixels wide.
+    pygame.draw.aaline(screen, GREEN, [0, 50],[50, 80], True)
+
+    # Draw a rectangle outline
+    pygame.draw.rect(screen, BLACK, [75, 10, 50, 20], 2)
+     
+    # Draw a solid rectangle
+    pygame.draw.rect(screen, BLACK, [150, 10, 50, 20])
+     
+    # Draw an ellipse outline, using a rectangle as the outside boundaries
+    pygame.draw.ellipse(screen, RED, [225, 10, 50, 20], 2) 
+
+    # Draw an solid ellipse, using a rectangle as the outside boundaries
+    pygame.draw.ellipse(screen, RED, [300, 10, 50, 20]) 
+ 
+    # This draws a triangle using the polygon command
+    pygame.draw.polygon(screen, BLACK, [[100, 100], [0, 200], [200, 200]], 5)
+  
+    # Draw an arc as part of an ellipse. 
+    # Use radians to determine what angle to draw.
+    pygame.draw.arc(screen, BLACK,[210, 75, 150, 125], 0, pi/2, 2)
+    pygame.draw.arc(screen, GREEN,[210, 75, 150, 125], pi/2, pi, 2)
+    pygame.draw.arc(screen, BLUE, [210, 75, 150, 125], pi,3*pi/2, 2)
+    pygame.draw.arc(screen, RED,  [210, 75, 150, 125], 3*pi/2, 2*pi, 2)
+    
+    # Draw a circle
+    pygame.draw.circle(screen, BLUE, [60, 250], 40)
+    
+    # Go ahead and update the screen with what we've drawn.
+    # This MUST happen after all the other drawing commands.
+    pygame.display.flip()
+ 
+# Be IDLE friendly
+pygame.quit()

docs/reST/ref/code_examples/joystick_calls.png

Added
New image

docs/reST/ref/code_examples/joystick_calls.py

+import pygame
+
+# Define some colors
+BLACK    = (   0,   0,   0)
+WHITE    = ( 255, 255, 255)
+
+# This is a simple class that will help us print to the screen
+# It has nothing to do with the joysticks, just outputing the
+# information.
+class TextPrint:
+    def __init__(self):
+        self.reset()
+        self.font = pygame.font.Font(None, 20)
+
+    def print(self, screen, textString):
+        textBitmap = self.font.render(textString, True, BLACK)
+        screen.blit(textBitmap, [self.x, self.y])
+        self.y += self.line_height
+        
+    def reset(self):
+        self.x = 10
+        self.y = 10
+        self.line_height = 15
+        
+    def indent(self):
+        self.x += 10
+        
+    def unindent(self):
+        self.x -= 10
+    
+
+pygame.init()
+ 
+# Set the width and height of the screen [width,height]
+size = [500, 700]
+screen = pygame.display.set_mode(size)
+
+pygame.display.set_caption("My Game")
+
+#Loop until the user clicks the close button.
+done = False
+
+# Used to manage how fast the screen updates
+clock = pygame.time.Clock()
+
+# Initialize the joysticks
+pygame.joystick.init()
+    
+# Get ready to print
+textPrint = TextPrint()
+
+# -------- Main Program Loop -----------
+while done==False:
+    # EVENT PROCESSING STEP
+    for event in pygame.event.get(): # User did something
+        if event.type == pygame.QUIT: # If user clicked close
+            done=True # Flag that we are done so we exit this loop
+        
+        # Possible joystick actions: JOYAXISMOTION JOYBALLMOTION JOYBUTTONDOWN JOYBUTTONUP JOYHATMOTION
+        if event.type == pygame.JOYBUTTONDOWN:
+            print("Joystick button pressed.")
+        if event.type == pygame.JOYBUTTONUP:
+            print("Joystick button released.")
+            
+ 
+    # DRAWING STEP
+    # First, clear the screen to white. Don't put other drawing commands
+    # above this, or they will be erased with this command.
+    screen.fill(WHITE)
+    textPrint.reset()
+
+    # Get count of joysticks
+    joystick_count = pygame.joystick.get_count()
+
+    textPrint.print(screen, "Number of joysticks: {}".format(joystick_count) )
+    textPrint.indent()
+    
+    # For each joystick:
+    for i in range(joystick_count):
+        joystick = pygame.joystick.Joystick(i)
+        joystick.init()
+    
+        textPrint.print(screen, "Joystick {}".format(i) )
+        textPrint.indent()
+    
+        # Get the name from the OS for the controller/joystick
+        name = joystick.get_name()
+        textPrint.print(screen, "Joystick name: {}".format(name) )
+        
+        # Usually axis run in pairs, up/down for one, and left/right for
+        # the other.
+        axes = joystick.get_numaxes()
+        textPrint.print(screen, "Number of axes: {}".format(axes) )
+        textPrint.indent()
+        
+        for i in range( axes ):
+            axis = joystick.get_axis( i )
+            textPrint.print(screen, "Axis {} value: {:>6.3f}".format(i, axis) )
+        textPrint.unindent()
+            
+        buttons = joystick.get_numbuttons()
+        textPrint.print(screen, "Number of buttons: {}".format(buttons) )
+        textPrint.indent()
+
+        for i in range( buttons ):
+            button = joystick.get_button( i )
+            textPrint.print(screen, "Button {:>2} value: {}".format(i,button) )
+        textPrint.unindent()
+            
+        # Hat switch. All or nothing for direction, not like joysticks.
+        # Value comes back in an array.
+        hats = joystick.get_numhats()
+        textPrint.print(screen, "Number of hats: {}".format(hats) )
+        textPrint.indent()
+
+        for i in range( hats ):
+            hat = joystick.get_hat( i )
+            textPrint.print(screen, "Hat {} value: {}".format(i, str(hat)) )
+        textPrint.unindent()
+        
+        textPrint.unindent()
+
+    
+    # ALL CODE TO DRAW SHOULD GO ABOVE THIS COMMENT
+    
+    # Go ahead and update the screen with what we've drawn.
+    pygame.display.flip()
+
+    # Limit to 20 frames per second
+    clock.tick(20)
+    
+# Close the window and quit.
+# If you forget this line, the program will 'hang'
+# on exit if running from IDLE.
+pygame.quit ()
+

docs/reST/ref/display.rst

 to update the actual display.
 
 The origin of the display, where x = 0, and y = 0 is the top left of the
-screen. Both axis increase positively towards the botom right of the screen.
+screen. Both axis increase positively towards the bottom right of the screen.
 
 The pygame display can actually be initialized in one of several modes. By
 default the display is a basic software driven framebuffer. You can request
 
 .. function:: init
 
-   | :sl:`initialize the display module`
+   | :sl:`Initialize the display module`
    | :sg:`init() -> None`
 
    Initializes the pygame display module. The display module cannot do anything
 
 .. function:: quit
 
-   | :sl:`uninitialize the display module`
+   | :sl:`Uninitialize the display module`
    | :sg:`quit() -> None`
 
    This will shut down the entire display module. This means any active
 
 .. function:: get_init
 
-   | :sl:`true if the display module is initialized`
+   | :sl:`Returns True if the display module has been initialized`
    | :sg:`get_init() -> bool`
 
    Returns True if the :mod:`pygame.display` module is currently initialized.
 
 .. function:: set_mode
 
-   | :sl:`initialize a window or screen for display`
+   | :sl:`Initialize a window or screen for display`
    | :sg:`set_mode(resolution=(0,0), flags=0, depth=0) -> Surface`
 
    This function will create a display Surface. The arguments passed in are
 
    When requesting fullscreen display modes, sometimes an exact match for the
    requested resolution cannot be made. In these situations pygame will select
-   the closest compatable match. The returned surface will still always match
+   the closest compatible match. The returned surface will still always match
    the requested resolution.
 
    The flags argument controls which type of display you want. There are
       pygame.FULLSCREEN    create a fullscreen display
       pygame.DOUBLEBUF     recommended for HWSURFACE or OPENGL
       pygame.HWSURFACE     hardware accelerated, only in FULLSCREEN
-      pygame.OPENGL        create an opengl renderable display
+      pygame.OPENGL        create an OpenGL renderable display
       pygame.RESIZABLE     display window should be sizeable
       pygame.NOFRAME       display window will have no border or controls
 
+   For example:
+    
+   ::
+    
+        # Open a window on the screen
+        screen_width=700
+        screen_height=400
+        screen=pygame.display.set_mode([screen_width,screen_height])
+    
    .. ## pygame.display.set_mode ##
 
 .. function:: get_surface
 
-   | :sl:`get a reference to the currently set display surface`
+   | :sl:`Get a reference to the currently set display surface`
    | :sg:`get_surface() -> Surface`
 
    Return a reference to the currently set display Surface. If no display mode
 
 .. function:: flip
 
-   | :sl:`update the full display Surface to the screen`
+   | :sl:`Update the full display Surface to the screen`
    | :sg:`flip() -> None`
 
    This will update the contents of the entire display. If your display mode is
 
 .. function:: update
 
-   | :sl:`update portions of the screen for software displays`
+   | :sl:`Update portions of the screen for software displays`
    | :sg:`update(rectangle=None) -> None`
    | :sg:`update(rectangle_list) -> None`
 
 
 .. function:: get_driver
 
-   | :sl:`get the name of the pygame display backend`
+   | :sl:`Get the name of the pygame display backend`
    | :sg:`get_driver() -> name`
 
    Pygame chooses one of many available display backends when it is
 
 .. function:: list_modes
 
-   | :sl:`get list of available fullscreen modes`
+   | :sl:`Get list of available fullscreen modes`
    | :sg:`list_modes(depth=0, flags=pygame.FULLSCREEN) -> list`
 
    This function returns a list of possible dimensions for a specified color
 
 .. function:: mode_ok
 
-   | :sl:`pick the best color depth for a display mode`
+   | :sl:`Pick the best color depth for a display mode`
    | :sg:`mode_ok(size, flags=0, depth=0) -> depth`
 
    This function uses the same arguments as ``pygame.display.set_mode()``. It
-   is used to depermine if a requested display mode is available. It will
+   is used to determine if a requested display mode is available. It will
    return 0 if the display mode cannot be set. Otherwise it will return a pixel
    depth that best matches the display asked for.
 
 
 .. function:: gl_get_attribute
 
-   | :sl:`get the value for an opengl flag for the current display`
+   | :sl:`Get the value for an OpenGL flag for the current display`
    | :sg:`gl_get_attribute(flag) -> value`
 
    After calling ``pygame.display.set_mode()`` with the ``pygame.OPENGL`` flag,
 
 .. function:: gl_set_attribute
 
-   | :sl:`request an opengl display attribute for the display mode`
+   | :sl:`Request an OpenGL display attribute for the display mode`
    | :sg:`gl_set_attribute(flag, value) -> None`
 
    When calling ``pygame.display.set_mode()`` with the ``pygame.OPENGL`` flag,
 
 .. function:: get_active
 
-   | :sl:`true when the display is active on the display`
+   | :sl:`Returns True when the display is active on the display`
    | :sg:`get_active() -> bool`
 
    After ``pygame.display.set_mode()`` is called the display Surface will be
 
 .. function:: iconify
 
-   | :sl:`iconify the display surface`
+   | :sl:`Iconify the display surface`
    | :sg:`iconify() -> bool`
 
    Request the window for the display surface be iconified or hidden. Not all
    systems and displays support an iconified display. The function will return
-   True if successfull.
+   True if successful.
 
    When the display is iconified ``pygame.display.get_active()`` will return
    False. The event queue should receive a ``ACTIVEEVENT`` event when the
 
 .. function:: toggle_fullscreen
 
-   | :sl:`switch between fullscreen and windowed displays`
+   | :sl:`Switch between fullscreen and windowed displays`
    | :sg:`toggle_fullscreen() -> bool`
 
    Switches the display window between windowed and fullscreen modes. This
 
 .. function:: set_gamma
 
-   | :sl:`change the hardware gamma ramps`
+   | :sl:`Change the hardware gamma ramps`
    | :sg:`set_gamma(red, green=None, blue=None) -> bool`
 
    Set the red, green, and blue gamma values on the display hardware. If the
 
 .. function:: set_gamma_ramp
 
-   | :sl:`change the hardware gamma ramps with a custom lookup`
+   | :sl:`Change the hardware gamma ramps with a custom lookup`
    | :sg:`set_gamma_ramp(red, green, blue) -> bool`
 
    Set the red, green, and blue gamma ramps with an explicit lookup table. Each
 
 .. function:: set_icon
 
-   | :sl:`change the system image for the display window`
+   | :sl:`Change the system image for the display window`
    | :sg:`set_icon(Surface) -> None`
 
    Sets the runtime icon the system will use to represent the display window.
 
 .. function:: set_caption
 
-   | :sl:`set the current window caption`
+   | :sl:`Set the current window caption`
    | :sg:`set_caption(title, icontitle=None) -> None`
 
    If the display has a window title, this function will change the name on the
 
 .. function:: get_caption
 
-   | :sl:`get the current window caption`
+   | :sl:`Get the current window caption`
    | :sg:`get_caption() -> (title, icontitle)`
 
    Returns the title and icontitle for the display Surface. These will often be
 
 .. function:: set_palette
 
-   | :sl:`set the display color palette for indexed displays`
+   | :sl:`Set the display color palette for indexed displays`
    | :sg:`set_palette(palette=None) -> None`
 
    This will change the video display color palette for 8bit displays. This

docs/reST/ref/draw.rst

    | :sg:`aaline(Surface, color, startpos, endpos, blend=1) -> Rect`
 
    Draws an anti-aliased line on a surface. This will respect the clipping
-   rectangle. A bounding box of the affected area is returned returned as a
+   rectangle. A bounding box of the affected area is returned as a
    rectangle. If blend is true, the shades will be be blended with existing
    pixel shades instead of overwriting them. This function accepts floating
    point values for the end points.
    | :sg:`aalines(Surface, color, closed, pointlist, blend=1) -> Rect`
 
    Draws a sequence on a surface. You must pass at least two points in the
-   sequence of points. The closed argument is a simple boolean and if true, a
-   line will be draw between the first and last points. The boolean blend
+   sequence of points. The closed argument is a simple Boolean and if true, a
+   line will be draw between the first and last points. The Boolean blend
    argument set to true will blend the shades with existing shades instead of
    overwriting them. This function accepts floating point values for the end
    points.
    .. ## pygame.draw.aalines ##
 
 .. ## pygame.draw ##
+
+.. figure:: code_examples/draw_module_example.png
+   :scale: 50 %
+   :alt: draw module example
+
+   Example code for draw module.
+   
+.. literalinclude:: code_examples/draw_module_example.py
+   

docs/reST/ref/joystick.rst

 ======================
 
 .. module:: pygame.joystick
-   :synopsis: pygame module for interacting with joystick devices
+   :synopsis: Pygame module for interacting with joysticks, gamepads, and trackballs.
 
-| :sl:`pygame module for interacting with joystick devices`
+| :sl:`Pygame module for interacting with joysticks, gamepads, and trackballs.`
 
-The joystick module manages the joystick devices on a computer (there can be
-more than one). Joystick devices include trackballs and video-game-style
+The joystick module manages the joystick devices on a computer.
+Joystick devices include trackballs and video-game-style
 gamepads, and the module allows the use of multiple buttons and "hats".
+Computers may manage multiple joysticks at a time.
 
-To get initialise the joystick module and get a list of Joystick instances
+Each instance of the Joystick class represents one gaming device plugged 
+into the computer. If a gaming pad has multiple joysticks on it, than the
+joystick object can actually represent multiple joysticks on that single
+game device.
+
+For a quick way to initialise the joystick module and get a list of Joystick instances
 use the following code::
 
     pygame.joystick.init()
 
 .. function:: init
 
-   | :sl:`initialize the joystick module`
+   | :sl:`Initialize the joystick module.`
    | :sg:`init() -> None`
 
    This function is called automatically by ``pygame.init()``.
 
 .. function:: quit
 
-   | :sl:`uninitialize the joystick module`
+   | :sl:`Uninitialize the joystick module.`
    | :sg:`quit() -> None`
 
    Uninitialize the joystick module. After you call this any existing joystick
 
 .. function:: get_init
 
-   | :sl:`true if the joystick module is initialized`
+   | :sl:`Returns True if the joystick module is initialized.`
    | :sg:`get_init() -> bool`
 
    Test if the ``pygame.joystick.init()`` function has been called.
 
 .. function:: get_count
 
-   | :sl:`number of joysticks on the system`
+   | :sl:`Returns the number of joysticks.`
    | :sg:`get_count() -> count`
 
    Return the number of joystick devices on the system. The count will be 0 if
 
 .. class:: Joystick
 
-   | :sl:`create a new Joystick object`
+   | :sl:`Create a new Joystick object.`
    | :sg:`Joystick(id) -> Joystick`
 
    Create a new joystick to access a physical device. The id argument must be a
    .. ## pygame.joystick.Joystick ##
 
 .. ## pygame.joystick ##
+
+.. figure:: code_examples/joystick_calls.png
+   :scale: 100 %
+   :alt: joystick module example
+
+   Example code for joystick module.
+   
+.. literalinclude:: code_examples/joystick_calls.py
+   

docs/reST/ref/sprite.rst

 
 .. class:: Sprite
 
-   | :sl:`simple base class for visible game objects`
+   | :sl:`Simple base class for visible game objects.`
    | :sg:`Sprite(*groups) -> Sprite`
 
    The base class for visible game objects. Derived classes will want to
    instances to be added to.
 
    When subclassing the Sprite, be sure to call the base initializer before
-   adding the Sprite to Groups.
+   adding the Sprite to Groups. For example:
 
+   .. code-block:: python
+   
+       class Block(pygame.sprite.Sprite):
+            
+           # Constructor. Pass in the color of the block, 
+           # and its x and y position
+           def __init__(self, color, width, height):
+              # Call the parent class (Sprite) constructor
+              pygame.sprite.Sprite.__init__(self) 
+        
+              # Create an image of the block, and fill it with a color.
+              # This could also be an image loaded from the disk.
+              self.image = pygame.Surface([width, height])
+              self.image.fill(color)
+        
+              # Fetch the rectangle object that has the dimensions of the image
+              # Update the position of this object by setting the values of rect.x and rect.y
+              self.rect = self.image.get_rect()   
+      
    .. method:: update
 
       | :sl:`method to control sprite behavior`
 
 .. class:: DirtySprite
 
-   | :sl:`a more featureful subclass of Sprite with more attributes`
+   | :sl:`A subclass of Sprite with more attributes and features.`
    | :sg:`DirtySprite(*groups) -> DirtySprite`
 
    Extra DirtySprite attributes with their default values:
 
 .. class:: Group
 
-   | :sl:`container class for many Sprites`
+   | :sl:`A container class to hold and manage multiple Sprite objects.`
    | :sg:`Group(*sprites) -> Group`
 
    A simple container for Sprite objects. This class can be inherited to create
 
 .. class:: RenderPlain
 
-   same as pygame.sprite.Group
+   | :sl:`Same as pygame.sprite.Group`
+
+   This class is an alias to ``pygame.sprite.Group()``. It has no additional functionality.
+
+   .. ## pygame.sprite.RenderClear ##
 
 .. class:: RenderClear
 
-   same as pygame.sprite.Group
+   | :sl:`Same as pygame.sprite.Group`
 
+   This class is an alias to ``pygame.sprite.Group()``. It has no additional functionality.
 
+   .. ## pygame.sprite.RenderClear ##
 
 .. class:: RenderUpdates
 
-   | :sl:`Group class that tracks dirty updates`
+   | :sl:`Group sub-class that tracks dirty updates.`
    | :sg:`RenderUpdates(*sprites) -> RenderUpdates`
 
    This class is derived from ``pygame.sprite.Group()``. It has an extended
 
 .. function:: OrderedUpdates
 
-   | :sl:`RenderUpdates class that draws Sprites in order of addition`
+   | :sl:`RenderUpdates sub-class that draws Sprites in order of addition.`
    | :sg:`OrderedUpdates(*spites) -> OrderedUpdates`
 
    This class derives from ``pygame.sprite.RenderUpdates()``. It maintains the
 
 .. class:: LayeredUpdates
 
-   | :sl:`LayeredUpdates Group handles layers, that draws like OrderedUpdates.`
+   | :sl:`LayeredUpdates is a sprite group that handles layers and draws like OrderedUpdates.`
    | :sg:`LayeredUpdates(*spites, **kwargs) -> LayeredUpdates`
 
    This group is fully compatible with :class:`pygame.sprite.Sprite`.
 
 .. class:: LayeredDirty
 
-   | :sl:`LayeredDirty Group is for DirtySprites.  Subclasses LayeredUpdates.`
+   | :sl:`LayeredDirty group is for DirtySprite objects.  Subclasses LayeredUpdates.`
    | :sg:`LayeredDirty(*spites, **kwargs) -> LayeredDirty`
 
    This group requires :class:`pygame.sprite.DirtySprite` or any sprite that
 
 .. function:: GroupSingle
 
-   | :sl:`Group container that holds a single Sprite`
+   | :sl:`Group container that holds a single sprite.`
    | :sg:`GroupSingle(sprite=None) -> GroupSingle`
 
    The GroupSingle container only holds a single Sprite. When a new Sprite is
 
 .. function:: spritecollide
 
-   | :sl:`find Sprites in a Group that intersect another Sprite`
+   | :sl:`Find sprites in a group that intersect another sprite.`
    | :sg:`spritecollide(sprite, group, dokill, collided = None) -> Sprite_list`
 
    Return a list containing all Sprites in a Group that intersect with another
        collide_rect, collide_rect_ratio, collide_circle,
        collide_circle_ratio, collide_mask
 
+   Example:
+   
+   .. code-block:: python
+
+    # See if the Sprite block has collided with anything in the Group block_list
+    # The True flag will remove the sprite in block_list
+    blocks_hit_list = pygame.sprite.spritecollide(player, block_list, True)  
+     
+    # Check the list of colliding sprites, and add one to the score for each one
+    for block in blocks_hit_list:
+        score +=1
+       
    .. ## pygame.sprite.spritecollide ##
 
 .. function:: collide_rect
 
-   | :sl:`collision detection between two sprites, using rects.`
+   | :sl:`Collision detection between two sprites, using rects.`
    | :sg:`collide_rect(left, right) -> bool`
 
    Tests for collision between two sprites. Uses the pygame rect colliderect
 
 .. function:: collide_rect_ratio
 
-   | :sl:`collision detection between two sprites, using rects scaled to a ratio.`
+   | :sl:`Collision detection between two sprites, using rects scaled to a ratio.`
    | :sg:`collide_rect_ratio(ratio) -> collided_callable`
 
    A callable class that checks for collisions between two sprites, using a
 
 .. function:: collide_circle
 
-   | :sl:`collision detection between two sprites, using circles.`
+   | :sl:`Collision detection between two sprites, using circles.`
    | :sg:`collide_circle(left, right) -> bool`
 
    Tests for collision between two sprites, by testing to see if two circles
 
 .. function:: collide_circle_ratio
 
-   | :sl:`collision detection between two sprites, using circles scaled to a ratio.`
+   | :sl:`Collision detection between two sprites, using circles scaled to a ratio.`
    | :sg:`collide_circle_ratio(ratio) -> collided_callable`
 
    A callable class that checks for collisions between two sprites, using a
 
 .. function:: collide_mask
 
-   | :sl:`collision detection between two sprites, using masks.`
+   | :sl:`Collision detection between two sprites, using masks.`
    | :sg:`collide_mask(SpriteLeft, SpriteRight) -> point`
 
    Returns first point on the mask where the masks collided, or None if 
 
 .. function:: groupcollide
 
-   | :sl:`find all Sprites that collide between two Groups`
+   | :sl:`Find all sprites that collide between two groups.`
    | :sg:`groupcollide(group1, group2, dokill1, dokill2, collided = None) -> Sprite_dict`
 
    This will find collisions between all the Sprites in two groups.
 
 .. function:: spritecollideany
 
-   | :sl:`simple test if a Sprite intersects anything in a Group`
+   | :sl:`Simple test if a sprite intersects anything in a group.`
    | :sg:`spritecollideany(sprite, group, collided = None) -> Sprite` Collision with the returned sprite.
    | :sg:`spritecollideany(sprite, group, collided = None) -> None` No collision