{"id":13520499,"url":"https://github.com/load1n9/caviar","last_synced_at":"2025-04-04T19:12:00.984Z","repository":{"id":37078316,"uuid":"433891569","full_name":"load1n9/caviar","owner":"load1n9","description":"⚡ Blazing fast, modern, Game Engine powered by WebGPU for Deno and the browser","archived":false,"fork":false,"pushed_at":"2024-11-05T05:20:34.000Z","size":10468,"stargazers_count":161,"open_issues_count":4,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-28T18:14:23.730Z","etag":null,"topics":["collaborate","deno","game-development","game-engine","gpu","gui","typescript","webgpu","wgpu"],"latest_commit_sha":null,"homepage":"https://caviarengine.netlify.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/load1n9.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}},"created_at":"2021-12-01T15:56:57.000Z","updated_at":"2025-03-26T17:50:46.000Z","dependencies_parsed_at":"2024-01-05T21:00:13.173Z","dependency_job_id":"7d5d5d48-9e8a-4cf3-a2ea-36154fd27bde","html_url":"https://github.com/load1n9/caviar","commit_stats":{"total_commits":124,"total_committers":5,"mean_commits":24.8,"dds":"0.17741935483870963","last_synced_commit":"689dbeb83f431b6677bf27bee7449d3e50561b31"},"previous_names":[],"tags_count":68,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/load1n9%2Fcaviar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/load1n9%2Fcaviar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/load1n9%2Fcaviar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/load1n9%2Fcaviar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/load1n9","download_url":"https://codeload.github.com/load1n9/caviar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247234922,"owners_count":20905854,"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":["collaborate","deno","game-development","game-engine","gpu","gui","typescript","webgpu","wgpu"],"created_at":"2024-08-01T05:02:22.621Z","updated_at":"2025-04-04T19:12:00.958Z","avatar_url":"https://github.com/load1n9.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Modules"],"sub_categories":["Game engine"],"readme":"\u003cp align=\"center\"\u003e\n \u003cimg src=\"https://raw.githubusercontent.com/load1n9/caviar/main/assets/caviar.svg\" width=\"81rem\" /\u003e\n\u003c/p\u003e\n\u003cbr/\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/load1n9/caviar/stargazers\"\u003e\n    \u003cimg alt=\"caviar stars\" src=\"https://img.shields.io/github/stars/load1n9/caviar?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAEFCu8CAAAABGdBTUEAALGPC/xhBQAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAHKADAAQAAAABAAAAHAAAAABHddaYAAABxElEQVRIDe2Wv04CQRDGAQuoTKQ2ITyADZWVJZWV+gJYWBNqKh/C16CRBlprWxsTE2NJfABNOH9z7Gzm2Nv7A8TCOMnHzs1838ze3e4ejUbMkiRZS64lP1x8MjTFr2DQE6Gl2nI+7POARXAmdbas44ku8eLGhU9UckRliX6qxM9sQvz0vrcVaaKJKdsSNO7LOtK1kvcbaXVRu4LMz9kgKoYwBq/KLBi/yC2DQgSnBaLMQ88Tx7Q3AVkDKHpgBdoak5HrCSjuaAW/6zOz+u/Q3ZfcVrhliuaPYCAqsSJekIO/TlWbn2BveAH5JZBVUWayusZW2ClTuPzMi6xTIp5abuBHxHLcZSyzkxHF1uNJRrV9gXBhOl7h6wFW/FqcaGILEmsDWfg9G//3858Az0lWaHhm5dP3i9JoDtTm+1UrUdMl72OZv10itfx3zOYpLAv/FPQNLvFj35Bnco/gzeCD72H6b4JYaDTpgidwaJOa3bCji5BsgYcDdJUamSMi2lQTCEbgu0Zz4Y5UX3tE3K/RTKny3qNWdst3UWU8sYtmU40py2Go9o5zC460l/guJjm1leZrjaiH4B4cVxUK12mGVTV/j/cDqcFClUX01ZEAAAAASUVORK5CYII=\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/load1n9/caviar/releases/latest/\"\u003e\n    \u003cimg alt=\"caviar releases\" src=\"https://img.shields.io/github/v/release/load1n9/caviar?logo=github\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/load1n9/caviar/blob/main/LICENSE\"\u003e\n    \u003cimg alt=\"caviar License\" src=\"https://img.shields.io/github/license/load1n9/caviar?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAEFCu8CAAAABGdBTUEAALGPC/xhBQAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAHKADAAQAAAABAAAAHAAAAABHddaYAAAC5UlEQVRIDd2WPWtVQRCGby5pVASLiGghQSxyG8Ui2KWwCfkH9olY2JneQkiR0oCIxH/gB+qVFDYBIWBAbAIRSbCRpLXwIxLiPT7vnNm9e87ZxJtUwYH3zO47Mzv7Mbv3tlo5KYriGtgAJ81OY1ENdG/YI4boFEOI911BXgY/pdtwGuAtXpvmB1tAXHDnUolE5urkPOQo6MqA3pXWmJJL4Bb4rQ7yEYfxsjnIF29NJIoNC6e5fxOL/qN+9KCz7AaLpN8zI415N2i2EptpGrkRIjGeAuvR6IY1hSFLFUOug9Ms2M7ZxIUNytm1mnME186sdI2BOCwAyQMg54ugzSmKmwbPwSbolKH+hbAtQdsOoF+BsF3anUVwBdiOWRidFZDKTTrKEAJTm3GVrGkHzw/uPZbyx7DNNLfB7KGmRsCcr+/gjaiPSpAOTyX9qG4L/XBDdWXDDf1M+wtQ5fwCOtcb4Dto6VpLmzByB6gqdHbTItGSJdAGqibJQhmRfCF7IN4beSF2G9CqnGXQrxofXU+EykllNeoczRgYytDKMubDIRK0g5MF8rE69cGu0u9nlUcqaUZ41W0qK2nGcSzr4D2wV9U9wxp1rnpxn8agXAOHMQ9cy9kbHM7ngY4gFb03TxrO/yfBUifTtXt78jCrjY/jgEFnMn45LuNWUtknuu7NSm7D3QEn3HbatV1Q2jvgIRf1sfODKQaeymxZoMLlTqsq1LF+HvaTqQOzEzUCfni0/eNIA+DfuE3KEtbsegckGmMktTXacnBHPVe687ugkpT+axCkkhBSyRSjWI2xf1KMMVmYiQdWksK9BEFiQoiYLIlvJA3/zeTzCejP0RbB6YPbhZuB+0pR3KcdX0LaJtju0ZgBL8Bd+sbz2QIaU2OfBX3BaQLsgZysQtrk0M8Sh1A0w3DyyYnGnAiZ4gqZ/TvI2A8OGd1YIbF7+F3P+B6dYpYdsJNZgrjO0UdOIhmom0nwL0pnfnzkL1803jAoKhvyAAAAAElFTkSuQmCC\" /\u003e\n  \u003c/a\u003e\n \u003c/p\u003e\n\u003chr/\u003e\n\n## ⚡ native and web game engine built on top of [gluten](https://github.com/deno-windowing/gluten) \u0026 [dwm](https://github.com/deno-windowing/dwm) with WebGPU \u0026 WebGL rendering\n\n\u003cimg src=\"https://raw.githubusercontent.com/load1n9/caviar/main/assets/demo.png\" width=\"800rem\" /\u003e\n\n### [Running In the Browser With WebGPU](https://github.com/load1n9/caviar/tree/main/web)\n\n### Usage\n\n#### Moving Squares\n\n\u003cimg src=\"https://raw.githubusercontent.com/load1n9/caviar/main/assets/movingsquare.gif\" width=\"800rem\" /\u003e\n\n```typescript\nimport { Rectangle, Scene, World } from \"https://deno.land/x/caviar/mod.ts\";\n\nclass Game extends Scene {\n  test = new Rectangle(0, 0, 100, 100, \"#00ff00\");\n  test2 = new Rectangle(0, 0, 100, 100, \"#00ff00\");\n\n  override setup() {\n    this.addChild([this.test, this.test2]);\n  }\n  override update() {\n    this.test.x += 5;\n    this.test2.x += 2;\n  }\n}\n\nconst world = new World({\n  title: \"\",\n  width: 800,\n  height: 600,\n  resizable: true,\n}, [Game]);\n\nawait world.start();\n```\n\n#### Perlin Noise\n\n\u003cimg src=\"https://raw.githubusercontent.com/load1n9/caviar/main/assets/perlin.png\" width=\"800rem\" /\u003e\n\n```typescript\nimport {\n  Group,\n  Rectangle,\n  Scene,\n  World,\n} from \"https://deno.land/x/caviar/mod.ts\";\nimport { PerlinNoise } from \"https://deno.land/x/caviar/src/plugins/Perlin.ts\";\n\nclass Game extends Scene {\n  chunkSize = 16;\n  tileSize = 16;\n\n  override setup() {\n    const group = new Group(this, 0, 0);\n    this.world.loadPlugin(\"perlin\", PerlinNoise);\n\n    const perlin = this.world.usePlugin(\"perlin\");\n    perlin.setSeed(1000);\n\n    for (let x = -40; x \u003c this.chunkSize; x++) {\n      for (let y = -40; y \u003c this.chunkSize; y++) {\n        const tileX = (1 * (this.chunkSize * this.tileSize)) +\n          (x * this.tileSize);\n        const tileY = (1 * (this.chunkSize * this.tileSize)) +\n          (y * this.tileSize);\n        const perlinValue = perlin.perlin2(tileX / 100, tileY / 100);\n        if (perlinValue \u003c 0.2) {\n          group.addChild(\n            new Rectangle(\n              tileX,\n              tileY,\n              this.tileSize,\n              this.tileSize,\n              \"#ff0000\",\n            ),\n          );\n        } else if (perlinValue \u003e= 0.2 \u0026\u0026 perlinValue \u003c 0.3) {\n          group.addChild(\n            new Rectangle(\n              tileX,\n              tileY,\n              this.tileSize,\n              this.tileSize,\n              \"#00ff00\",\n            ),\n          );\n        } else if (perlinValue \u003e= 0.3) {\n          group.addChild(\n            new Rectangle(\n              tileX,\n              tileY,\n              this.tileSize,\n              this.tileSize,\n              \"#0000ff\",\n            ),\n          );\n        }\n      }\n    }\n    this.addChild(group);\n  }\n}\n\nconst world = new World({\n  title: \"Perlin Noise Plugin Example\",\n  width: 800,\n  height: 600,\n  resizable: true,\n}, [Game]);\n\nawait world.start();\n```\n\n#### Texture Sprites\n\n\u003cimg src=\"https://raw.githubusercontent.com/load1n9/caviar/main/assets/demo.png\" width=\"800rem\" /\u003e\n\n```typescript\nimport {\n  PICO8,\n  Scene,\n  TextureSprite,\n  World,\n} from \"https://deno.land/x/caviar/mod.ts\";\n\nclass Game extends Scene {\n  test = new TextureSprite(this, 0, 0, {\n    data: [\n      \"..9..9..\",\n      \"..9999..\",\n      \".AAAAAA.\",\n      \".A1F1FA.\",\n      \".AFFFFA.\",\n      \".FEEEEAA\",\n      \".EEEEEEA\",\n      \"..E..E..\",\n    ],\n    pixelWidth: 32,\n    pixelHeight: 32,\n    palette: PICO8,\n  });\n\n  override setup() {\n    this.addChild(this.test);\n  }\n  override update() {\n    this.test.setX(this.test.x + 10);\n  }\n}\n\nconst world = new World({\n  title: \"Texture Sprite Example\",\n  width: 800,\n  height: 600,\n  resizable: true,\n}, [Game]);\n\nawait world.start();\n```\n\nAs Caviar uses the Deno FFI, you will need to add the flags `--allow-ffi` to\nyour Deno command.\n\n```sh\ndeno run --allow-env --allow-read --allow-write --allow-ffi test.ts\n```\n\n### Tools\n\n- [Caviar CLI](https://github.com/load1n9/caviar/tree/main/cli) cli tool to\n  generate caviar projects\n\n### Maintainers\n\n- Dean Srebnik ([@load1n9](https://github.com/load1n9))\n- CarrotzRule ([@carrotzrule123](https://github.com/CarrotzRule123))\n\n### License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fload1n9%2Fcaviar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fload1n9%2Fcaviar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fload1n9%2Fcaviar/lists"}