{"id":20333328,"url":"https://github.com/daneelsan/spacewasm","last_synced_at":"2025-09-23T02:32:10.406Z","repository":{"id":133848823,"uuid":"528684766","full_name":"daneelsan/spacewasm","owner":"daneelsan","description":"Original 1962 game code running on a PDP-1 emulator in Zig + Wasm + JS + HTML5 Canvas","archived":false,"fork":false,"pushed_at":"2025-03-09T03:47:05.000Z","size":125,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T08:41:25.296Z","etag":null,"topics":["html5-canvas","js","wasm","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","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/daneelsan.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-25T03:48:51.000Z","updated_at":"2025-03-09T03:47:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"59a03c3e-e056-4dc6-a49c-c9445b53ce1a","html_url":"https://github.com/daneelsan/spacewasm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/daneelsan/spacewasm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daneelsan%2Fspacewasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daneelsan%2Fspacewasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daneelsan%2Fspacewasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daneelsan%2Fspacewasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daneelsan","download_url":"https://codeload.github.com/daneelsan/spacewasm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daneelsan%2Fspacewasm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276503644,"owners_count":25653917,"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-09-23T02:00:09.130Z","response_time":73,"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":["html5-canvas","js","wasm","zig"],"created_at":"2024-11-14T20:30:47.174Z","updated_at":"2025-09-23T02:32:10.384Z","avatar_url":"https://github.com/daneelsan.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spacewasm\n\nOriginal 1962 game code running on a PDP-1 emulator in Zig + Wasm + JS + HTML5 Canvas\n\nSee it live at: https://daneelsan.github.io/spacewasm/\n\n![spacewasm](./spacewasm.gif)\n\n\"a\", \"d\", \"s\", \"w\" to control the first spaceship, the _\"Needle\"_.\n\n\"j\", \"l\", \"k\", \"i\" to control the second spaceship, the _\"Wedge\"_.\n\nThe controls are spin one way, spin the other, thrust, and fire.\n\nKeep away from the central star that pulls the ships with gravity.\n\nThe game ends when any of the ships explode into pixel dust.\n\n## Build\n\nTo build the .wasm file (and put it in the appropriate place), run:\n\n```shell\n$ zig build \u0026\u0026 cp zig-out/bin/space.wasm docs/space.wasm\n\n$ ls docs/*.wasm\ndocs/space.wasm\n```\n\n```shell\n$ zig version\n0.14.0-dev.1588+2111f4c38\n```\n\n## TODO\n\n[ ] Fix a bug that occurs when a ship crashes with the central star and launches it in an erratic pattern\n\n[ ] Implement a fully featured Type 30 CRT display (phosphor decay, intensity levels, etc.)\n\n[ ] Improve the \"game loop\" by using `requestAnimationFrame` instead of `setInterval`\n\n[ ] Abstract the IO devices away from the PDP1.zig file\n\n[ ] Abstract the platform away (the only target right now is Wasm + JS)\n\n## Resources\n\n-   https://spacewar.oversigma.com\n-   https://www.masswerk.at/spacewar/\n-   http://www.bitsavers.org/pdf/dec/pdp1/F15D_PDP1_Handbook_Oct63.pdf\n-   http://www.bitsavers.org/pdf/dec/pdp1/F25_PDP1_IO.pdf\n-   http://bitsavers.org/pdf/dec/_Books/Bell-ComputerEngineering.pdf\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaneelsan%2Fspacewasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaneelsan%2Fspacewasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaneelsan%2Fspacewasm/lists"}