[][src]Crate babalcore

Structs

Level
Row
Slab

Enums

Skill

Different skills.

SlabDef

Different defs of slabs (those rectangles the ball can roll on). A def is what defines a slab, it will be translated into a kind at runtime. Typically some defs can be "a random slab", or even "a slab that varies with time", etc.

SlabKind

Different kind of slabs (those rectangles the ball can roll on).

Constants

LENGTH_MAX

A maximum length, in theory this could be infinite, in practice I prefer a limit that triggers before player computer/phone runs out of memory. So 100k is already quite a lot, possibly several hours of continuous play at high speed.

WIDTH_MAX

A maximum width, most playable values should range from 6 to 12, so 32 is already a lot. To simplify/optimize code, program uses fixed size rows, set to the WIDTH_MAX. With slabs of 4 or 8 bytes, it means only 256 bytes (worst case) for a row. With this setting, a 100_000 rows level, playable for 10 hours, at 3 slabs/sec still fits into 256Mb of memory.