{"id":15100089,"url":"https://github.com/js13kgames/tiny-stealth","last_synced_at":"2025-10-08T06:30:34.445Z","repository":{"id":82386511,"uuid":"42742245","full_name":"js13kGames/tiny-stealth","owner":"js13kGames","description":"Tiny Stealth - a js13kGames 2015 competition entry by @EduardoLopes.","archived":false,"fork":true,"pushed_at":"2015-09-13T16:18:36.000Z","size":215,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-01T07:20:59.868Z","etag":null,"topics":["2015","competition","desktop","game","html5","javascript","js13k","js13kgames","js13kgames2015","mobile","optimization","reversed","touch"],"latest_commit_sha":null,"homepage":"https://js13kgames.com/entries/tiny-stealth","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"EduardoLopes/js13kgames-2015","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/js13kGames.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":"2015-09-18T19:11:35.000Z","updated_at":"2022-10-13T02:07:51.000Z","dependencies_parsed_at":"2023-03-06T01:45:27.986Z","dependency_job_id":null,"html_url":"https://github.com/js13kGames/tiny-stealth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/js13kGames%2Ftiny-stealth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/js13kGames%2Ftiny-stealth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/js13kGames%2Ftiny-stealth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/js13kGames%2Ftiny-stealth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/js13kGames","download_url":"https://codeload.github.com/js13kGames/tiny-stealth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235688642,"owners_count":19029910,"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":["2015","competition","desktop","game","html5","javascript","js13k","js13kgames","js13kgames2015","mobile","optimization","reversed","touch"],"created_at":"2024-09-25T17:44:42.062Z","updated_at":"2025-10-08T06:30:29.060Z","avatar_url":"https://github.com/js13kGames.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#[Tiny Stealth](http://js13kgames.com/entries/tiny-stealth)#\n\nThis is my [js13kgames](http://js13kgames.com/) 2015 entry!\n\n\n##Technical stuff##\n\n\n### Render ###\n\nAll the tilemaps are rendered to a canvas and saved as png, it's necessary only one draw call to draw the entire tile map, each tilemap have 360 tiles. The tilemap is only rendered if is on screen, no more than 2 tilemaps are drawn each frame.\n\n\nEach tilemap have a reference to 3 enemies, and these enemies are rendered when its tilemap is drawn, no more than 6 enemies are drawn (and updated) each frame.\n\nPlayer is drawn all the time. Bullets are drawn only when the player or enemies shoot them!\n\n### Collision ###\n\nI'm using [sat-js](https://github.com/jriecken/sat-js) to do collisions detection and collisions response. It's not all the big (i removed some unecessary stuff too) and works pretty well. I though it would be a problem for the garbage collecto, but i magened to use one single object to check the tilemap collisions against all the others objects.\n\nEach collidible object have a `shape` property with a instance of `SAT.box`. Even the objects that are drawn as circles.\n\nThe collision is checked only against the tilemap that the object is. `Player` checks collisions against the tilemap that it is at the moment and it's enemies (and enemy bullets). Each enemy bullet and player bullet check collision agains the tilemap. Bullets and player collisions against the tilemap are checked first board phase, then if the tile is solid, narrow phase.\n\n### Pathfinder ###\n\nI'm using [PathFinding.js](https://github.com/qiao/PathFinding.js), i removed what i don't need and made some byte saving optimizations. This could be a problem for the garbage collector, so i made a system so the pathfinder map grid is changed in real time as the player progress. It's a single grid with 720 tiles that is updated when necessary. This was a bit of a challenge and i'm really happy it works great!\n\n### Maps and level generation ###\n\nThe maps are pre made using the [tiled editor](www.mapeditor.org) and placed in the right place as the player progress.\n\n### Didn't have time to add ###\n\n- The engine code should be separated for the game code, when the dead line was close, i messed up eveything.\n- Enemies move and have AI\n- Dificulty progressing\n- Pocedurally generated maps\n- Scale system to fit the screen\n- Different enemy types\n\n## Tools ##\n\n- [Babel (ES6)](http://babeljs.io)\n- [Tiled Editor](http://www.mapeditor.org)\n- [Gulp](http://gulpjs.com)\n\n## Screenshots ##\n\n![Imgur](http://i.imgur.com/nRcqFjp.png) \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjs13kgames%2Ftiny-stealth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjs13kgames%2Ftiny-stealth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjs13kgames%2Ftiny-stealth/lists"}