Skip to content
soizo edited this page Mar 30, 2026 · 2 revisions

Raykośa Game Engine Wiki

简体中文

Raykośa is a raycaster engine written in C with raylib. It renders spaces that feel tangible and present — not grid simulations, but places you inhabit. Non-Euclidean geometry is a first-class feature: portals, impossible concavities, and rooms larger on the inside than the outside are deliberate properties of the engine.

Quick Links

Page Description
Getting Started Build, install, and run the engine
Architecture Overview High-level engine design and subsystem map
Rendering System Column raycaster, textures, lighting, fog
Map System Facilities, relief, lights, billboards, JSON format
Audio System raylib SFX, positional audio, Strudel BGM
Collision and Player Circle-vs-AABB physics, player movement, input
Configuration Reference All tunable constants in config.h
Map Editor Guide Browser-based map editor usage

At a Glance

Property Value
Language C99
Graphics library raylib
Render resolution 640×360 (upscaled to 1280×720)
Renderer Software column raycaster (DDA)
Map format JSON (.map.json) with sparse encoding
Audio raylib (SFX/positional) + Strudel (procedural BGM via UDP)
Licence MPL-2.0
Author SoizoKtantas

Design Philosophy

Raykośa treats space as the medium, not the mechanic. The engine's raycasting pipeline is built around a facility-based architecture: maps are declared through high-level constructs — plates, relief, lights, billboards, sounds — that compile into renderable cell grids and baked lightmaps at load time. This separation keeps authoring expressive while giving the renderer everything it needs in a single pass.

The non-Euclidean character of the engine is not a novelty layer bolted on top. Slight perspective discontinuities at portal edges, impossible concavities, and spatial contradictions are treated as native properties of the space, not artefacts to correct. The front-to-back traversal pipeline is designed from the ground up to accommodate these geometries.

Project Structure

src/
  main.c           Entry point, game loop
  map.h/c          Map data structures, JSON load/save, compilation
  player.h/c       Player state, movement, input handling
  renderer.h/c     Column raycaster, lightmap sampling
  billboard.h/c    Billboard sprite rendering
  minimap.h/c      Top-down minimap overlay
  collision.h/c    Circle-vs-AABB collision detection
  audio.h/c        Audio system (raylib + Strudel)
  config.h         All engine constants
  jparse.h         Single-header JSON parser
  render_util.h    Inline renderer helpers
assets/
  textures/        64×64 BMP wall/floor/item textures
  maps/            JSON map files
  audio/samples/   WAV audio samples
strudel/
  server.mjs       Strudel pattern sequencer (Node.js)
  register.mjs     Module registration
  loader.mjs       Node.js module loader hook
tools/
  map_editor.html  Browser-based map editor
tests/
  test_main.c      Test runner
  test_map.c       Map loading/compilation tests
  test_collision.c Collision detection tests
  test_audio.c     Audio utility tests
docs/
  Design Notes.md
  Floor System Architecture.md

Planned Features

These are designed but not yet implemented:

  • Multi-floor — Vertical slices within a map connected by portals
  • Multi-map — Cross-map portals with scale/orientation freedom
  • Portals — Live render-through surfaces (foundation laid in the renderer)
  • Animators — Looping-motion facilities (Ferris wheels, rotating doors)
  • Mobs — Stateful entities with interaction and state machines
  • Diagonal prisms — Currently stored but compiled as flat blocks

Clone this wiki locally