The Flywheel Engine Examples
- Alpha Blendingalpha_blending
A CPU pixel-buffer alpha blending example demonstrating translucent rectangles, overlapping colored circles, animated blended drawing, and bitmap-text labels over a patterned background.
- Arena Tile Maparena_tile_map
A small map-loading example demonstrating arena-backed temporary parse memory, permanent runtime tile storage, text asset loading, tile rendering, and grid collision.
- Basic Engine Loopbasic_example
Shows The Flywheel Engine's current basic loop: CPU pixel rendering, image loading, mouse input, game-pad visualization, audio output, and debug replay indicators.
- Bitmap Textbitmap_text
A small text-rendering example demonstrating a built-in bitmap font, score and instruction text, integer scaling, colored glyphs, and safe clipping into the CPU pixel buffer.
- Gamepad Inputgamepad_input
Visualizes connected game-pad buttons, sticks, triggers, and d-pad state.
- Handmade Hero Day 025handmade_hero_day_025
This example is a Flywheel version of the engine/platform state around Handmade Hero Day 025. It is not a line-by-line port; it is a parity check that the current Flywheel API can support the same kind of game loop and platform services.
- Handmade Platform Parityhandmade_platform_parity
An early Handmade Hero-style platform pressure test for The Flywheel Engine. It draws a CPU pixel-buffer scene, stores persistent state in `Game_Memory`, reads normalized controller and mouse input, and writes a continuous generated tone through `Game_Output.audio`.
- Keyboard Inputkeyboard_input
Visualizes Flywheel's normalized physical keyboard input as a US QWERTY key layout, showing pressed, held, and released states.
- Menu Pause Overlaymenu_pause_overlay
A small game-flow and state-machine example demonstrating title, playing, paused, and game-over states with bitmap text, centered menu labels, keyboard navigation, and an overlay drawn into the CPU pixel buffer.
- Mobile Touch Arenamobile_touch_arena
A mobile-first WASM example for touch input. Use the left side of the screen as a virtual stick to move, and the right side to aim and fire. Active touch contacts are drawn with their anchors and drag vectors so the browser touch mapping is visible while playing.
- Particle Poolparticle_pool
A fixed-pool particle example demonstrating allocation-free spawning, deterministic updates, lifetime-based fading, and bitmap-text debug counters in the CPU pixel buffer.
- Prototype Starterprototype_starter
A blank starting-point example with generic keyboard/gamepad input bindings, title and pause menus, restart/exit flow, and a playing screen that only draws `Prototype Example`.
- Raycastingraycasting
A small raycasting example demonstrating grid-map collision, player rotation and movement, textured wall projection, and a minimap rendered into the CPU pixel buffer.
- Scrolling Tile Mapscrolling_tile_map
A larger-than-screen tile-map example demonstrating world-space movement, a clamped follow camera, visible-tile culling, collision against solid tiles, and a small bitmap-text debug overlay.
- Showcase Platformershowcase_platformer
A compact side-scrolling platformer demonstrating Flywheel camera movement, text-map loading, primitive drawing, alpha overlays, bitmap HUD text, menu state machines, keyboard/mouse/gamepad input, fixed particle pools, WAV decoding, and mixer playback.
- Simple Pongsimple_pong
A minimal Pong-style example demonstrating a simple game loop, rectangle collision detection, paddle bounce, wall bounce, and scoring.
- snakesnake
- Basic Geometric Figuressoftware_primitives
Lines, rectangles, circles, and triangles drawn into a CPU pixel buffer, including filled, outlined, thick, small, and clipped variants.
- Soundboard Mixersoundboard_mixer
An interactive audio mixer example demonstrating overlapping generated sounds, looping playback, fixed voice allocation, stereo volume/pan mixing, and bitmap-text mixer state.
- Top-Down Coin Collectortop_down_coin_collector
A small sprite-based example demonstrating PNG loading, alpha-blended sprite drawing, player movement, and rectangle overlap for collecting coins.
- WAV Sound Effectswav_sound_effects
A PCM WAV asset-loading example demonstrating simple runtime audio decoding, caller-owned sample storage, overlapping sound effects, and playback through the Flywheel mixer.