gamebox-frame-manager

API Reference

gamebox-frame-manager

A manager for frames within a game loop.

BOX.FRAME

  • Class FRAME-MANAGER
    An object which keeps track of all the game frame state.
    %START
    %NOW
    %BEFORE
    %TOTAL-TIME   Reader: TOTAL-TIME
    %DELTA   Reader: DELTA
    %DELTA-BUFFER
    %FRAME-TIME   Reader: FRAME-TIME
    %ACCUMULATOR
    %ALPHA   Reader: ALPHA
    %VSYNC-P
    %PERIOD-ELAPSED
    %PERIOD-INTERVAL
    %DEBUG-INTERVAL
    %DEBUG-TIME
    %DEBUG-COUNT
  • Function TICK (frame-manager refresh-rate step-func &key periodic-func)
    This is designed to be called each iteration of a main game loop, which calls STEP-FUNC to update the physics when necessary, based on the DELTA of the frame manager. PERIODIC-FUNC is a function to be called periodically, controlled by the PERIOD-INTERVAL slot of FRAME-MANAGER.