Skip to content
Kyuchumimo edited this page Apr 24, 2024 · 20 revisions
Specifications
Resolution Customizable display, Defaults to 240x136 pixel display - windowed scaled mode display
Color Customizable color palette (chosen from 24-bit colorspace), Defaults to Sweetie 16
Input 1 gamepad with 8 buttons / mouse / keyboard
Sprites Defaults to 256 foreground sprites and 256 background tiles (8x8 pixel)
Map Customizable tiles
Sound Customizable channels, Defaults to 4 channels
Code Customizable Python3 script size
Memory No memory mapping
Bankswitching Customizable banks

Running your game

To run your game you need to insert the code in its corresponding space as shown below:

# do you useful stuff here

while True:
    _KEY = None
    for event in pygame.event.get():
        if event.type == pygame.QUIT or pygame.key.get_pressed()[pygame.K_ESCAPE]:
            pygame.quit()
            exit()
        elif event.type == pygame.KEYDOWN:
            _KEY = pygame.key.name(event.key)
    
    _TIC["CLOCK"].tick(60)
    
    # do you TIC() stuff here
    
    pygame.display.update()

After making the changes, your code should look like this:

t=0
x=96
y=24

while True:
    _KEY = None
    for event in pygame.event.get():
        if event.type == pygame.QUIT or pygame.key.get_pressed()[pygame.K_ESCAPE]:
            pygame.quit()
            exit()
        elif event.type == pygame.KEYDOWN:
            _KEY = pygame.key.name(event.key)
    
    _TIC["CLOCK"].tick(60)
    
    if btn(0): y=y-1
    if btn(1): y=y+1
    if btn(2): x=x-1
    if btn(3): x=x+1
    
    cls(13)
    spr(1+t%60//30*2,x,y,14,3,0,0,2,2)
    print("HELLO WORLD!",84,84,15,False,3,True)
    t=t+1
    
    pygame.display.update()

Pygame-80 comes with a predefined name for save data called _SAVEDATA, but you can change it to any name you wish.

Limitations

  • Pygame-80 does not come integrated with editors, so external programs must be used. Some of the recommended free and crossplatform programs for the development of the assets are the following:
    Code: Thonny (Windows, Mac and Linux)
    Tilesets / Spritesheets: GIMP (Windows, Mac and Linux)
    Audio (sfx / music): OpenMPT (Windows. Mac and Linux (using Wine>=1.8)), Audacity (Windows, Mac and Linux)
    Tilemaps: Tiled (Windows, Mac and Linux)

Video recording / Screenshot: Open Broadcaster Software | OBS (Windows, Mac and Linux)

Clone this wiki locally