{"id":51235044,"url":"https://github.com/gugdun/crank","last_synced_at":"2026-06-28T19:32:19.211Z","repository":{"id":360177829,"uuid":"1234966852","full_name":"gugdun/crank","owner":"gugdun","description":"Game engine built around BSP maps, written in C and powered by Raylib","archived":false,"fork":false,"pushed_at":"2026-05-25T09:41:21.000Z","size":426,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-25T11:25:33.951Z","etag":null,"topics":["bsp","c","cross-platform","game-engine","raylib"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gugdun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-10T21:42:55.000Z","updated_at":"2026-05-25T09:41:25.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gugdun/crank","commit_stats":null,"previous_names":["gugdun/crank"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/gugdun/crank","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gugdun%2Fcrank","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gugdun%2Fcrank/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gugdun%2Fcrank/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gugdun%2Fcrank/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gugdun","download_url":"https://codeload.github.com/gugdun/crank/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gugdun%2Fcrank/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34901959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bsp","c","cross-platform","game-engine","raylib"],"created_at":"2026-06-28T19:32:17.547Z","updated_at":"2026-06-28T19:32:19.199Z","avatar_url":"https://github.com/gugdun.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crank\n\nGame engine built around Quake II BSP maps, written in C and\npowered by [Raylib](https://www.raylib.com/).\n\n![c1a0](public/c1a0.webp)\n\n## Features\n\n- Quake II BSP (version 38) loader with entity, visibility, and brush parsing\n- World mesh built once at load time and uploaded to the GPU\n- Static lightmap atlas with shelf packing and 1-luxel padding\n- Diffuse * lightmap shading via a custom GLSL shader\n- Six-face skybox rendering\n- Minimal ECS runtime for entity/component management\n- JSON entity archetypes: BSP entities are matched to JSON definitions\n  and spawned into the world automatically\n- GoldSrc-style first-person physics (walk, air-move, step-slide, jump,\n  noclip fly mode)\n- Fixed-rate physics (128 Hz) with render-time interpolation\n- PVS + frustum culling with dynamic per-surface index buffers\n\n## Asset directories\n\nThese are NOT committed to the repository. Create them in the working\ndirectory before running the engine:\n\n- **`maps/`** — Quake II `.bsp` files. The map name passed on the command\n  line is resolved as `maps/\u003cname\u003e.bsp`.\n- **`textures/`** — Diffuse textures as `.png` files. The directory\n  structure must mirror the texture names referenced in the BSP's texinfo\n  lump. For example, if a face references `e1u1/floor1_2`, place the image\n  at `textures/e1u1/floor1_2.png`.\n- **`env/`** — Skybox textures as `.png` files, one per face,\n  named `\u003cskyname\u003e\u003csuffix\u003e.png` where suffix is one of `ft`, `bk`, `lf`,\n  `rt`, `up`, `dn`. The sky name is read from the `worldspawn` entity's\n  `sky` key, defaulting to `unit1_`.\n- **`entities/`** — JSON entity archetype files. Each file is named\n  `\u003cclassname\u003e.json` and defines the components that make up that entity\n  type. When a map is loaded, every entity in the BSP entity lump is\n  matched to a JSON file by its `classname` and spawned into the ECS world.\n\nThe `shaders/` directory IS in the repository and is copied next to the\nexecutable automatically by the CMake build.\n\n## Building\n\nRequirements:\n\n- CMake 3.21 or newer\n- A C11-capable C compiler (GCC or Clang)\n- An OpenGL 3.3 capable GPU and drivers\n- Build dependencies needed by Raylib's bundled GLFW\n  (X11 headers on Linux: `libx11-dev`, `libxrandr-dev`, `libxinerama-dev`,\n  `libxcursor-dev`, `libxi-dev`)\n\nRaylib itself is fetched and built automatically by CMake.\n\n```sh\ncmake -S . -B build\ncmake --build build\n```\n\nThe output binary is `build/crank`.\n\n## Running\n\nFrom the project root (so the executable can see the asset directories\neither by symlink or by being placed alongside them):\n\n```sh\nmkdir -p maps textures env entities    # if you haven't already\n# ... drop your assets in ...\n./build/crank c1a0\n```\n\nIf no map name is given, the engine tries `c1a0`. Working directory must\ncontain `maps/`, `textures/`, `env/`, `entities/`, and `shaders/`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgugdun%2Fcrank","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgugdun%2Fcrank","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgugdun%2Fcrank/lists"}