Day 5 - Actual Lisp Game Jamming Finally!


Video of LISP programming over on the 'stodon https://mastodon.sdf.org/@screwtape/110456458306869225 since I can't upload a video here.


FINALLY made it to LISP for my LISP GAME JAM and I could not be happier. HACKNEYED C GAME JAM NO LONGER

Basically done, just gotta put robots and puzzles in.

The actual phost mirror (pst, don't tell the other gophers that I shared a video with you and not them on the 'stodon )

Phost web mirror: https://gopher.floodgap.com/gopher/gw.lite?=tilde.institute+70+302f7e73637265777...

Source web mirror: https://gopher.floodgap.com/gopher/gw.lite?=tilde.institute+70+312f7e73637265777...

Little by little !

FINALLY actually JAMMING and in LISP

Now I can work on the game by programming in lisp. Let's go through

#'make-game, which is just a record of hacking along in a repl,

dumping often flawed defs from a source editor.

                        ; I added unwind-protect of SDL_Quit() which is safe.
(defparameter *funs* (list))
(defun play-game () (game () () *funs*))

The game is whatever funs go in *funs*. (play-game) is a utility that

should probably be a symbol-macro.

Here, I push my line-drawer I wrote already in one direction, and run

the game

 (push (draw-lines-from (coord-liner 0 (+ 2 (truncate 640 *scale*)) 1
                         0 (+ 1 (truncate 480 *scale*)) 1
                         :transpose nil)
        '(255 0 0))
  *funs*)
 (play-game)

Add the other direction, marvel at it again:

 (push
  (draw-lines-from
   (coord-liner 0 (+ 2 (truncate 480 *scale*)) 1
                0 (+ 1 (truncate 640 *scale*)) 1
                :transpose t)
   '(255 255 0))
  *funs*)
 (play-game)

;;;Here I wrote pretty big special-scope singleton closures for the player and a base

;;;Trying them out (more than once in reality :D)

 (push (lambda () (Funcall (ensure-player) :paint t))
  *funs*)
 (push (lambda () (Funcall (ensure-base) :paint t))
  *funs*)
 (play-game)
;;; Add movement to the player using the exposed keyboardstate.
(push
  (lambda ()
   (funcall (ensure-player) :move
    (cond ((not (zerop (get-key-state *down*)))  's)
          ((not (zerop (get-key-state *up*)))    'n)
          ((not (zerop (get-key-state *left*)))  'w)
          ((not (zerop (get-key-state *right*))) 'e))))
  *funs*)
 (play-game)
;; (yay, we can walk around)...
;; I added a *plants* list and (spawn-plant-in x y w h) 
;; and (advance-someplants lists-of-name1->name2->fractional/probability)
;; and paint-plants.
 (loop repeat 6 do (spawn-plant-in -5 -5 15 15))
 ;;(print *plants*)
 (advance-some-plants '(leaves flower 7/10))
 ;;(print *plants*)
 ;;Nconc so the plants are always on top
 ;;(I wanted to see the plants - but that's probably backwards right)
 (nconc *funs* (list (lambda () (paint-plants))))
 (play-game)
So I'm pretty happy with a live CL repl as my "map editor".

And it finally looks like we are doing something sensible ;p though

there is basically no sensible way to write a bunch of up-front-C, but

now I am very happy. The jam is almost over though! I had an

offline-busy couple days.

Get jam-no-theme eat berries collect treasure could technically control robots

Download NowName your own price

Comments

Log in with itch.io to leave a comment.

Cool programming, man!

(2 edits)

Thanks! On the lispy gopher show today[1] I hope I can find someone who is not currently game jamming to develop a sm0l platformer (using pretty much the exact same codes tbh).

You're an artist (programming is art too but I saw your pixelart)? Do you have any art wisdom for me?

[1] on https://aNONradio.net/ at 0000UTC (in 6 hours).

https://anonradio.net:8443/anonradio

Nice song! Thanks!!!

Artist widosm..i think i am not enstein in anithing. So dont know about some big features, big things.. i can tell...

I d tell...

1) you need to do progress the way you can. If it is slow then it is slow. MAin thing - it is just to make progress every day. 

2) main things are to choose - things you are interesting. for example for you it is LISP. And nobody to listen. You know, some can tell for example, in my case, i like QBASIC, FREE PASCAL programming, they can tell it is not usefull things, just ignore this. And concentrate on positive. Positive- is a progress you do. Even if it is small. Do it like every day. Every time. And it is a long road, to have result. So just go a long road. Nobody listen, and do what you choose all the time. And do a progress.

3) i think for some simple games. It is cool to do everything by yourself. To learn simple art (2d or 3d), some simple programming (QBAsic, some C++ and SDL2) and simple music (LMMS program). 

4) Programming is most hard thing. And it is most biggest power you spent on programming skills and most little result you have. It requires a logic and math mind. And most of people just nothing about it. So it is a most slow progress. 

5) Theory in programming it is a standalone thing. Also dig it. It upgrade your logic skills. And logic gives you a fast solutions in a real programs you write

6) well, cool so start with most simple pixel art 2d. It is most simple way to have a graphics for a game. Dig for something 8 bit, NES< Atari 2600-7800. Something like this for a style to start.

7) Keep on RETRO! Retro wave, retro programming, retro games!

8) Try to be positive in a real life.Real life affects a lot to a work powers you have.

Thank you for the amazing deep and comprehensive words!