{"id":14990941,"url":"https://github.com/litecanvas/game-engine","last_synced_at":"2025-04-30T07:06:35.266Z","repository":{"id":224422933,"uuid":"763195774","full_name":"litecanvas/game-engine","owner":"litecanvas","description":"🎮 Lightweight HTML5 canvas 2D engine suitable for small games, prototypes, animations, creative coding, etc.","archived":false,"fork":false,"pushed_at":"2025-04-01T23:05:01.000Z","size":698,"stargazers_count":37,"open_issues_count":5,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-30T07:06:29.321Z","etag":null,"topics":["creative-coding","fantasy-console","game-development","game-engine","gamedev","generative-art","hacktoberfest","html5-canvas","javascript-game","js13k","litecanvas","p5js","pico-8","processing","tic-80","videogames"],"latest_commit_sha":null,"homepage":"https://litecanvas.js.org/","language":"JavaScript","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/litecanvas.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":"2024-02-25T19:53:10.000Z","updated_at":"2025-04-27T21:31:15.000Z","dependencies_parsed_at":"2024-02-25T21:47:48.101Z","dependency_job_id":"951abea7-4d8b-455d-addb-46d21a79a454","html_url":"https://github.com/litecanvas/game-engine","commit_stats":{"total_commits":301,"total_committers":4,"mean_commits":75.25,"dds":"0.023255813953488413","last_synced_commit":"5d7520e02b91e570f54b96fbafcf40373f219046"},"previous_names":["litecanvas/engine","litecanvas/game-engine"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litecanvas%2Fgame-engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litecanvas%2Fgame-engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litecanvas%2Fgame-engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litecanvas%2Fgame-engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/litecanvas","download_url":"https://codeload.github.com/litecanvas/game-engine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251658208,"owners_count":21622819,"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":["creative-coding","fantasy-console","game-development","game-engine","gamedev","generative-art","hacktoberfest","html5-canvas","javascript-game","js13k","litecanvas","p5js","pico-8","processing","tic-80","videogames"],"created_at":"2024-09-24T14:21:11.854Z","updated_at":"2025-04-30T07:06:35.256Z","avatar_url":"https://github.com/litecanvas.png","language":"JavaScript","readme":"![logo](https://github.com/user-attachments/assets/cbff543a-17be-44e4-b4ce-f9ff0a0581bb)\n\n# Litecanvas\n\nLitecanvas is a lightweight HTML5 canvas 2D engine suitable for small web games, prototypes, game jams, animations, creative coding, learning game programming and game design, etc.\n\n:warning: **This project is still under development. All feedback is appreciated!** :warning:\n\n[![Discord Server](https://flat.badgen.net/static/CHAT/ON%20DISCORD/5865f2?scale=1.5)](https://discord.com/invite/r2c3rGsvH3)\n[![Discord Server](https://flat.badgen.net/static/FOLLOW/ON%20ITCH.IO/fa5c5c?scale=1.5)](https://bills.itch.io/litecanvas)\n\n### Features\n\n- **Tiny**: Only `~4KB` (minified + gzipped).\n- **Simple API**: Just few functions to draw shapes and some utilities.\n- **Predefined colors**: Just use a number (from 0 to 11) to choose a color in our 12-color palette.\n- **ZzFX**: Play or create sound effects with [ZzFX](https://killedbyapixel.github.io/ZzFX/).\n- **Extensible**: Use or create [plugins](https://www.npmjs.com/search?q=keywords:litecanvas) to add functionalities or change the engine.\n- **Playground**: Access or install the [playground](https://litecanvas.js.org/) webapp to code and share games (even offline).\n\n[Learn more in the cheatsheet...](https://litecanvas.js.org/about.html)\n\n## Getting Started\n\nYou can try our [online playground](https://litecanvas.github.io) or just installing the [basic template](https://github.com/litecanvas/template):\n\n```sh\n# requires Node.js\nnpx tiged litecanvas/template my-game\ncd my-game\nnpm install\nnpm run dev\n```\n\nIf you prefer, you can manually install via [NPM](https://www.npmjs.com/package/litecanvas):\n\n```\nnpm install litecanvas\n```\n\n```js\n// import the package or put the CDN script in your HTML\n// CDN: https://unpkg.com/litecanvas/dist/dist.dev.js\nimport litecanvas from 'litecanvas'\n\n// Start and setup the engine\n// learn more: https://litecanvas.js.org/about.html#settings\nlitecanvas({\n    loop: { init, update, draw, tapped },\n})\n\nfunction init() {\n    // this function run once\n    // before the game starts\n    bg = 0\n    color = 3\n    radius = 32\n    posx = CENTERX\n    posy = CENTERY\n}\n\n// this function detect taps/clicks\n// and changes the circle position\nfunction tapped(x, y) {\n    posx = x\n    posy = y\n}\n\n// this function controls the game logic\nfunction update(dt) {\n    // make the circle falls 100 pixels per second\n    posy += 100 * dt\n}\n\n// this function render the game scene\nfunction draw() {\n    cls(bg) // clear the screen\n    circfill(posx, posy, radius, color) // draw a circle\n}\n```\n\n## Docs\n\nCheck out our [Cheatsheet](https://litecanvas.js.org/about.html).\n\n## Basic Demos\n\nTry some demos in our playground:\n\n- [Pong](https://litecanvas.js.org?c=eJy1Vlly20YQ%2FccpOl8ATBACuEiWYslFM5DlKkdMkUwkJpVKwcCQnAoEoIChpdiWr%2BAT%2BC%2BHyHlygVwh3TODTZYU%2F0QsDdELenm9DBMmIA%2FjCzgGf%2BA5BuAf0mdEj2vykkivEa%2BQHg01HbNSkALpKc6bMElaj6vmccHfsZZpYk3STUK8yhovpLeaW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iijIQzs7CilMO5xmEJYGhGKK31UZH5xWfDnTyYx03A04pjdPnJkrzibF6L7AWCfzoGjRwa2wILGg3URROmv9FdFLuypCOmbn4BYENOZhhTSkSuKk2YjUH5d6rxJ2z7KH65bPf%2BvfjvVfvh5dKAjaNyb3LIJtBogCnmg1zxgknSt0ypTFJU5jx9vvILwZGaYSAscTFPLj%2FBMOFSpbN0f5FyJWegsqGGzeVYZtK8lQOWyjHGw4PC9ILWgxudwdXZh6Wpt7%2Bcf3Th99%2FCeFh1muZ7cKl8JTOWRaEx%2BVNMrY8Vd8H0f4fBSyrmYI0eyVf4md0DpWK0%2BcKLS9o%2BU7QOGmEh6gdHnS9IYMxB7T0Gb0dQePtRgGiXNECKK8HyuuA8kOgY6vOqsMlrvZovbHfbOLv86H2Wtfm9b59exB8h89LMqfG66YBbe5N0vCwWxU2H3OmwP8BV89smg%3D%3D)\n\n_See other demos in [samples](samples) folder_\n\n## Inspirations\n\n- [floppy](https://github.com/lpagg/floppy): a micro game engine for beginners.\n- [PICO-8](https://www.lexaloffle.com/pico-8.php): fantasy console for making, sharing and playing tiny games.\n- [js13kGames](https://js13kgames.com/): a JavaScript coding competition with size limit set to 13 kilobytes.\n- [raylib](https://www.raylib.com/): a simple and easy-to-use gamedev library.\n- [p5.js/Processing](https://p5js.org/): a library for creative coding.\n- [Pygame Zero](https://github.com/lordmauve/pgzero): A zero-boilerplate games programming framework for Python 3.\n","funding_links":[],"categories":["JavaScript","Resources"],"sub_categories":["Official Resources"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitecanvas%2Fgame-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flitecanvas%2Fgame-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitecanvas%2Fgame-engine/lists"}