podiki / cl-tcod-tutorial Goto Github PK
View Code? Open in Web Editor NEWLisp roguelike tutorial with libtcod and cl-tcod
License: The Unlicense
Lisp roguelike tutorial with libtcod and cl-tcod
License: The Unlicense
I would like very much to go through your cl-tcod tutorial using my platform, LispWorks on WIndows.
I see libtocd is available on Windows. Would you reckon the tutorial is easily portable to LispWorks? Would you be available, your time permitting of course, to assist in case of LispWorks or Windows-side issues?
I get the following error when trying to load tutorial-part01.lisp
:
The assertion (PROBE-FILE TCOD::FONTFILE) failed with
TCOD::FONTFILE = "arial10x10.png".
[Condition of type SIMPLE-ERROR]
The font file is in the dir, so I suspect that this is some kind of emacs/path issue, but I don't know how to resolve it.
(via this comment on Reddit):
Mostly looks good, but I've got some style suggestions. Number one, I'd make constructors for your objects instead of inlining make-instance calls. For example:
(defun make-rect (x y w h)
(let ((r (make-instance 'rect :x1 x :y1 y)))
(setf (x2 r) (+ (x1 r) width)
(y2 r) (+ (y1 r) height)
(center r) (cons (floor (/ (+ (x1 r) (x2 r)) 2)) (floor (/ (+ (y1 r) (y2 r)) 2))))
rect))
I also rearranged some functions to suggest some style improvements. I'd try to minimize declaring variables just to setf them later... usually you can just add a nested let, or use let*.
Tutorial 1 crashes the entire lisp image at this line:
CL-USER> (tcod:console-init-root *screen-width* *screen-height* :title "lisp/libtcod tutorial" :fullscreen? nil)
Process sly-pty-1-1 killed
; Lisp connection closed unexpectedly: connection broken by remote peer
; --------------------------------------------------------
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.