{"id":17349793,"url":"https://github.com/stasm/homm1k","last_synced_at":"2025-07-04T06:06:29.913Z","repository":{"id":138205614,"uuid":"174505589","full_name":"stasm/homm1k","owner":"stasm","description":"A homage to Heroes of Might and Magic for JS1K 2019","archived":false,"fork":false,"pushed_at":"2019-04-25T15:23:29.000Z","size":95,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T21:12:44.700Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://js1k.com/2019-x/demo/4210","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/stasm.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,"zenodo":null}},"created_at":"2019-03-08T09:13:48.000Z","updated_at":"2023-06-05T07:49:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"94f6cbac-7163-43a7-82bc-fc6a38be7f4e","html_url":"https://github.com/stasm/homm1k","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stasm/homm1k","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stasm%2Fhomm1k","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stasm%2Fhomm1k/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stasm%2Fhomm1k/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stasm%2Fhomm1k/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stasm","download_url":"https://codeload.github.com/stasm/homm1k/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stasm%2Fhomm1k/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263457183,"owners_count":23469289,"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":[],"created_at":"2024-10-15T16:57:08.486Z","updated_at":"2025-07-04T06:06:29.905Z","avatar_url":"https://github.com/stasm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HoMM 1K\n\n_HoMM 1K_ is a homage to _Heroes of Might and Magic 3_ and a submission for\nJS1K 2019. Play it online at https://js1k.com/2019-x/demo/4210.\n\n![](screenshot.png)\n\n## Motivation\n\nThe theme of this year's JS1K is _X_, to celebrate its tenth anniversary. The\ntheme made me think of the iconic _X_ which marks the destination of heroes'\nmovement in _HoMM_.\n\n## Goal of the Game\n\nThe goal of the game is to capture the dragon roaming your realm. Your devout\nknight is at your service, his armor shining bright in the sun, ready to do\nyour bidding. Plan their moves carefully and try to corner the dragon so that\nit cannot flee this time.\n\n## Features\n\nThe game is written in JavaScript using the Canvas 2D API. It runs in modern\nFirefox and Chrome. The minified and compressed source code is under 1024\nbytes.\n\n  - 4px x 4px sprites are stored as numbers, with each pixel represented by\n    a factor of 8 which encodes one of the 7 colors of the palette or the\n    transparency.\n\n  - The details of the terrain are generated randomly with `Date.now()` used\n    as the seed.\n\n  - The playable world is larger than the viewport. Click the minimap to set\n    the visible fragment.\n\n  - Plan your knight's moves by clicking on the map once. The path-finding\n    algorithm will trace the path to the destination. Click a second time to\n    confirm the move.\n\n  - The dragon responds to your moves and tries to run away from your knight.\n    You can use this to your advantage: rather than head directly for the\n    dragon, try to force it to move into the woods or near the water, where\n    it's easier to capture it.\n\nOnce you capture the dragon, the win screen appears and the game ends. Reload\nthe page to play again.\n\n## Running locally\n\nRefer to `index.js` for the documented source code of the game. To play, open\n`index.html` in the browser. Set the `DEBUG` global in `index.js` to `true` to\nsee details of the path-finding algorithm and the dragon's AI.\n\nTo build the optimized version of the source code, install the dependencies\nwith `npm install` and run `make`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstasm%2Fhomm1k","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstasm%2Fhomm1k","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstasm%2Fhomm1k/lists"}