Since this is a top-down dungeon crawler, we need a grid-based map. It doesn’t require scrolling or any extent larger than the current screen (for now).
The tiles and walls will be the same size, something like 64x64.
To comply with the theme of this compo, we will implement the 10 seconds behavior like so:
- The target item position will be changed to a new random location, somewhere that is passable on the map (or a specifically marked item location). The position also must be some distance away from the player’s current position so that it isn’t inordinately easy to win.
- Every time an item is picked up an enemy appears in the map
- Once you pick up a certain set of items an exit appears
- Set of items is different on each level
# To debug, run M-x gud-gdb with this command:
guix shell --pure -m manifest.scm -- gdb --args bin/dev/erratic-cavern
- State “DONE” from “TODO” [2022-10-02 Sun 09:30]
- [X] Keep a list of all valid item locations
- [X] Pick a new position for each item (ideally unique position for each item)
- [X] Make sure we don’t pick the player position
- [X] Show a timer gauge at the bottom of the screen
- State “DONE” from “TODO” [2022-10-02 Sun 09:42]
- State “DONE” from “TODO” [2022-10-02 Sun 14:35]
- State “DONE” from “TODO” [2022-10-02 Sun 15:35]
- If you grab the goal item, you win!
- If an enemy or trap touches you, you lose!
- If the time runs out, you lose!
- State “DONE” from “TODO” [2022-10-02 Sun 16:58]
(defun setup-erratic-world-highlighting ()
(setq font-lock-defaults '(nil))
(font-lock-add-keywords 'text-mode
'(("1" . font-lock-warning-face)
("2" . font-lock-type-face)
("3" . font-lock-function-name-face)
("4" . font-lock-keyword-face)
("5" . font-lock-preprocessor-face))))
(add-hook 'text-mode-hook #'setup-erratic-world-highlighting)