{"id":13759039,"url":"https://github.com/oguzeroglu/Kompute","last_synced_at":"2025-05-10T09:31:34.774Z","repository":{"id":43679732,"uuid":"260700918","full_name":"oguzeroglu/Kompute","owner":"oguzeroglu","description":"A pluggable steering library for game AI.","archived":false,"fork":false,"pushed_at":"2023-01-06T04:49:38.000Z","size":573,"stargazers_count":28,"open_issues_count":6,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-13T15:00:50.253Z","etag":null,"topics":["ai","game-ai","game-development","game-engine","threejs","webgame","webgl"],"latest_commit_sha":null,"homepage":"","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/oguzeroglu.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}},"created_at":"2020-05-02T14:10:57.000Z","updated_at":"2024-06-08T13:36:46.000Z","dependencies_parsed_at":"2023-02-05T08:45:45.360Z","dependency_job_id":null,"html_url":"https://github.com/oguzeroglu/Kompute","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oguzeroglu%2FKompute","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oguzeroglu%2FKompute/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oguzeroglu%2FKompute/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oguzeroglu%2FKompute/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oguzeroglu","download_url":"https://codeload.github.com/oguzeroglu/Kompute/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224791376,"owners_count":17370721,"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":["ai","game-ai","game-development","game-engine","threejs","webgame","webgl"],"created_at":"2024-08-03T13:00:44.303Z","updated_at":"2024-11-16T16:30:26.468Z","avatar_url":"https://github.com/oguzeroglu.png","language":"JavaScript","readme":"# Kompute\n`Kompute` is a lightweight and efficient [steering](https://www.red3d.com/cwr/steer/gdc99/) library for AI movement. It's not a visual library and generates numbers (velocity \u0026 position data), that's why it may easily be plugged into any codebase.\n\n`Kompute` is originally designed to be used by the [ROYGBIV engine](https://github.com/oguzeroglu/ROYGBIV), however may be easily used in any other project as well.\n\nSee the [documentation](https://github.com/oguzeroglu/Kompute/wiki).\n\n# Demos\n\n* [Autonomous Battle](https://oguzeroglu.github.io/kompute-demos-with-roygbiv/autonomousBattle/application.html)    \n* [Hide Behavior](https://oguzeroglu.github.io/kompute-demos-with-roygbiv/hideBehavior/application.html)    \n* [Arrive Behavior](https://oguzeroglu.github.io/kompute-demos-with-roygbiv/arriveBehavior/application.html)        \n\n# Getting Started\n\nInclude it in your project.\n\nFor browser:\n```html\n\u003cscript src=\"PATH_TO_kompute.min.js\"\u003e\u003c/script\u003e\n```\n\nFor `NodeJS`:\n```javascript\nvar Kompute = require(\"kompute\");\n```\n\nCreate a [World](https://github.com/oguzeroglu/Kompute/wiki/World):\n```javascript\nvar worldWidth = 1000;\nvar worldHeight = 1000;\nvar worldDepth = 1000;\nvar binSize = 50;\n\nvar world = new Kompute.World(worldWidth, worldHeight, worldDepth, binSize);\n```\n\nCreate a [Steerable](https://github.com/oguzeroglu/Kompute/wiki/Steerable):\n```javascript\nvar steerableID = \"steerable1\";\nvar steerableCenterPosition = new Kompute.Vector3D(0, 50, 0);\nvar steerableSize = new Kompute.Vector3D(25, 25, 25);\n\nvar steerable = new Kompute.Steerable(steerableID, steerableCenterPosition, steerableSize);\n```\n\nInsert the steerable into the world:\n```javascript\nworld.insertEntity(steerable);\n```\n\nCreate a new [Steering Behavior](https://github.com/oguzeroglu/Kompute/wiki/Steering-Behaviors):\n```javascript\n// this could be any type of Steering behavior\nvar behavior = new Kompute.SteeringBehavior();\n```\n\nSet the behavior:\n```javascript\nsteerable.setBehavior(behavior);\n```\n\nUpdate the steerable (ideally 60 times per second):\n```javascript\nfunction update() {\n  steerable.update();\n\n  // steerable.position -\u003e the updated position of the steerable\n  // steerable.velocity -\u003e the updated velocity of the steerable\n  // You may visualise the steerable with any rendering library\n  // You may use the velocity with a physics engine\n\n  requestAnimationFrame(update);\n}\n\nupdate();\n```\n\n# License\nKompute uses MIT license.\n","funding_links":[],"categories":["Pathfinding"],"sub_categories":["Svelte"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foguzeroglu%2FKompute","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foguzeroglu%2FKompute","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foguzeroglu%2FKompute/lists"}