我正在运行 Win 10,DirectX v12 版本 382.05
我从https://realpython.com/arcade-python-game-framework/复制了这个。我已经安装了街机、psychoPy 和数据类。
def basic_arcade_program():
# Basic arcade program
# Displays a white window with a blue circle in the middle
# Imports
import arcade
# Constants
SCREEN_WIDTH = 600
SCREEN_HEIGHT = 800
SCREEN_TITLE = "Welcome to Arcade"
RADIUS = 150
# Open the window
arcade.open_window(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE)
# Set the background color
arcade.set_background_color(arcade.color.WHITE)
# Clear the screen and start drawing
arcade.start_render()
# Draw a blue circle
arcade.draw_circle_filled(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, RADIUS, arcade.color.BLUE)
# Finish drawing
arcade.finish_render()
# Display everything
arcade.run()
basic_arcade_program()
错误源于此行:
arcade.draw_circle_filled(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, RADIUS, arcade.color.BLUE)