0% found this document useful (0 votes)
4 views

main.py _ CodeHS

The document contains a Python script using the Pygame library, which appears to be part of a game project. It includes imports for various game components like player, enemy, and bullet, and initializes the game screen. There are also error messages related to audio configuration, indicating issues with sound playback during execution.

Uploaded by

alexicoo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

main.py _ CodeHS

The document contains a Python script using the Pygame library, which appears to be part of a game project. It includes imports for various game components like player, enemy, and bullet, and initializes the game screen. There are also error messages related to audio configuration, indicating issues with sound playback during execution.

Uploaded by

alexicoo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

3/7/25, 9:04 PM main.

py | CodeHS

New + main.py Share Save Output Docs More

player.py bulle
bull… Run Stop
1 import pygame
en… 2 import random
pygame 2.5.2 (SDL 2.28.2, Python 3.11.11)
3 from settings im Hello from the pygame community.
hel… 4 from player impo ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
5 from enemy impor https://www.pygame.org/contribute.html
ALSA lib conf.c:5178:(_snd_config_evaluate) function
m… directory
6 from bullet impo snd_func_card_inum
ALSA lib confmisc.c:422:(snd_func_concat)
returned error: No sucherror
file evaluating
or
7 from helpers imp ALSA lib conf.c:5178:(_snd_config_evaluate) function
pla… strings
rectory
8
snd_func_concat
ALSA lib confmisc.c:1334:(snd_func_refer)
returned error: No such file
error
or evaluating
di name
sett… 9 def main(): ALSA lib conf.c:5178:(_snd_config_evaluate) function
10 pygame.init ectory
ass… 11 screen = pyg snd_func_refer
ALSA lib conf.c:5701:(snd_config_expand)
returned error: No such fileEvaluate
or dir error: No
pygame.displ ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM
12 such file or directory
^CTraceback (most recent call last):
b… 13 default
File "/home/karel/main.py", line 110, in <module>
14 show_start_s main()
show_instruc File "/home/karel/main.py", line 14, in main
e… 15 show_start_screen(screen)
16 File "/home/karel/helpers.py", line 31, in show_start_screen
pl… 17 clock = pyga wait_for_key()
player = Pla File "/home/karel/helpers.py", line 68, in wait_for_key
18 for event in pygame.event.get():
19 level = INIT ^^^^^^^^^^^^^^^^^^
20 enemies = cr KeyboardInterrupt
21 bullets = [ Creating a server...
22 Connecting to your server...
23 score = INIT Connected.
24 lives = INIT
25 enemy_timer
26 enemy_interv
27 fast_enemy =
28 running = Tr
29 while runnin
30 for even
31 if e
32
33 if e
34
35
36
37
38

https://codehs.com/sandbox/avanwinkel/mainpy?filepath=main.py 1/1

You might also like