Expand description

snailshell

Tiny library for making terminal text display with pleasant RPG-style animations.

Examples

// basic
snailprint("MUDKIP used WATER GUN!");

// custom speeds
snailprint_d("This fully prints in exactly one second.", 1.0);
snailprint_s("This prints six characters per second", 6.0);

Refresh Rate

You can change the refresh rate with set_snail_fps. Call it once at the beginning of your program. This is entirely optional.

Default fps is 60.

Functions

Sets the global fps of animated text.

Animate text with a fixed duration of two seconds.

Animate text with custom fixed duration. If you are printing a message with 10 characters and a one with 200, they will both take the same amount of time if passed the same duration.

Animate text at a constant speed of chars per second. This will animate so that each character printed takes a predictable speed, unlike snailprint_d.