Skip to content
Dr_Coomer edited this page Nov 12, 2024 · 2 revisions

The python-game-framework wiki

Methods of the game_framework class

Constructor

game_framework()

   Returns a game_framework object.


Create window

Creates a window.

spawn_window(width:int, height:int, resizable:bool=False, title:str="")

   Returns nothing.


Kill program

About the same as calling exit(), but will properly clean up the window.

stop_game()

   Returns nothing.


Get window resolution

window_resolution()

   Returns (x:int,y:int)


Get key state

Takes a string of length one, a single character.

is_key_down(key:str)

   Returns bool


Create line object

create_line(x1:int, y1:int, x2:int, y2:int, color:int=[0,0,0], width:int=2, style:str="solid")