GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - SMB-M87/Kinetra: Reusable C++20 2D simulation library: headless geometry, collisions, physics, spatial queries, navigation and steering, with an optional SDL2/OpenGL 3.3 runtime and launcher.

BranchesTags
Open more actions menu

Latest commit

 

History

549 Commits
549 Commits

Folders and files

NameName
Last commit message
Last commit date
.agents/skills
.agents/skills
 
 
.claude
.claude
 
 
.codex
.codex
 
 
.github/workflows
.github/workflows
 
 
cmake
cmake
 
 
docs
docs
 
 
include
include
 
 
resources
resources
 
 
src
src
 
 
tests
tests
 
 
third_party/doctest
third_party/doctest
 
 
tools
tools
 
 
.clang-format
.clang-format
 
 
.clang-tidy
.clang-tidy
 
 
.clangd
.clangd
 
 
.git-blame-ignore-revs
.git-blame-ignore-revs
 
 
.gitignore
.gitignore
 
 
AGENTS.md
AGENTS.md
 
 
CMakeLists.txt
CMakeLists.txt
 
 
CMakePresets.json
CMakePresets.json
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

Kinetra icon

Kinetra

Reusable C++20 2D simulation library with an optional SDL2/OpenGL 3.3 runtime. Kinetra-Lab owns applications, the bundled launcher executable and experiments. Kinetra builds independently of Lab.

Table of contents

  • Features
  • Shared UI
  • Modules
  • Quick start
  • Using Kinetra
  • Working with Kinetra-Lab
  • Documentation
  • Platform support
  • License

Documentation index

Directory guides: docs, media, tests, tools.

Features

  • Headless geometry, collisions, physics, spatial queries, navigation and steering.
  • Optional window, input, camera, colored primitives, RGBA image drawing, bitmap text and direct sessions.
  • Public C++ headers under include/kinetra/, grouped by layer in simulation/, view/ and runtime/; CMake targets Kinetra::Simulation, optional Kinetra::Runtime and Kinetra::Launcher.
  • Optional reusable launcher menu and session host in <kinetra/runtime/launcher.h>; application registration and gameplay remain in Lab.

Shared UI

Every Kinetra-Lab application runs in the same shell: the launcher menu and session host of Kinetra::Launcher, and the runtime's overlays. The applications supply rows, content and actions; Kinetra lays them out, draws them and captures their input (contracts). The GIFs show them in Kinetra-Lab's Demo, with the pointer and keys a person would use (how they are made).

Part In use
Launcher menu (LaunchMenu, SessionHost) The launcher menu with Demo, Dotio and i4sim, then Demo's configuration page with Terrain, Gravity, Maze and Doorway, Doorway starting, the settings panel's Scenarios back on the page with Doorway selected, and Launcher back to the list
Settings panel (SettingsOverlay) The settings panel over Demo: Statistics off and on, the help of Sim Controls and Debug Controls, and Resume
Debug menu (DebugMenu) The debug menu over Demo: UPS and Max Speed stepped up, Avoidance switched to Legacy and back, and the Layers section
Agent inspector and frame times (InspectorView, draw_frame_times) A click on a Demo agent opens the inspector; Frame Times puts the graph below it; another agent is selected, and X closes the inspector
Debug layers Demo's terrain with Vectors, Forces (with its parts Seek and Avoidance), Paths, Collision Shapes and Active Agents each toggled away from its default and back, Home Range on, and the view zooming out

Modules

Module CMake target Public headers in include/kinetra/<layer>/ Guide
Simulation: geometry, physics, spatial queries, navigation, steering, avoidance, passing, stall detection, right of way and making way, traffic admission, the fixed clock Kinetra::Simulation simulation/: math.h, physics.h, spatial_grid.h, collision_grid.h, navigation.h, weighted_grid.h, steering.h, avoidance.h, passing.h, passing_coordinator.h, stall_detector.h, right_of_way.h, traffic.h, clock.h Simulation
View: camera, input, debug-menu rows and frame statistics, usable headless header-only, with Kinetra::Simulation view/: camera.h, input.h, debug_menu.h, inspector.h, timing.h Runtime and launcher
Runtime: window, drawing, sessions, overlays Kinetra::Runtime (optional) runtime/: engine.h, session.h, settings_view.h, inspector_view.h, error_view.h, and header-only bitmap_text.h, hud_text.h, overlay_style.h, debug_view.h, help_view.h Runtime and launcher
Launcher: menu, session host and loop Kinetra::Launcher (optional) runtime/launcher.h Runtime and launcher
Tests and the external consumer Core tests

Include headers with their layer, as <kinetra/simulation/physics.h>; a headless consumer includes simulation/ and view/ only. The rule for both repositories is in conventions. include/glad/ and include/KHR/ hold the generated OpenGL loader; they are private to the runtime. The vendored test framework is described in third_party/doctest.

Quick start

Requires C++20, CMake 3.16+, a build tool. The default build is headless.

cmake --workflow --preset dev        # Debug, runtime, warnings; needs CMake 3.25+, Ninja, ccache
cmake --workflow --preset headless   # simulation only, no SDL2/OpenGL needed

Without presets: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build --parallel && ctest --test-dir build. Enable -DKINETRA_BUILD_RUNTIME=ON for SDL2/OpenGL (development packages required). See development for all presets, editor setup and graphics verification. Run applications from Kinetra-Lab.

Using Kinetra

Source integration:

set(BUILD_TESTING OFF CACHE BOOL "" FORCE)
add_subdirectory(external/Kinetra)
add_executable(my_simulation main.cpp)
target_link_libraries(my_simulation PRIVATE Kinetra::Simulation)
#include <kinetra/simulation/physics.h>

int main() {
    kinetra::World world;
    world.add({});
    world.step(1.f / 120);
}

Runtime consumers enable KINETRA_BUILD_RUNTIME and link Kinetra::Runtime. Kinetra also supplies Kinetra::Launcher for the generic menu, session host and launcher loop. Integration uses source targets; there is no installed CMake package.

Working with Kinetra-Lab

Kinetra-Lab includes Kinetra as a Git submodule at external/Kinetra and records one exact engine commit. An engine change is made, committed and published here first; Lab then moves its pointer to that commit and verifies the applications against it. Application-only changes belong in Lab. Lab's external dependencies guide has the steps and commands, including building Lab against an unpublished sibling checkout, and the workflow gives the merge order.

Documentation

Start with the documentation index and the architecture; each module guide explains its own code.

Contributors follow the development workflow: the implementing session plans the affected scenarios, adds and verifies regression tests, and reviews the final diff. Code changes have a design document. Each change is verified at the level its impact requires. AGENTS.md records the rules for agents and developers; conventions and the documentation guide give the details.

Platform support

Kinetra is built from source on Linux. Ubuntu 24.04 LTS is the Linux reference for CI. See the dependencies per distribution. Continuous collision detection covers circles and nonrotating boxes and polygons; rotating boxes and polygons are checked discretely and can tunnel. Navigation does not guarantee arrival in moving crowds. Rendering supports standalone RGBA images supplied by the caller. Applications own pose interpolation. Cross-machine bitwise determinism is not promised.

License

MIT; see LICENSE. Generated GLAD retains embedded licenses.

About

Reusable C++20 2D simulation library: headless geometry, collisions, physics, spatial queries, navigation and steering, with an optional SDL2/OpenGL 3.3 runtime and launcher.

Topics

2dcmakecollision-detectioncpp20openglpathfindingphysics-enginesdl2simulationsteering-behaviors

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.