screwlisp proposes kittens

My own ANSI common lisp game jam experience of my own unix_surrealism_jam.lisp making levels

This is my own experience of experiencing my own jam experience, not necessarily a tutorial. I had tried a few times to write otherwise and failed.

I used my own existing hextille (hexagonal) McCLIM map editor named NicCLIM to make a game played with hextille maps. (Hextille is Conway’s term).

Setting up

Having downloaded

like normal for me, using

emacs
M-x eww
https://screwlisp.small-web.org/lispgames/nicclim.lisp
d

untar GAME.TAR:

cd
tar xkvf ~/Downloads/GAME.TAR

Then I do this in (to?) my lisp image:

(ql:quickload :mcclim)
(compile-file "~/Downloads/nicclim.lisp")
(load "~/Downloads/nicclim.fas")
(in-package :nic)
(compile-file "~/Downloads/unix-surrealism-jam.lisp")
(load "~/Downloads/unix-surrealism-jam.fas")
(uiop:chdir "~/GAME") ; first one shows this is not the current dir
(uiop:chdir "~/GAME") ; second time changes the current dir

Goal of walking between sub map regions

Today, I want to

  1. Make a map that is laterally too big to fit on my screen
  2. Break it into two halves
  3. The border between them walks-off-this-half, on-to-this-half.
  4. Otherwise, each half is also surrounded by an *impassable* border

Extending unix_surrealism_jam is a core player activity.

Effectuation thereof

If you will forgive my use of repl variables.

'wide-map
(rect-file * 10 5 ())
(cat **)

Outputs:

NIC> 'wide-map
"WIDE-MAP"
NIC> (rect-file * 10 5 ())
NIL
NIC> (cat **)
NIL	NIL	NIL	NIL	NIL	NIL	NIL	NIL	NIL	NIL
NIL	NIL	NIL	NIL	NIL	NIL	NIL	NIL	NIL	NIL
NIL	NIL	NIL	NIL	NIL	NIL	NIL	NIL	NIL	NIL
NIL	NIL	NIL	NIL	NIL	NIL	NIL	NIL	NIL	NIL
NIL	NIL	NIL	NIL	NIL	NIL	NIL	NIL	NIL	NIL

NIL
NIC> 

This is great and all

(enclose-map 'wide-map)

but I would like to programmatically break evidently-too-wide maps like this up into pieces, and then

  1. Add connections between edges
  2. Wall against walking off into nothingness, otherwise/as well

Split map into two pieces

(extract-rect 'wide-map 'wide-map-left 0 5 0 5)
(cat 'wide-map-left)

Outputting:

NIC> (extract-rect 'wide-map 'wide-map-left 0 5 0 5)
NIL
NIC> (cat 'wide-map-left)
NIL	NIL	NIL	NIL	NIL
NIL	NIL	NIL	NIL	NIL
NIL	NIL	NIL	NIL	NIL
NIL	NIL	NIL	NIL	NIL
NIL	NIL	NIL	NIL	NIL

NIL
NIC> 

Hmm actually let’s mark the left and right sides of it just in case

(enclose-map 'wide-map)

and actually in the GUI

set cur1 left
jump 2 2
push cur1
set cur1 right
jump 6 2
push cur1
q
y

-es to saving. I don’t automatically delete files at the moment, so I had to nuke the old ~/GAME/WIDE-MAP-LEFT. Now,

(extract-rect 'wide-map 'wide-map-left 0 5 0 5)
(extract-rect 'wide-map 'wide-map-rite 0 5 5 10)
(cat 'wide-map-left)
(cat 'wide-map-rite)

I regret making extract-rect row-start
row-stop, col-start
col-stop.

NIC> (cat 'wide-map-left)
NIL	NIL	NIL	NIL	NIL
NIL	NIL	NIL	NIL	NIL
NIL	NIL	(LEFT)	NIL	NIL
NIL	NIL	NIL	NIL	NIL
NIL	NIL	NIL	NIL	NIL

NIL
NIC> (cat 'wide-map-rite)
NIL	NIL	NIL	NIL	NIL
NIL	NIL	NIL	NIL	NIL
NIL	(RIGHT)	NIL	NIL	NIL
NIL	NIL	NIL	NIL	NIL
NIL	NIL	NIL	NIL	NIL

NIL
NIC> 

Radio choice to move between maps

(setf (get 'left2rite :radio-description)
      '((go to rite map))
      (get 'left2rite :radio-choices)
      '(member ("ok"
		((com-change-map wide-map-rite)
		 (com-h) (com-h) (com-h) (com-h)))))

add that

(enclose-map 'wide-map-left)
→→→set cur1 left2rite
push cur1
q
y

→

NIC> (enclose-map 'wide-map-left)
NIL	NIL	NIL	NIL	NIL
NIL	NIL	NIL	NIL	NIL
NIL	NIL	(LEFT)	NIL	(PENGUIN LEFT2RITE)
NIL	NIL	NIL	NIL	NIL
NIL	NIL	NIL	NIL	NIL
Clobber WIDE-MAP-LEFT? y/n  (Y or N) y
NIL

Trying that out

(enclose-map 'wide-map-left)

Well, that works. However, TODO, if I say y to the prompt, it would overwrite WIDE-MAP-LEFT with whatever I did to WIDE-MAP-RITE. I would need to use writef wide-map-rite inside the gui before exiting, as it stands.

Conclusions

Successfully made a 10x5 map, extracted the left and right (“rite”) sides of it, and added a left2rite event that makes the admittedly laborious control-dash alt-dash “do event result” apparently cross over the 5x5 “current submap”.

Actually, let me add some pictures and redo that video.

(setf (get 'left :bitmap) 'left.png
      (get 'right :bitmap) 'right.png
      (get 'left2rite :bitmap) 'left2rite.png
      (get 'penguin :bitmap) 'techno-mage/imgs/penguin.png)

Sorry to everyone who was waiting for more unix_surrealism here. Sometime this week I promise. Back when I never left the gopher, my informational-line banner was

Screwtape proposes a toast

fingerpainted in cursive, but converted to ascii pbm. So me squiggling in cursive is self-referential. I added the penguin because I used white + transparency and there is a white background, so you could not see it at all a moment ago. Exploratory programming.

Anyway, this minimal, purely interactive (in the sense of -in-lisp-image) additional level dev part of playing my game jam is seen working. We could stick the :bitmap and :radio-choices in a file like my protracted gamejam instructions, and postpend them to the game jam levels somewhere.

If you think about how background characters in books and videogames often have big, complex, multifarious dungeons around them, filled with simplistic demons that basically just wander around simplistically, in my dreams this conjures that to mind at least a little bit, reflecting the 90s moo research / commentary that it was in some sense grand fiction, but no player is the main character.

Fin.

See you on the Mastodon thread, and the Tuesday-night-in-the-Americas lispy gopher show at 7PM EST same time every week, for years. Archive: https://communitymedia.video/c/screwtape_channel/videos

screwlisp proposes kittens