我正在尝试遵循有关使用python和'acrade'软件包进行游戏开发的指南。 我已经使用以下命令安装了街机游戏:(我使用的是Linux)
pip3 install arcade
然后,我尝试编译以下代码以测试新安装的软件包:
import arcade
SCREEN_WIDTH = 600
SCREEN_HEIGHT = 600
arcade.open_window(SCREEN_WIDTH, SCREEN_HEIGHT, "Drawing Example")
arcade.set_background_color(arcade.color.WHITE)
arcade.start_render()
x = 300
y = 300
radius = 200
arcade.draw_circle_filled(x, y, radius, arcade.color.YELLOW)
x = 370
y = 350
radius = 20
arcade.draw_circle_filled(x, y, radius, arcade.color.BLACK)
x = 230
y = 350
radius = 20
arcade.draw_circle_filled(x, y, radius, arcade.color.BLACK)
x = 300
y = 280
width = 120
height = 100
start_angle = 190
end_angle = 350
arcade.draw_arc_outline(x, y, width, height, arcade.color.BLACK, start_angle, end_angle, 10)
arcade.finish_render()
arcade.run()
我收到以下错误:
File "/home/beewulf/.local/lib/python3.6/site-packages/pyglet/window/xlib/__init__.py", line 805, in _set_text_property
raise XlibException('Could not create UTF8 text property')
pyglet.window.xlib.XlibException: Could not create UTF8 text property
我尝试遵循[https://github.com/openai/gym/issues/673]中的解决方案 但这没用。
有人知道吗?