README.rst
1These examples should help get you started with pygame. Here is a
2brief rundown of what you get. The source code for all examples
3is in the public domain. Feel free to use for your own projects.
4
5aliens.py
6 This started off as a port of the SDL demonstration, Aliens.
7 Now it has evolved into something sort of resembling fun.
8 This demonstrates a lot of different uses of sprites and
9 optimized blitting. Also transparancy, colorkeys, fonts, sound,
10 music, joystick, and more. (PS, my high score is 117! goodluck)
11
12arraydemo.py
13 Another example filled with various surfarray effects.
14 It requires the surfarray and image modules to be installed.
15 This little demo can also make a good starting point for any of
16 your own tests with surfarray
17
18audiocapture.py
19 Record sound from a microphone, and play back the recorded sound.
20
21blend_fill.py
22 BLEND_ing colors in different ways with Surface.fill().
23
24blit_blends.py
25 BLEND_ing colors Surface.blit().
26
27camera.py
28 Basic image capturing and display using pygame.camera
29
30cursors.py
31 Make custom cursors :)
32
33dropevent.py
34 Drag and drop files. Using the following events.
35 DROPBEGIN, DROPCOMPLETE, DROPTEXT, DROPFILE
36
37eventlist.py
38 Learn about pygame events and input.
39 Watch the events fly by. Click the mouse, and see the mouse
40 event come up. Press a keyboard key, and see the key up event.
41
42fastevents.py
43 Posting events from other threads? Check this out.
44
45font_viewer.py
46 Display all available fonts in a scrolling window.
47
48fonty.py
49 Super quick, super simple application demonstrating
50 the different ways to render fonts with the font module
51
52freetype_misc.py
53 FreeType is a world famous font project.
54
55glcube.py
56 Using PyOpenGL and Pygame, this creates a spinning 3D multicolored cube.
57
58headless_no_windows_needed.py
59 For using pygame in scripts.
60
61liquid.py
62 This example was created in a quick comparison with the
63 BlitzBasic gaming language. Nonetheless, it demonstrates a quick
64 8-bit setup (with colormap).
65
66mask.py
67 Single bit pixel manipulation. Fast for collision detection,
68 and also good for computer vision.
69
70midi.py
71 For connecting pygame to musical equipment.
72
73moveit.py
74 A very simple example of moving stuff.
75
76music_drop_fade.py
77 Fade in and play music from a list while observing
78 several events. Uses fade_ms added in pygame2, as well as set_endevent,
79 set_volume, drag and drop events, and the scrap module.
80
81overlay.py
82 An old way of displaying video content.
83
84pixelarray.py
85 Process whole arrays of pixels at a time.
86 Like numpy, but for pixels, and also built into pygame.
87
88playmus.py
89 Simple music playing example.
90
91prevent_display_stretching.py
92 A windows specific example.
93
94scaletest.py
95 Showing how to scale Surfaces.
96
97scrap_clipboard.py
98 A simple demonstration example for the clipboard support.
99
100setmodescale.py
101 SCALED allows you to work in 320x200 and have it show up big.
102 It handles mouse scaling and selection of a good sized window depending
103 on the display.
104
105sound.py
106 Extremely basic testing of the mixer module. Load a
107 sound and play it. All from the command shell, no graphics.
108
109sound_array_demos.py
110 Echo, delay and other array based processing of sounds.
111
112sprite_texture.py
113 Shows how to use hardware Image Textures with pygame.sprite.
114
115stars.py
116 A simple starfield example. You can change the center of
117 perspective by leftclicking the mouse on the screen.
118
119testsprite.py
120 More of a test example. If you're interested in how to use sprites,
121 then check out the aliens.py example instead.
122
123textinput.py
124 A little "console" where you can write in text.
125 Shows how to use the TEXTEDITING and TEXTINPUT events.
126
127vgrade.py
128 Demonstrates creating a vertical gradient with
129 Numpy. The app will create a new gradient every half
130 second and report the time needed to create and display the
131 image. If you're not prepared to start working with the
132 Numpy arrays, don't worry about the source for this one :]
133
134video.py
135 It explores some new video APIs in pygame 2.
136 Including multiple windows, Textures, and such.
137
138data/
139 Directory with the resources for the examples.
140
141There's LOTS of examples on the pygame website, and on places like github.
142
143We're always on the lookout for more examples and/or example
144requests. Code like this is probably the best way to start
145getting involved with Python gaming.
146