{"id":27326462,"url":"https://github.com/virtuoso/clap","last_synced_at":"2025-04-12T11:26:50.540Z","repository":{"id":152469805,"uuid":"279115411","full_name":"virtuoso/clap","owner":"virtuoso","description":"3D game engine in plain C","archived":false,"fork":false,"pushed_at":"2025-04-10T22:30:28.000Z","size":2206,"stargazers_count":8,"open_issues_count":40,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T23:28:39.264Z","etag":null,"topics":["3d-graphics","c","game-development","game-engine","game-engine-3d","game-engine-framework","gamedev","gamedev-framework","gamedev-library","graphics-programming","ldjam57","ludum-dare","ludumdare","opengl"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/virtuoso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2020-07-12T17:35:32.000Z","updated_at":"2025-04-10T22:30:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"acdeb1c4-ee7a-4e43-9b4c-284d0e770265","html_url":"https://github.com/virtuoso/clap","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtuoso%2Fclap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtuoso%2Fclap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtuoso%2Fclap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtuoso%2Fclap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/virtuoso","download_url":"https://codeload.github.com/virtuoso/clap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248559449,"owners_count":21124472,"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","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":["3d-graphics","c","game-development","game-engine","game-engine-3d","game-engine-framework","gamedev","gamedev-framework","gamedev-library","graphics-programming","ldjam57","ludum-dare","ludumdare","opengl"],"created_at":"2025-04-12T11:26:45.847Z","updated_at":"2025-04-12T11:26:50.534Z","avatar_url":"https://github.com/virtuoso.png","language":"C","readme":"# CLAP game engine\n\n![linux-build](https://github.com/virtuoso/clap/actions/workflows/linux-build.yml/badge.svg?branch=main)\n![www-build](https://github.com/virtuoso/clap/actions/workflows/www-build.yml/badge.svg?branch=main)\n![macos-build](https://github.com/virtuoso/clap/actions/workflows/macos-build.yml/badge.svg?branch=main)\n![windows-build](https://github.com/virtuoso/clap/actions/workflows/windows-build.yml/badge.svg?branch=main)\n\n# Index\n\n- [Live demos](#live-demos)\n- [Native demo executables](#native-demo-executables)\n- [Source code and submodules](#source-code-and-submodules)\n- [Local build (Macos)](#local-build-macos)\n  - [Install dependencies](#install-dependencies)\n  - [Build](#build)\n  - [Run](#run)\n- [Linux build](#linux-build)\n- [Wasm build](#wasm-build)\n  - [Emscripten](#emscripten)\n  - [Create build_config file](#create-build_config-file)\n  - [Run local web server](#run-local-web-server)\n- [Windows build](#windows-build)\n- [Build using cmake presets](#build-using-cmake-presets)\n- [Build errors](https://github.com/virtuoso/clap/tree/main/docs/build-errors.md)\n- [What to do with all this](#what-to-do-with-all-this)\n\n## Live demos\n[Live demo: main](http://ash.works/clap/main/clap/)\n[Live demo: testing](http://ash.works/clap/main/claptest/)\n\n## Native demo executables\n[Windows x64](http://ash.works/clap/main/windows/bin/ldjam56.exe)\n[Mac OS X arm64](http://ash.works/clap/main/macos/bin/ldjam56)\n[Linux x86_64](http://ash.works/clap/main/linux/bin/ldjam56)\n\n## Source code and submodules\n\nCheckout repository and modules\n\n```sh\ngit submodule update --init --recursive\n```\n\n## Local build (Macos)\n\n### Install dependencies\n\n```sh\nbrew install cmake glew zlib libpng libogg libvorbis freetype glfw shaderc spirv-cross pkg-config\n```\n\n### Build\n\n```sh\n./configure.sh\n./build.sh\n```\n\n### Run\n\nOptionally, you can run a server that collects logs from all instances of the engine client for debugging purposes. If you don't specify \"server_ip\" in the build_config configuration file, or don't specify -DCLAP_BUILD_NETWORKING during cmake configuration stage, you don't have to run the server. Otherwise, set \"server_ip\" to the IP address of the machine where the server will be running.\n\n```sh\nbuild/debug/tools/server/server\n```\n\nAnd run the demo\n\n```sh\nbuild/test/demo/ldjam56/ldjam56\n```\n\n## Linux build\n\nInstall dependencies (see also the simple-build.yml in case this goes out of date):\n```sh\nsudo apt-get install -y libfreetype-dev libglew-dev libglfw3-dev libogg-dev libopenal-dev libpng-dev libvorbis-dev zlib1g-dev glslc spirv-cross\n```\n\nThe rest is the same as the [Mac OS build instructions](#local-build-macos)\n\n## Wasm build\n\nInstall some of the dependencies needed for native build: cmake, shaderc/glslc, spirv-cross.\nSee [Mac OS build](#local-build-macos) or [Linux build](#linux-build), depending on your host\noperating system for details. The rest of the dependencies will be brought in by emsdk.\n\n### Emscripten\n\nDownload and install [Emscripten](https://emscripten.org/docs/getting_started/downloads.html)\n\n### Create build_config file\n\n```sh\nemsdk_env_path=\u003cpath to installed emscripten SDK\u003e\nwww_dir=\u003cpath to www build folder where static content will be build\u003e\n```\nSee [Run](#run) section about the server_ip=... setting.\n\nFor example:\n\n```sh\nemsdk_env_path=${HOME}/src/game/emsdk/emsdk_env.sh\nwww_dir=${HOME}/src/game/www\n```\n\n### Run local web server\n\nFor example, using python3 embedded httpd server:\n\n```sh\npython3 -m http.server -d ${HOME}/src/game/www\n```\n\n## Windows build\n\nOk, are you sure? Yes? Read on.\nFor reference, check [windows-build github action](https://github.com/virtuoso/clap/blob/main/.github/workflows/windows-build.yml).\n\nFirst, install [Visual Studio 2019](https://visualstudio.microsoft.com/vs/older-downloads/) Community edition (free). VS 2022 doesn't work yet, because of conflicts with windows-libc, somebody will fix it eventually.\n\nThen, install [LLVM](https://releases.llvm.org/download.html) for clang. There's also a way of installing clang via Visual Studio, but this one is easier.\n\nThen, install [python](https://www.python.org/downloads/windows/).\n\nThen, set up vcpkg and set an environment variable to the path of the cloned repository:\n```sh\ngit clone https://github.com/microsoft/vcpkg.git\ncd vcpkg\n.\\bootstrap-vcpkg.bat -disableMetrics\nexport VCPKG_INSTALLATION_ROOT=.../vcpkg\n```\n\nNote: everything up to this point is preinstalled in github runners, so windows-build.yml doesn't mention any of that.\n\nThen, install all the dependencies using vcpkg:\n```sh\n$VCPKG_INSTALLATION_ROOT/vcpkg.exe libpng:x64-windows-static glfw3:x64-windows-static glew:x64-windows-static freetype:x64-windows-static openal-soft:x64-windows-static libogg:x64-windows-static libvorbis:x64-windows-static shaderc spirv-cross\n```\n\nThen, in the root of the clap directory, configure and build using cmake. Use --parallel X option with cmake --build commands to speed things up.\n```sh\ncmake --preset w32test -B build/test\ncmake --preset w32debug -B build/debug\ncmake --build build/test\ncmake --build build/debug\n```\n\nThen, run the result:\n```sh\n.\\build\\test\\demo\\ldjam56\\ldjam56.exe\n```\n\n## Build using cmake presets\n\n[Windows build](#windows-build) is an example of how to build using cmake presets (w32test, w32debug). These two require VCPKG_INSTALLATION_ROOT environment variable to point to vcpkg\nroot.\n\nWasm build can be done similarly, setting EMSDK to point to the Emscripten installation root.\nHaving done that, you can do one or several of the cmake presets:\n```sh\ncmake --preset emtest -B build/emtest\ncmake --build build/emtest\n```\n\n## What to do with all this\n\nCheck out the brand new [CONTRIBUTING](https://github.com/virtuoso/clap/blob/main/CONTRIBUTING.md) file for details on the whats and the hows.\nIf you're using Visual Studio Code, [here](https://github.com/virtuoso/clap/blob/main/docs/vscode-setup.md) is a copy-pastable configuration for the project to get you up and running.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirtuoso%2Fclap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvirtuoso%2Fclap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirtuoso%2Fclap/lists"}