Skip to main content

Pygame Advanced Graphics Library - 4.0.0

An all purpose graphics library for easily creating complicated effects quickly, and with a minimum of code.


Ian Mallett
(geometrian)

Pygame Advance Graphics Library

PAdLib

This is an all purpose graphics library for easily creating complicated effects quickly, and with a minimum of code. Run the very well commented examples, each less than a page long (not counting comments), and learn how to make complicated effects like shadows and antialiasing. Have fun!

Dependencies

Python
Pygame
Psyco (optional)

To Do

-Improve Antialiasing speed with the new features in PyGame 1.8
-Thicker Dotted Lines?
-Some More Demos
Email me to give suggestions.

Links

Home Page
http://www.geometrian.com/programming/projects/index.php?project=Pygame%20Advanced%20Graphics%20Library
Source
http://www.geometrian.com/Programs/PAdLib4.zip

Releases

Pygame Advanced Graphics Library 3.0.0 — 30 Mar, 2008

Pygame Advanced Graphics Library 1.0.0 — 4 Mar, 2008

Pygame Advanced Graphics Library 4.0.0 — 5 Apr, 2008

Pygame Advanced Graphics Library 2.0.0 — 28 Mar, 2008

Pygame Advanced Graphics Library 5.0.0 — 9 May, 2008

Pygame Advanced Graphics Library 8.0.0 — 31 Dec, 2012

Pygame Advanced Graphics Library 8.0.2 — 5 Jan, 2013

Pygame Advanced Graphics Library 8.0.1 — 1 Jan, 2013

Pygame Advanced Graphics Library 8.1.1 — 25 Jul, 2013

Pygame Advanced Graphics Library 8.1.0 — 8 Jan, 2013

Pygame.org account Comments

  • Horst JENS 2011-05-22 19:39:46

     very nice ! i'm impressed by the shadows

  • bobpunk 2014-01-09 01:22:43

    HOW DO I INSTALLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL???????????????

  • bobpunk 2014-01-09 01:40:17

    397. DISPLAYSURF.fill(BGCOLOR)

    398.

    399. # Draw the title image to the window:

    400. DISPLAYSURF.blit(IMAGESDICT['title'], titleRect)

    401.

    402. # Position and draw the text.

    403. for i in range(len(instructionText)):

    404. instSurf = BASICFONT.render(instructionText[i], 1, TEXTCOLOR)

    405. instRect = instSurf.get_rect()

    406. topCoord += 10 # 10 pixels will go in between each line of text.

    407. instRect.top = topCoord

    408. instRect.centerx = HALF_WINWIDTH

    409. topCoord += instRect.height # Adjust for the height of the line.

    410. DISPLAYSURF.blit(instSurf, instRect)

    411.

    412. while True: # Main loop for the start screen.

    413. for event in pygame.event.get():

    414. if event.type == QUIT:

    415. terminate()

    416. elif event.type == KEYDOWN:

    417. if event.key == K_ESCAPE:

    418. terminate()

    419. return # user has pressed a key, so return.

    420.

    421. # Display the DISPLAYSURF contents to the actual screen.

    422. pygame.display.update()

    423. FPSCLOCK.tick()

    424.

    425.

    426. def readLevelsFile(filename):

    427. assert os.path.exists(filename), 'Cannot find the level file: %s' % (filename)

    428. mapFile = open(filename, 'r')

    429. # Each level must end with a blank line

    430. content = mapFile.readlines() + ['\r\n']

    431. mapFile.close()

    432.

    433. levels = [] # Will contain a list of level objects.

    434. levelNum = 0

    435. mapTextLines = [] # contains the lines for a single level's map.

    436. mapObj = [] # the map object made from the data in mapTextLines

    437. for lineNum in range(len(content)):

    438. # Process each line that was in the level file.

    439. line = content[lineNum].rstrip('\r\n')

    440.

    441. if ';' in line:

  • bobpunk 2014-01-09 01:41:27

    RANDOME CODE???????????????????????????!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!?????????????????????????????????????????????!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!??????????????????????????????????????????????????????????????????????????????????????????!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!???????????????????????????????????????????????????????????????????????????????????!!!!!!!!!!!!!!!!!!!!!!!!!?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!?????????????

  • Alex P-B 2014-09-28 11:23:49

    Nice stuff indeed! Had a good time looking through the examples

  • Charles 2015-04-02 05:10:56

    Thanks a ton, I know this is older material, but this will be invaluable to my learning.

  • DiliupG 2016-12-04 02:51:46

    all broken links