Getting Started
You don’t need to manually install the native raylib; installing the Python bindings brings it in for you automatically:
python3 -m pip install --user raylib
Try it out:
#!/usr/bin/env python3
import pyray as pr
def main():
init_game()while not pr.window_should_close():
update_game()
pr.begin_drawing()
pr.clear_background(pr.BLACK)
draw_game()
pr.end_drawing()
pr.close_window()
def init_game():
800, 450, "Window Title")
pr.init_window(60)
pr.set_target_fps(
pr.hide_cursor()
def update_game():
pass
def draw_game():
"Hello world", 100, 200, 20, pr.VIOLET)
pr.draw_text(
#---------------
main()