Reuseable bits (an eev ToC):
;; make a map
# «.§» (to "§")
;; take peek at a map
# «.â » (to "â ")
;; put map inside another map in a new map
# «.âĄÂ» (to "âĄ")
In the past, I have focused on producing some kind of technical demonstration when lispgamejams have rolled around. Contrarywise this autumnal lispgames lispgamejam, My intent is to sub-jam one cogent and rich game in the first day, and then idle the next ten days picking at additional technological niceties.
STILL WIP: Furthermore, I will toot code this entire gamejam as an exploration for branching and multifaceted fediverse programming game authorship. Tootcoding (codetooting? I forgot) is my mastodon tag for threads of evaluable mastodon toots.
Hopefully the fediversal mix-and-match programming game creation might allow people to spin off additional lispgamejam submissions of their own.
If you were following before, my NicCLIM lets me instantaneously make s-expression files interpreted as GUI maps of graphical or textual tiles, including macro and lisp defined game source. Let us make a couple forthwith. NicCLIM has functionality for macroing doors which will let us walk off the edge of one map, and onto the edge of an adjacent map (I think; well it is Turing complete several ways).
Of course I am using embeddable common lisp, McCLIM common lisp interface manager 2 spec implementation (via my own NicCLIM âmap editorâ, Eduardoâs eev, slime and emacs. I basically always do this. I am just copying from whatever article with NicCLIM is easy to eww to recently.
âą (setq inferior-lisp-program "ecl")
âą (setq eepitch-buffer-name "*slime-repl ECL*")
âą (slime)
(ql:Quickload :McCLIM)
(compile-file "~/Downloads/nicclim.lisp" :load t)
(in-package :nic)
oh, I see. I set up a ~/GAME/ directory and switch to it as well.
(string '~/game)
(ensure-directories-exist *)
(uiop:chdir (string '~/game/))
(uiop:chdir (string '~/game/)) ;; Twice, for some reason.
(rect-file 'tree.map 12 8 '(tree))
(enclose-map 'tree.map)

I chose the map-layout option from the layouts menu.
But I was reinvigorated by Kepeken on the Mastodon.
Remembering that NicCLIM is basically just this bog standard common lisp interface manager 2 table example https://www.lispworks.com/documentation/lwu41/climuser/GUID_281.HTM#HEADING281-0 and some spreadsheet-like behaviours.
However I am commited to using general purpose NicCLIM snippets I hope other people will then fork from this jam for other, better conceived jam submissions that in some sense I contributed to.
I guess I want these behaviours which are trivial to implement:
accepting-valuesI am particularly going to use the lisp REPLâs * ** *** / // /// to curry [] values into my expressions in order to reuse them. Well, that is the supposition.
I will say (to "§") meaning to run this apply line here. (This is an eev thing). In eev you would press M-e to follow these between each other.
Mastodon toot: https://gamerplus.org/@screwlisp/115476875141207449
;; 1. 'name-for-map (file) should be a symbol ; consider 'tree.map which will be `~/GAME/TREE.MAP`
;; 2. '(width height) of this map
;; 3. '(cell contents)
(apply 'rect-file *** (append ** (list *)))
'grass-clearing.map
'(12 8)
'(grass)
;; (to "§")
'grass-clearing.map
Letâs say (to ââ â)
Mastodon toot: https://gamerplus.org/@screwlisp/115476882368216801
(enclose-map *)

just while we are here.
'solid-rock.map
'(12 8)
'(solid rock)
;; (to "§")
We can see the default contents can have multiple items; there might be some graphical convention for SOLID such that it can be attached to rock to denote impassable rock, in contrast to simply an interesting rock sitting on the ground one could stand on.
'solid-rock.map
;; (to "â ")

'rock-cavern.map
'(12 8)
'(rock cavern)
;; (to "§")
Argh, for some reason the signature for clobber-rect is (outside-sym inside-sym new-sym y1 y2 x1 x2) please expect this to be changed in the future.
The evolution of clobber-rect so far has been that its first three arguements are (outside-file inside-file new-file) in symbols (so it is not clobberingâŠ) and its last four arguements are (y-start y-stop x-start x-stop) - and it always starts in the top left of the inside-sym file (symbol). There is a separate extract-rect function you would use to pull a subrectangle out of another map. This is just how it ended up working so far.
Letâs say (to ââĄâ)
Mastodon toot: https://gamerplus.org/@screwlisp/115476901608166443
(append ** *)
(apply 'clobber-rect *)
So for example
'(solid-rock.map rock-cavern.map mountain-cave.map)
'(1 3 2 4) ; argh y1 y2 x1 x2
(to "âĄ")
take a peek
'mountain-cave.map
;; (to "â ")

Actually, I think we should stop here to maintain the articleâs purity of essence.
So for making these zones; forest, grass, rock, a mountain with a cave
The game programming as such continuously and in one place was:
;; Make map:
'grass-clearing.map
'(12 8)
'(grass)
;; (to "§")
;;peek:
'grass-clearing.map
;; (to «â »)
'solid-rock.map
'(12 8)
'(solid rock)
;; (to "§")
'solid-rock.map
;; (to "â ")
'rock-cavern.map
'(12 8)
'(rock cavern)
;; (to "§")
'(solid-rock.map rock-cavern.map mountain-cave.map)
'(1 3 2 4) ; argh y1 y2 x1 x2
;; (to "âĄ")
'mountain-cave.map
;; (to "â ")
done in the lisp repl. (after running the eev anchor lines, I continued in this code block).
Basically I have achieved informally replacing functions with gotos. I guess Dijkstra is rolling in his grave (halloween themedâŠ!).
I desired this because I want myself (and you) to see we are explicitly reusing a heading we can just flick back to (however you are browsing it - eww in emacs with eev works for me), rather than call-an-opaque-function. In my theory adding a named function for interactive code reuse seems to increase the programming burden. Maybe my memory is not as good as Dijkstraâs.
Repeating my goals
accepting-valuesWe knocked out the first two; it occurred to me we should see that map symbols having a :bitmap property will render images in a hopefully-transparent-background stack so I have appended that goal. If I make these images hexagons, hopefully I stop getting these helpful messages saying âhey, I donât think your columns are aligning properlyâ.
We made a cave in a mountain. I guess we could put that grass in the forest for a forest clearing as well.
So we have multiple, complex (in that the contents are not homogeneous) zones.
Then dialog/game events and moving between zones, and all the rest of the jam will be attempting to write a game story.
Actually, all the rectangle functions which I am using here from-the-repl are âavailable inside the mapâ as well, but I guess that REPLs are warm and familiar and NicCLIM is a dangerously nouveau basically spreadsheeting program.
Join me on the Mastodon thread for this article; I guess I will begin my tootcoding adventure there.
screwlisp proposes kittens