beetlebug▾
/

ztk::game info

Gives the state of the loop as a dict.

ztk::game info

Description

The keys are running, paused, rate, time, seconds (the time of the game in seconds, with the part of a step), scale (the scale of -scale), dropped (the steps that late frames dropped), frames (the runs of the draw), seed, store (files when ztk::game save writes files, or memory when the saves stay in memory for the run), and pads, sound, tilt, and haptics. The last four are 0 in this stage: the game has no controller, sound, tilt, or haptics.

Returns

A dict.

Examples

% ztk::game loop -update {} -rate 30
> dict get [ztk::game info] rate
30

Errors

% ztk::game info now
wrong # args: should be "ztk::game info"
-errorcode TCL WRONGARGS

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztk 1.0.0-beta.7