{"id":17269933,"url":"https://github.com/viglino/ol-games","last_synced_at":"2025-10-04T05:34:47.395Z","repository":{"id":57314057,"uuid":"85395090","full_name":"Viglino/ol-games","owner":"Viglino","description":":video_game: Game stuff for Openlayers, powered by HTML5, canvas, javascript and Openlayers.","archived":false,"fork":false,"pushed_at":"2025-01-15T15:39:56.000Z","size":2999,"stargazers_count":92,"open_issues_count":7,"forks_count":20,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-28T20:09:13.235Z","etag":null,"topics":["animation","explosion","game","hex-map","javascript","maps","ol-ext","openlayers","sprites"],"latest_commit_sha":null,"homepage":"https://viglino.github.io/ol-games","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Viglino.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2017-03-18T11:05:30.000Z","updated_at":"2025-03-04T06:30:11.000Z","dependencies_parsed_at":"2025-02-28T13:14:35.625Z","dependency_job_id":"42dd077c-0a76-4323-9393-3c598f747e6e","html_url":"https://github.com/Viglino/ol-games","commit_stats":{"total_commits":118,"total_committers":1,"mean_commits":118.0,"dds":0.0,"last_synced_commit":"e5cbd4297f8d4676a84a2c2dbfe8900421d8ed77"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Viglino%2Fol-games","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Viglino%2Fol-games/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Viglino%2Fol-games/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Viglino%2Fol-games/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Viglino","download_url":"https://codeload.github.com/Viglino/ol-games/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249525,"owners_count":20908212,"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":["animation","explosion","game","hex-map","javascript","maps","ol-ext","openlayers","sprites"],"created_at":"2024-10-15T08:18:02.848Z","updated_at":"2025-10-04T05:34:42.374Z","avatar_url":"https://github.com/Viglino.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"https://raw.githubusercontent.com/Viglino/ol-games/master/img/ol3-games.png\" height=\"64px\" align=\"left\" /\u003e ol-games\n\nOne hand, many games use maps as playground and some are based on a map. On the other hand, [OpenLayers](https://github.com/openlayers/openlayers) is a high-performance, feature-packed library for creating interactive maps on the web.\n\nThis project aims to test and add game mechanisms within Openlayers (ol).\n\u003e It is by no means a complete game or complete game engine but you should find some stuff to devleopp game on a map with Openlayers.\n\n[View live examples online!](https://viglino.github.io/ol-games/index.html)\n\n## Dependencies\nThis project uses [Openlayers](https://github.com/openlayers/openlayers) and [ol-ext](https://github.com/Viglino/ol-ext).\nHexagnol grid concepts developped in the [Red Blob Games](http://www.redblobgames.com/grids/hexagons/).\n\nMaterials mainly comes from the [FreeSound project](https://www.freesound.org/) and [OpenGameArt](http://opengameart.org/).\n\n\n## Openlayers\n\n[OpenLayers](https://openlayers.org/) makes it easy to put a dynamic map in any web page. \n* It can display map tiles, vector data and markers loaded from any source. \n* Leverages Canvas 2D, WebGL, and all the latest greatness from HTML5. Mobile support out of the box.\n* Implements animations mecanisms and the postcompose hook allows to intervene with the OpenLayers rendering process to draw onto the canvas context. A postcompose listener is called for every rendering frame and is the perfect place to implement animations.    \nJust look at the [Openlayers example page](https://openlayers.org/en/latest/examples/?q=anim) to see what's up.\n* Render objects over the map (vector features) with styling functionnalities.\n* Add interactions widgets to the map (controls, overlays) to interact with your maps.\n* Actually already uses a 2D spatial index [R-Tree](https://github.com/mourner/rbush) to perform spatial queries very efficiently.\n* Pixel-based hit-detection\n* Exposes an API for drawing geometries and features to the output canvas\n\n\n## ol-games\n\nHere are some of the features I'm working on in this repository.\n\n### Hex map\nA [hexagonal map or hex map](https://viglino.github.io/ol-games/examples/map.hexmap.html) is a game board design commonly used in wargames of all scales. \nThe map is subdivided into a hexagonal tiling, small regular hexagons of identical size.\n\nFor more information on Hexagnol grid, I recommend this [fabulous Red Blob Games article](http://www.redblobgames.com/grids/hexagons/).\n\n### Sprite\n[Sprite and Spritesheets](https://viglino.github.io/ol-games/examples/map.sprite.html) have been used in games for a long time. \n\nThis include sprite animation and sprite collision detection.\n\n### Animations\n#### Explosions\n[Explosions](https://viglino.github.io/ol-games/examples/map.explode.html) are an integral part of games. Not that all games need explosions, but they play an important \nrole in the game dynamics. \n\n### Artificial intelligence\n#### Pathfinding algorithms: A*\n\n### Audio\nThis is just a simple implementation of the HTML [Audio](https://www.w3schools.com/tags/ref_av_dom.asp) to add [sounds in a game](file:///C:/wamp64/www/geopole/exemples/ol-games/examples/map.audio.html).\n\n## Licence\n\nol-games is licenced under the French Opensource BSD compatible CeCILL-B FREE SOFTWARE LICENSE.  \n (c) 2017-2019 - Jean-Marc Viglino\n\nSome resources (mapping services and API) used in this sofware may have a specific license.  \nYou must check before use.\n\n\u003e [Full text license in English](http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt)  \n\u003e [Full text license in French](http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.txt)\n\nFor convenience ol-games is also published under the BSD-3-Clause Licence.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviglino%2Fol-games","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviglino%2Fol-games","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviglino%2Fol-games/lists"}