You need a library that allows you to make guis or draw/user input. There are lots of bindings for CL that could do this. Which you choose depends on what you want. Personally i prefer
CLG for gui, and
Lispbuilder-SDL(with cl-opengl) for the other stuff. If you're using
Able,
Ltk is probably the easiest to start with at this point(though it seems inferior to CLG except at one point to me), as Able uses that.
You know how to install .asd files? Being annoyed with asdf-install, i usually just download the tarball, extract it in a directory where i put the cl libs, and then i have ~/.sbcl/systems/more.asd with:(required from ~/.sbclrc)(i found adding all those damned symlinks cumbersome.
Code: Select all
(defpackage :asd-directories (:use :cl :asdf))
(in-package :asd-directories)
(defun add (path)
(pushnew path asdf:*central-registry* :test 'equal))
In Able, there is just a folder you can put the CL libraries in, and if there are no defeaters, you can use it. Otherwise, first see if you're missing dependencies, and search them on cliki, unless it turns out it is more complicated than that.. then it might be better to just ask.
Btw, in this, it seems better to me to use initargs on the class here:
Code: Select all
(move (make-instance 'point) x y))) ;instead
(make-instance 'point :x x :y y)
Unfortunately a vanilla vector library seems missing.. Perhaps i should make a little page for what i use my self. Based on VECTOR, i also made a more ugly version based on classes, but i decided to trust the compiler more. (I don't think that deriving from a numeric-vector -like class is ever a good idea, imo better keep them slots.)
If you want examples, CLG has an hello-world and docs can be gleaned to be usually straightforwardly analogous
to here, but yes, it needs to have better docs. And you need to do:
Code: Select all
(setq swank:*communication-style* :spawn)
(gtk:clg-init-with-threading)
And i noticed it sometimes doesn't work first-window of a session. cl-gtk2 is very similar. Not automatically generated, though.. And i haven't ever used gtk(via cl) from windows, which might turn out to be a pain to do, i don't know. However, the gtk ones use classes nicely. The style of using CONFIGURE to change widgets in Ltk is a bit dinky, and in using it, i have felt restricted in what i could do.
Lispbuilder-sdl has a tonne of examples, if you're making a game light-on gui this one might be handy, though there aught to be game-gui libraries for that. It seems likely you can find the docs and figure out how to do it, but feel free to ask if you want a more specific explanation.