{"id":31595331,"url":"https://github.com/escherize/elemental","last_synced_at":"2025-10-06T03:59:39.387Z","repository":{"id":52028665,"uuid":"223252754","full_name":"escherize/elemental","owner":"escherize","description":"The bare basics needed for smooth reagent based video game development.","archived":false,"fork":false,"pushed_at":"2023-01-26T15:44:11.000Z","size":27129,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-07-31T23:56:13.170Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/escherize.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-21T19:49:31.000Z","updated_at":"2023-07-25T14:30:47.000Z","dependencies_parsed_at":"2023-02-14T19:01:33.181Z","dependency_job_id":null,"html_url":"https://github.com/escherize/elemental","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/escherize/elemental","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escherize%2Felemental","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escherize%2Felemental/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escherize%2Felemental/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escherize%2Felemental/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/escherize","download_url":"https://codeload.github.com/escherize/elemental/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escherize%2Felemental/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278556179,"owners_count":26006081,"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-06T02:00:05.630Z","response_time":65,"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":[],"created_at":"2025-10-06T03:59:14.693Z","updated_at":"2025-10-06T03:59:39.374Z","avatar_url":"https://github.com/escherize.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elemental\n\nThe simple ClojureScript game setup\n\n## Rationale\n\nI setup an experimental snake game at https://escherize.com/#/post/2 and had a few nicepeople ask me how I set it up, so I am going ahead and documenting the process here.\n\n## Installing\n\n``` shell\ngit clone https://github.com/escherize/elemental.git\ncd elemental\nnpm install react react-dom react-create-class\n```\n\n## Development\n\n``` shell\nshadow-cljs watch :app\n```\n\nOpen http://localhost:8700 and once its done compiling you should see you game. It will update as you update the code!\n\n### Emacs\nIf you use cider, you can jack-in and you will be greeted with the shadow.user namespace.\n\n``` clojure\nshadow.user\u003e (shadow/watch :app)\n[:app] Configuring build.\n[:app] Compiling ...\n[:app] Build completed. (185 files, 1 compiled, 0 warnings, 5.62s)\n:watching\nshadow.user\u003e (shadow/repl :app)\nTo quit, type: :cljs/quit\n[:selected :app]\ncljs.user\u003e\n```\n\nAt this point you are connected to the clojurescript process in the browser.\n\nSo you can do interesting things like:\n``` clojure\n(js/alert \"hi\")\n```\n\n## Archetecture discussion\n\nThe basic idea of the setup is:\n\n- App DB - (a map with the entire application state)\n- draw-state - simple component that watches the App DB and reactively displays the game\n- game loop - runs at fps times per second\n - update-state - simple function called in the game loop to update the App DB\n\n\n## Release\n\n``` shell\nshadow-cljs release :app\n```\n\nyou can host or publish the /public directory\n\n## License\n\nCopyright © 2019 Bryan Maass\n\nDistributed under the Eclipse Public License either version 1.0 or (at\nyour option) any later version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fescherize%2Felemental","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fescherize%2Felemental","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fescherize%2Felemental/lists"}