{"id":48591846,"url":"https://github.com/nsmryan/rrl","last_synced_at":"2026-04-08T20:02:19.769Z","repository":{"id":60072915,"uuid":"502700883","full_name":"nsmryan/rrl","owner":"nsmryan","description":"Rust Roguelike","archived":false,"fork":false,"pushed_at":"2023-09-03T20:06:10.000Z","size":1899,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-09-03T21:20:01.978Z","etag":null,"topics":["roguelike","rust","sdl2","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","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/nsmryan.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":"2022-06-12T18:48:27.000Z","updated_at":"2023-07-08T04:29:10.000Z","dependencies_parsed_at":"2023-02-15T17:45:49.124Z","dependency_job_id":null,"html_url":"https://github.com/nsmryan/rrl","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/nsmryan/rrl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsmryan%2Frrl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsmryan%2Frrl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsmryan%2Frrl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsmryan%2Frrl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nsmryan","download_url":"https://codeload.github.com/nsmryan/rrl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsmryan%2Frrl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31571601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"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":["roguelike","rust","sdl2","zig"],"created_at":"2026-04-08T20:02:18.635Z","updated_at":"2026-04-08T20:02:19.737Z","avatar_url":"https://github.com/nsmryan.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"== Rust Roguelike, Zig Version ==\n\nThis repository contains an incomplete re-write of the [Rust Roguelike](https://github.com/nsmryan/RustRoguelike) project in Zig.\n\nThis is an attempt to rebuild the entire game logic and visuals.\n\n\n== Some Zig/Rust Notes ==\n\nIterator is much simpler and smaller. There is weirdness to it, like the whole generics-are-functions thing,\nbut its not nearly as baroque as Rust as it does not use lifetime parameters.\n\n\nMy Zig ended up being more lines for Comp because of all the unit tests. Without them it was a little smaller.\n\n\nOne concern in Haskell and Rust is always using the correct derives, especially with Rust's\norphan rule.\n\nIn Zig so far this is mostly about comptime- std.meta.eql gives equality for basic types at least,\nand formatting appears to be able to print these types as well.\n\nHow this will work for TCL style printing and parsing I do not yet know. Also, if you want to\nimplement equality specially for a type, you simply implement your own function (perhaps there\nis a standard way to do this or an interface for it?) and user's have to know to use this instead\nof comptime eql. However, this is in line with the Zig no-hidden-control-flow concept.\n\n\nZig does not restrict floats the same. It also provides clamp, which I did in Rust.\nAlso I believe I will be able to use Zig's random numebr generation, which I couldn't in Rust\ndue to orphan rule serde support.\n\nZig ability to get enum/union tags and to use an enum for union tags is much better then my experience\nwith Rust.\n\nI do have memory use issues in Zig which I would not have in Rust. Mostly found by simple tests.\nThe main problems are pointers to memory that it realloced like ArrayList.\n\nZig standard library has a fixed array datastructure, which Rust does not have. Rust in general\nled me to allocate a lot with a global allocator, while in Zig allocation is much more controlled.\n\nThe Rust version seems to create a number of threads which I did not spawn myself, which does not make\nme feel like I control my codebase. The Zig does not do this.\n\nZig would allow a very controlled Map and Tile type - currently maps are a simple array, unlike Rust where\nI have a vector of vectors, but that is not completely Rusts fault.\nHowever, with packed structs a tile could be a u16, making the map quite manageable. This is not done\nbecause of zigtcl not supporting bit offset pointers, and this data is not reflected in TypeInfo anyway\nat the moment.\n\n\n=== Next Steps ===\n\nAI\n\nLevel generation\n\nSkills and talents\n\nGame as a sequence of levels\n\nMaybe extras - system level testing, do/undo/redo, console, tcl interface.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsmryan%2Frrl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnsmryan%2Frrl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsmryan%2Frrl/lists"}