{"id":21897881,"url":"https://github.com/damemay/cdlv","last_synced_at":"2025-10-09T09:31:16.314Z","repository":{"id":162925795,"uuid":"638192304","full_name":"damemay/cdlv","owner":"damemay","description":"Library and scripting system for ADV/VN style games made in pure C.","archived":true,"fork":false,"pushed_at":"2024-09-27T16:40:42.000Z","size":557,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T05:19:41.356Z","etag":null,"topics":["c","c-programming","http-server","visual-novel"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/damemay.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}},"created_at":"2023-05-09T09:20:07.000Z","updated_at":"2025-01-08T11:48:13.000Z","dependencies_parsed_at":"2023-07-18T02:00:31.979Z","dependency_job_id":"c0e5025d-1863-43a5-b45a-6a99391764bc","html_url":"https://github.com/damemay/cdlv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/damemay/cdlv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damemay%2Fcdlv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damemay%2Fcdlv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damemay%2Fcdlv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damemay%2Fcdlv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/damemay","download_url":"https://codeload.github.com/damemay/cdlv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damemay%2Fcdlv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001135,"owners_count":26083022,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"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":["c","c-programming","http-server","visual-novel"],"created_at":"2024-11-28T14:20:13.094Z","updated_at":"2025-10-09T09:31:15.937Z","avatar_url":"https://github.com/damemay.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cdlv\nLibrary and scripting system for ADV/VN style games made in pure C.\n\nEasy to implement basically anywhere.\n\n## Features\n- **Simple C-inspired scripting language**\n- **Play anywhere thanks to HTTP REST API server capabilities**\n- **Rendering and windowing backend independent - use it with anything you like**\n- **Simple to setup with callbacks API**\n- **Supports decoding various video formats thanks to ffmpeg**\n\n## Planned features\n- choices and goto\n- more human callback config api\n\n## In progress\n- extensively test script behaviour\n- fix/extensively test ffmpeg decoding\n\n## Documentation\n\nDocumentation can be found in [this repository's wiki](https://github.com/damemay/cdlv/wiki)\n\n## Scripting example\n```\n!resources_path \"images/\"\n!resources {\n    \"black.png\"\n    \"cloudy_sky.png\"\n    \"sky_clearing.mp4\"\n    \"sunny_sky.png\"\n}\n!scene countdown {\n    @bg cloudy_sky\n    \"I don't like rainy days. I hope it will get sunnier soon...\"\n    @bg black\n    Later that day...\n    @bg sky_clearing once\n    @bg cloudy_sky\n    \"Ah, there's the sun! I'm already feeling better!\"\n}\n```\nRefer to [sample.c](sample.c) and [res/sample/sample.cdlv](res/sample/sample.cdlv) for a documented sample desktop app with SDL2.\n\n# mdlv\n\nCDLV parsing REST API HTTP server implemented with Mongoose.\n\nUsing the server from code is as simple as this:\n```c\nmdlv mdlv_base = {\n    .host = \"http://localhost:8080\",\n    .path = \"/var/www/scripts/\",\n    .web_root = \"/var/www/web_root/\",\n};\nif(mdlv_init(\u0026mdlv_base) != cdlv_ok) exit(1);\nfor(;;) mg_mgr_poll(\u0026mdlv_base.manager, 50);\nmdlv_free(\u0026mdlv_base);\n```\nRefer to [server.c](server.c) and [web_root/script.js](web_root/script.js) for working server and browser client implementation.\n\n# Building\nBuilding binaries requires linking with `ffmpeg` (and `SDL2`, `SDL2_image`, `SDL2_ttf` for `cdlv-sample`) libraries installed on system.\n\n```shell\ngit clone --recurse-submodules https://github.com/damemay/cdlv.git\ncd cdlv\nmkdir build \u0026\u0026 cd build\ncmake .. \u0026\u0026 make\n```\n\n## CMake options:\n- `CDLV_FFMPEG=ON` - Include FFmpeg as a library dependency for video decoding when linking\n- `CDLV_MONGOOSE=ON` - Include `mongoose.c` and `mdlv.c` inside library\n- `CDLV_SAMPLE=ON` - Build `cdlv-sample`\n- `CDLV_MDLV_SERVER=ON` - Build `mdlv-server`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamemay%2Fcdlv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamemay%2Fcdlv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamemay%2Fcdlv/lists"}