GameFrame Class

Note: This class is in beta and planned for major improvements in version 1.0

The GameFrame class represents a single frame of game footage in the Bluetang framework.

Core Components

  • Store frame image data

  • Track frame metadata

  • Provide cached frame variants

  • Compare with other frames

Frame Variants

Frame variants are:

  • Transformations of the original image data

  • Lazily evaluated when first requested

  • Cached for subsequent access

  • Accessible via properties

Methods

compare_ssim

def compare_ssim(self, previous_game_frame)

Calculates structural similarity (SSIM) between two frames.

Usage

GameFrames are primarily used:

  • As input to game agents' frame handlers

  • For frame comparison and analysis

  • As the preferred way to pass game image data

Benefits of GameFrames

  • Consistent interface for frame data

  • Built-in transformations

  • Cached variants for performance

  • Comparison capabilities

  • Metadata tracking

Last updated