PyGame-1.8-examples

所属分类:游戏引擎
开发工具:Python
文件大小:545KB
下载次数:103
上传日期:2008-04-10 20:39:48
上 传 者waterpigs
说明:  PyGame是用Python开发程序的一套工具,这个是使用PyGame开发游戏的样例代码。
(PyGame using Python to develop procedures for a set of tools, this is the use of PyGame sample code to develop the game.)

文件列表:
examples\aliens.py (9761, 2008-03-28)
examples\arraydemo.py (3045, 2008-03-28)
examples\blend_fill.py (2635, 2008-03-28)
examples\blit_blends.py (5842, 2008-03-28)
examples\chimp.py (5878, 2008-03-28)
examples\cursors.py (3098, 2008-03-28)
examples\data\alien1.gif (3826, 2008-03-28)
examples\data\alien1.jpg (3103, 2008-03-28)
examples\data\alien1.png (3522, 2008-03-28)
examples\data\alien2.gif (3834, 2008-03-28)
examples\data\alien2.png (3526, 2008-03-28)
examples\data\alien3.gif (3829, 2008-03-28)
examples\data\alien3.png (3518, 2008-03-28)
examples\data\arraydemo.bmp (76854, 2008-03-28)
examples\data\asprite.bmp (578, 2008-03-28)
examples\data\background.gif (9133, 2008-03-28)
examples\data\bomb.gif (1162, 2008-03-28)
examples\data\boom.wav (12562, 2008-03-28)
examples\data\car_door.wav (3910, 2008-03-28)
examples\data\chimp.bmp (5498, 2008-03-28)
examples\data\danger.gif (2761, 2008-03-28)
examples\data\explosion1.gif (6513, 2008-03-28)
examples\data\fist.bmp (4378, 2008-03-28)
examples\data\house_lo.wav (78464, 2008-03-28)
examples\data\liquid.bmp (11734, 2008-03-28)
examples\data\oldplayer.gif (1075, 2008-03-28)
examples\data\player1.gif (3470, 2008-03-28)
examples\data\punch.wav (4176, 2008-03-28)
examples\data\secosmic_lo.wav (18700, 2008-03-28)
examples\data\shot.gif (129, 2008-03-28)
examples\data\static.png (1202, 2008-03-28)
examples\data\whiff.wav (5850, 2008-03-28)
examples\data\yuv_1.pgm (649743, 2008-03-28)
examples\eventlist.py (3724, 2008-03-28)
examples\fastevents.py (2963, 2008-03-28)
examples\fonty.py (2295, 2008-03-28)
examples\glcube.py (2826, 2008-03-28)
examples\headless_no_windows_needed.py (1187, 2008-03-28)
examples\liquid.py (2496, 2008-03-28)
examples\macosx\aliens_app_example\aliens.py (9909, 2008-03-28)
... ...

These examples should help get you started with pyGame. Here is a brief rundown of what you get. The source code for these examples is in the public domain. Feel free to use for your own projects. uberball.py - This was added for pygame-1.5. It is a more complete game, similar to breakout. Derived from the pygame chimp example it shows how to do menu screens and a more complete game. aliens.py - This started off as a port of the SDL demonstration, Aliens. Now it has evolved into something sort of resembling fun. This demonstrates a lot of different uses of sprites and optimized blitting. Also transparancy, colorkeys, fonts, sound, music, joystick, and more. (PS, my high score is 117! goodluck) oldalien.py - This more closely resembles a port of the SDL Aliens demo. The code is a lot simpler, so it makes a better starting point for people looking at code for the first times. These blitting routines are not as optimized as they should/could be, but the code is easier to follow, and it plays quick enough. stars.py - A simple starfield example. You can change the center of perspective by leftclicking the mouse on the screen. fonty.py - Super quick, super simple application demonstrating the different ways to render fonts with the font module vgrade.py - Demonstrates creating a vertical gradient with Numeric python. The app will create a new gradient every half second and report the time needed to create and display the image. If you're not prepared to start working with the Numeric arrays, don't worry about the source for this one :] arraydemo.py - Another example filled with various surfarray effects. It requires the surfarray and image modules to be installed. This little demo can also make a good starting point for any of your own tests with surfarray sound.py - Extremely basic testing of the mixer module. Load a sound and play it. All from the command shell, no graphics. liquid.py - This example was created in a quick comparison with the BlitzBasic gaming language. Nonetheless, it demonstrates a quick 8-bit setup (with colormap). glcube.py - Using PyOpenGL and Pygame, this creates a spinning 3D multicolored cube. scrap_clipboard.py - A simple demonstration example for the clipboard support. data/ - directory with the resources for the examples We're always on the lookout for more examples and/or example requests. Code like this is probably the best way to start getting involved with python gaming. Pete Shinners shredwheat@mediaone.net pySDL : http://pysdl.sourceforge.net SDL : http://www.libsdl.org aliens.c : http://www.libsdl.org/projects/aliens

近期下载者

相关文件


收藏者