Page 2 of 2

Re: Free, online, all-in-one book recommendations

Posted: Fri Mar 04, 2011 7:57 am
by Duke
xibalba wrote:I noticed that GNU Common Lisp outputs C code. How would a binary generated from that C code manage garbage collection?
If you mean to ask "how can a non-dynamic language like C do garbage collection", then the answer is that dynamic languages can be implemented in C; all languages are essentially abstractions of ASM. Otherwise, I don't know the particulars of how GCL works.
^From ANSI Common Lisp. How is (x) in the above expression a list when it isn't quoted? Is it a list because it isn't a number or string (no double quotes)? Then how is it also not a symbol? Are all such variables defined by defun lists? Or should I just keep reading as it will be explained to me later on?
It will become clearer after you read about macros, but basically the lambda-list (x) doesn't need to be quoted because it's not evaluated directly. Rather, when it's passed to a macro (i.e., defun) it's transformed into valid s-expressions.

That's my understanding, anyway.

Re: Free, online, all-in-one book recommendations

Posted: Fri Mar 04, 2011 1:30 pm
by Warren Wilkinson
I read through your design document. I have some advice:
  1. Don't worry about making it modular. Its much easier to hardcode things. In particular, hardcode the battle menu options, the character stats, and the spells. You might hardcode the character sprite & animation information.
  2. Code a walk-about first. 1. get your game to load up, setup gfx, and draw some random pixels on the screen. 2. get it to blit a hardcoded land tile all over the place 3. get it so you're arrow keys move the camera around the map 4. draw a 1-frame of a hardcoded sprite where your character is. When you've completed these steps you can start work on loading tile graphics, loading maps, and animating sprites.
  3. You have a pretty good handle on the sort of data that goes into a map. The design document looks good.


Posted: Fri Mar 04, 2011 2:21 pm
by xibalba