Skip to content

Instantly share code, notes, and snippets.

# ****************************************************************************************
#
# raylib [core] example - 2D camera platformer
#
# This example has been created using raylib 2.5 (www.raylib.com)
# raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
#
# Example contributed by arvyy (@arvyy) and reviewed by Ramon Santamaria (@raysan5)
#
# Copyright (c) 2019 arvyy (@arvyy)
# ****************************************************************************************
#
# raylib [audio] example - Raw audio streaming
#
# Example originally created with raylib 1.6, last time updated with raylib 4.2
#
# Example created by Ramon Santamaria (@raysan5) and reviewed by James Hofmann (@triplefox)
#
# Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
# BSD-like license that allows static linking with closed source software
## Simple animated raylib example in Nim using naylib
const
ScreenWidth = 800
ScreenHeight = 450
type
Ball = object
position: Vector2
velocity: Vector2
radius: float32
initWindow(800, 450, "Hello from Gist!")
setTargetFPS(60)
while not windowShouldClose():
beginDrawing()
drawFPS(10, 10)
endDrawing()
closeWindow()

Digital Clock Example

A real-time digital clock with large figlet-style digits that updates every frame.

# Clear the screen
fgClear()

# Get current time
var hour = getHour()

Matrix Digital Rain - Enhanced

A sophisticated Matrix-inspired digital rain effect with glitch effects, variable speeds, and erasers.

Features

  • Variable Speed Drops: Each column has its own speed multiplier
  • Dynamic Trail Lengths: Trails vary from 8-25 characters
  • Glitch Effects: Random character glitches in trailing characters
  • Eraser Drops: Optional clearing drops that follow main drops

Audio Sine Wave with Volume Slider

Interactive audio demo with volume control.

print("=== Audio Sine Wave Demo ===")
print("Initializing audio system...")
print("Yay!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")

# Audio parameters

3D Demo - Spinning Cubes

This demo shows how to use the 3D rendering features in Storie.

Run with: ./build/storie --3d examples/3d_demo.md

Initialize

# Set up the camera

Storie demo - Custom Markdown

This is a test to verify custom markdown loading works!

print("=== Custom Markdown Loaded! ===")
print("This is from test_demo.md")
@R3V1Z3
R3V1Z3 / snow.lua
Created November 4, 2025 06:21
Example of animated snow in the terminal using Storie engine.
-- snow.lua - Realistic snow effect module for Storie
-- Can be embedded in any Markdown content with:
-- ```lua module:snow
-- [paste this file content]
-- ```
local Snow = {}
-- Configuration
local SNOW_COUNT = 50