{"id":23499931,"url":"https://github.com/deadprogram/tinyrogue","last_synced_at":"2025-10-31T08:31:42.111Z","repository":{"id":269472621,"uuid":"907423492","full_name":"deadprogram/tinyrogue","owner":"deadprogram","description":"Fun package for creating roguelike games with TinyGo on Firefly Zero using WASM","archived":false,"fork":false,"pushed_at":"2024-12-30T21:50:24.000Z","size":127,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-31T07:47:57.425Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://fireflyzero.com/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deadprogram.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":"2024-12-23T14:48:30.000Z","updated_at":"2024-12-31T00:09:05.000Z","dependencies_parsed_at":"2024-12-23T20:28:26.070Z","dependency_job_id":"bf2be057-ee8b-4dfc-837b-2f6aeefe5ad8","html_url":"https://github.com/deadprogram/tinyrogue","commit_stats":null,"previous_names":["deadprogram/tinyrogue"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadprogram%2Ftinyrogue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadprogram%2Ftinyrogue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadprogram%2Ftinyrogue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadprogram%2Ftinyrogue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deadprogram","download_url":"https://codeload.github.com/deadprogram/tinyrogue/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239154766,"owners_count":19590766,"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-12-25T06:33:12.568Z","updated_at":"2025-10-31T08:31:36.801Z","avatar_url":"https://github.com/deadprogram.png","language":"Go","funding_links":[],"categories":["Gaming"],"sub_categories":["Instrumentation and control with sensors and actuators"],"readme":"# TinyRogue\n\n\u003cimg src=\"./images/hello.png\" alt=\"hello example screenshot\" width=\"480\"/\u003e\n\nFun package for creating [roguelike games](https://en.wikipedia.org/wiki/Roguelike) using [TinyGo](https://tinygo.org/) on [Firefly Zero](https://fireflyzero.com/).\n\n## Features\n\n### Complete\n\n\u003cimg src=\"./images/walk.png\" alt=\"walk example screenshot\" width=\"480\"/\u003e\n\n- Customizable images with cache for tiles such as walls and floors\n- Generative maps\n\n\u003cimg src=\"./images/ghost.png\" alt=\"ghost castle screenshot\" width=\"480\"/\u003e\n\n- Field of View for torch-like illumination\n\n- Creature behavior is configurable\n- Creatures approach Player using shortest path astar algorithm\n\n\u003cimg src=\"./images/ghost-combat.png\" alt=\"ghost castle combat screenshot\" width=\"480\"/\u003e\n\n- Configurable action system for combat, spells, etc.\n- Popup dialogs for messages e.g. \"A wild gopher has appeared!\"\n- Creature spawning\n- Automatic terrain image variation for walls and floors\n- Multiple dungeons each with multiple levels.\n- Portals aka level entrances/exits\n\n### TODO\n\n- Game items\n- Predefined maps/levels\n- World map\n- Show/hide entrances/exits\n- PortalTypes per dungeon\n- ?\n\n## Examples\n\nHere is a simple \"Hello, Gopher\" example that shows a little bit of what you can do:\n\n```go\npackage main\n\nimport (\n\t\"github.com/deadprogram/tinyrogue\"\n\t\"github.com/firefly-zero/firefly-go/firefly\"\n)\n\nfunc init() {\n\tfirefly.Boot = boot\n\tfirefly.Update = update\n\tfirefly.Render = render\n}\n\nvar game *tinyrogue.Game\n\nfunc boot() {\n\t// create a new game\n\tgame = tinyrogue.NewGame()\n\n\t// load the image tiles for the floor and walls\n\tgame.LoadImage(\"floor\")\n\tgame.LoadImage(\"wall\")\n\n\t// set the dimensions for the game and the tiles\n\tgd := tinyrogue.NewGameData(16, 10, 16, 16)\n\tgame.SetData(gd)\n\n\t// generate a random game map\n\tgame.SetMap(tinyrogue.NewSingleLevelGameMap())\n\n\t// create the player\n\tplayer := tinyrogue.NewPlayer(\"Player\", \"player\", game.LoadImage(\"player\"), 5)\n\tgame.SetPlayer(player)\n\n\t// set player initial position to some open spot on the map.\n\tplayer.MoveTo(game.CurrentLevel().OpenLocation())\n}\n\nfunc update() {\n\tgame.Update()\n}\n\nfunc render() {\n\tgame.Render()\n}\n```\nThe code for this is located at [Hello, Gopher](./examples/hello/)\n\n### More examples\n\n- For slightly more complex behavior, see the \"Gopher Walk\" game located here: [Gopher Walk](./examples/walk/)\n\n- An example that has multiple Levels: [Gopher Multiwalk](./examples/multiwalk/)\n\n- Example that has multiple Dungeons/Levels: [Gopher Multidungeon](./examples/multidungeon/)\n\n### Complete Games\n\nA complete game is \"Ghost Castle\" located in this repo: https://github.com/deadprogram/ghost-castle\n\n\"Ghost Castle\" is in the Firefly Zero catalog here: https://catalog.fireflyzero.com/deadprogram.ghost-castle\n\n## Architecture diagram\n\nThis diagram shows the relationship between the different types that make up a TinyRogue game.\n\n```mermaid\nflowchart TD\n    subgraph game\n    Game\n    Game --\u003e GM\n    Game --\u003e Player\n    Game --\u003e Creatures\n    subgraph world\n    GM[GameMap] --\u003e Dungeons\n    Dungeons --\u003e dungeon\n    subgraph dungeon\n    Dungeon --\u003e Levels\n    Levels --\u003e levels\n    subgraph levels\n    Level --\u003e Tiles\n    Tiles --\u003e tiles\n    Level --\u003e Rooms\n    Rooms --\u003e rooms\n    subgraph tiles\n    MapTile1\n    MapTile2\n    MapTileN\n    end\n    subgraph rooms\n    Room1\n    Room2\n    RoomN\n    end\n    end\n    end\n    end\n    subgraph characters\n    Player\n    Creatures --\u003e Creature1\n    Creatures --\u003e Creature2\n    Creatures --\u003e CreatureN\n    subgraph creatures\n    Creature1\n    Creature2\n    CreatureN\n    end\n    end\n    end\n```\n\n### Game\n\n`Game` is what you are making that the user can play.\n\n### Player\n\nThe `Player` represents the person playing the `Game`.\n\n### Creatures\n\n`Creatures` are the non-player characters. Could be monsters, allies, or ?\n\n### GameMap\n\n`GameMap` is what contains the important information about the world in which the game is played.\n\n### Dungeon\n\nA `Dungeon` is a collection of `Levels` that the `Player` will explore.\n\n### Level\n\nA `Level` in an individual level which contains a collection of `MapTiles` and a collection of `Rooms`.\n\n### MapTile\n\n`MapTile` is an individual tile on a grid which represents the positions of the walls, floor, player, and the creatures.\n\n### Room\n\nA `Room` is a rectangular area of a `Level` which is open to the `Player` or `Creatures` to move around in.\n\n## Useful tools\n\nHere is a short list of some useful tools:\n\n### Convert existing images to Sweetie 16 pallette\nhttps://tezumie.github.io/Image-to-Pixel/\n\n## Credits\n\nBased on code originally from the following sources, but with many modifications:\n\nhttps://github.com/cscazorla/roguelike\n\nhttps://github.com/gogue-framework/gogue\n\nThank you!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeadprogram%2Ftinyrogue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeadprogram%2Ftinyrogue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeadprogram%2Ftinyrogue/lists"}