APIWindow and frameOverview

Window And Frame

Window and frame helpers configure the logical canvas and keep drawing work inside a predictable game loop.

Functions

  • init_window(width: int, height: int, title: str) -> None
  • window_should_close() -> bool
  • close_window() -> None
  • set_target_fps(fps: int) -> None
  • get_target_fps() -> int
  • get_fps() -> int
  • get_frame_time() -> float
  • get_time() -> float
  • begin_drawing() -> None
  • end_drawing() -> None
  • clear_background(color: Color) -> None
  • get_screen_width() -> int
  • get_screen_height() -> int
from conjure import *
 
init_window(360, 640, "Frame Example")
set_target_fps(60)
 
while not window_should_close():
    begin_drawing()
    clear_background(WHITE)
    draw_text(str(get_fps()), 12, 12, 20, BLACK)
    end_drawing()

Use these with drawing primitives and the quickstart.