map: implement seeded generation; allow passing custom seed #17

Merged
NotAShelf merged 3 commits from notashelf/push-svxosluqnsnp into main 2026-04-10 11:15:45 +00:00
Owner

Adds support for seeded runs, allowing players to replay the exact same dungeon layout by specifying a seed via --seed. The addition of the --seed flag also means I had to implement basic CLI parsing but I think it's simple and suitable for now. When a seed is not provided, we "fall back" t time(NULL) to achieve random seeding. This is backed by GameState's run_seed. Based on the seed, the floor generation is entirely deterministic.

Signed-off-by: NotAShelf raf@notashelf.dev
Change-Id: I742b7e59c7ca872539d4ebfe3a03b44f6a6a6964

Adds support for seeded runs, allowing players to replay the exact same dungeon layout by specifying a seed via `--seed`. The addition of the `--seed` flag also means I had to implement basic CLI parsing but I think it's simple and suitable for now. When a seed is not provided, we "fall back" t `time(NULL)` to achieve random seeding. This is backed by `GameState`'s `run_seed`. Based on the seed, the floor generation is entirely deterministic. Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I742b7e59c7ca872539d4ebfe3a03b44f6a6a6964
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I742b7e59c7ca872539d4ebfe3a03b44f6a6a6964
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I0178392036902a87b64fde63f5a5f56a6a6a6964
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I349ed28a792d4de685f8468eddd33a136a6a6964
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
NotAShelf/rogged!17
No description provided.