module

Tsh

The T(hirty) S(ix) h(undred) engine

The primary module for the engine.

Tsh.play() and Tsh::PlayThing are the most used parts of the engine.

Constants

COLOR_COUNT = 32

The size of Tsh.colors

MAX_SOUNDS = 16

The maximum amount of sound that can play at the same time. 1-16

VERSION = "0.2.0"

Class methods

background_color

The background color for the screen

Source
background_color=(background_color : Raylib::Color)

The background color for the screen

Source
check_collisions

Runs all collision checks

Source
colors

A static array of Tsh::Color of size COLOR_COUNT

Source
delta_time

Returns the time since the last frame rendered

Source
destroy_all_playthings

Destroys every PlayThing

Source
game_time

Returns the time since the game started

Source
key_down?(key : Key) : Bool

Checks if a key is currently down

Source
key_pressed?(key : Key) : Bool

Checks if a key has been pressed

Source
play(title : String, res_x : UInt32, res_y : UInt32, colors : Array(Tsh::Color) = [] of Tsh::Color, &)

Starts the engine. Yields a block to update the game

Source
res_x

The internal screen's resolution

Source
res_y
Source

Nested types