API
Lifecycle functions
The lifecycle of a pyckitup game consists of these functions:
def init() -> State
Initializes assets, returns a state object which can be an integer, a list, a dictionary or practically any Python object.
def onload(State) -> None
This function is run exactly once after window creation. Can be used for setting frame rate, getting window size, etc..
def update(State) -> None
This function is guaranteeed to run once per frame.
def draw(State) -> None
Draw your game visuals here. In contrast to update function above, there is no once-per-frame guarantee.
def event(State, Event) -> None
Event is a dictionary containing the event type and its associated data.