{"id":36604986,"url":"https://github.com/geniot/digger","last_synced_at":"2026-01-12T08:44:05.481Z","repository":{"id":64206355,"uuid":"573840684","full_name":"geniot/digger","owner":"geniot","description":"Classic Digger revisited in Go","archived":false,"fork":false,"pushed_at":"2023-11-16T21:26:13.000Z","size":20564,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-21T09:51:48.899Z","etag":null,"topics":["desktop-application","digger","game","golang","pocketgo","retrogaming","sdl2"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geniot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-12-03T15:49:26.000Z","updated_at":"2024-06-06T08:03:09.000Z","dependencies_parsed_at":"2024-06-21T08:44:38.218Z","dependency_job_id":"d1ba4533-383f-47f5-a513-542a177e93a6","html_url":"https://github.com/geniot/digger","commit_stats":{"total_commits":155,"total_committers":2,"mean_commits":77.5,"dds":0.006451612903225823,"last_synced_commit":"e1e111dccd88665050ebe52a48454f216ec581e2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/geniot/digger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geniot%2Fdigger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geniot%2Fdigger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geniot%2Fdigger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geniot%2Fdigger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geniot","download_url":"https://codeload.github.com/geniot/digger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geniot%2Fdigger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28337599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["desktop-application","digger","game","golang","pocketgo","retrogaming","sdl2"],"created_at":"2026-01-12T08:44:04.665Z","updated_at":"2026-01-12T08:44:05.475Z","avatar_url":"https://github.com/geniot.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n\n[Digger](https://en.wikipedia.org/wiki/Digger_(video_game)) was released back in 1983.\nI was two years old and only learned about this game when I was eight.\nWe didn't have a computer at home but my father had it at work.\nSo it was the first computer game that I learned to play.\n\nIt was a black-and-white IBM 8080 and I didn't know digger could shoot,\nso I was just driving away each time trying to collect all the emeralds,\nfinding the optimal escape route.\n\n40 years later (it's 2023 now) the game is still a lot of fun.\nIt actually inspired me to create this clone.\n\n![Digger](screenshots/main.png)\n\nThis clone is a complete rewrite,\nalthough I used the original graphics and sounds.\n\nFrom the player's perspective the main difference with the original game is that this Digger has pixel-perfect\nprecision:\n\n- all animations are smooth (except sprites - which I borrowed from the original 1983 Windmill game)\n- all object collisions are pixel-based and calculated within a [Resolv](github.com/solarlune/resolv) Space\n- collision with the field is based on [SDL_GetRGBA](https://wiki.libsdl.org/SDL2/SDL_GetRGBA)\n\nThere are also some minor functional differences:\n\n- gold can stack on top of each other\n- gold doesn't disappear within one session (while digger is alive)\n\nI thought it makes more sense, at least for me.\n\n# Controls\n\nI mostly play it on my handheld consoles, so mouse is not used in the desktop versions.\n\nOnly keys:\n\n| Desktop    | PocketGo2v2 | Function            |\n|------------|-------------|---------------------|\n| Left Ctrl  | A           | fire                |\n| Arrow Keys | ←,↑,→,↓     | drive digger around |  \n| q          | L1+Start    | quit                |  \n\n# Motivation\n\nApart from the nostalgia that I'm having from time to time I started this project to learn [Go](https://go.dev/)\n, [SDL2](https://www.libsdl.org/), some nuances of embedded\nprogramming and game development.\n\n# Building\n\nYou need go-sdl2 bindings: https://github.com/veandco/go-sdl2\n\nYou can find detailed instructions in the [README.md](https://github.com/veandco/go-sdl2/blob/master/README.md) of\ngo-sdl2.\n\nIn general on Windows you would need to install Go and MinGW.\nDownload SDL2 packages with DLLs and header files.\nPut DLLs and header files in MinGW folders.\n\nOn Linux you would need to install sdl2-dev packages.\n\nOn Windows to build the exe file with static linking I use:\n\n`go build -ldflags \"-s -w -H=windowsgui\" -tags static -o bin\\digger.exe github.com/geniot/digger/src/cmd/digger`\n\nI use [GoLand](https://www.jetbrains.com/go/) for development.\n\nTo build the OPK file for my [PocketGo2](https://wagnerstechtalk.com/pg2/) I use make:\n\n`make opk`\n\nSee the Makefile. It can only be done on Linux.\n\n# Testing\n\nI only tested the game manually in the following environments:\n\n- Windows 10 (desktop)\n- LXLE Linux (desktop)\n- arm64 (embedded Linux on my handheld console RK2020)\n- mipsel (embedded Linux on my handheld console PocketGo2)\n\n# Links\n\n1. OpenDingux Software list: https://github.com/retrogamehandheld/OpenDingux\n2. Go SDL2 bindings: https://github.com/veandco/go-sdl2\n3. PocketGo Firmware that I use: https://github.com/Ninoh-FOX/POCKETGO2_ROGUE_CFW\n4. Toolchain for it: https://github.com/Ninoh-FOX/toolchain\n5. Digger.org: https://www.digger.org/\n6. Wikipedia article: https://en.wikipedia.org/wiki/Digger_(video_game)\n\n# CPU Profiling\n\nAt one point I saw a significant frame rate drop on my PocketGo which uses software rendering.\nSo I used the below instructions to find the bottlenecks. I decided to leave them here for the record.\n\n1. Add `defer profile.Start(profile.CPUProfile).Stop()` as the first line in main\n2. Add import for it: `import \"github.com/pkg/profile\"`\n3. Run and close the app, `cpu.pprof` will be created in the temporary directory\n4. Install `go install github.com/google/pprof@latest` if it is not yet installed\n5. Run on the command line: `pprof -top bin/digger_debug.exe \u003cabsolute_path_to\u003e/cpu.pprof`\n6. You will see a report with method calls that cause most CPU consumption\n\n# TODO\n\n1. Add bags to the chase world as the optimal path is not optimal when bags are not considered\n\n# Game Tweaks\n\n- Speed: digger, monsters\n- Number of monsters: \n   - on the field\n   - total on level\n   - to be killed before cherry\n   - after cherry\n   - chasers vs. patrollers (move algo)\n   - nobbins vs. hobbins\n- Time it takes to:\n   - nobbin becomes hobbin and back\n\n# Game State\n\n1. Lives\n2. Score\n3. Level\n4. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeniot%2Fdigger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeniot%2Fdigger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeniot%2Fdigger/lists"}