Friday, January 23, 2009

Just for Qix...

I've been working on my 3D Lisp project recently, between changing diapers and running places for my wife. I have a new prototype that uses vecto and can make some cool effects. Most of the base functionality is there, I just have to figure out how to structure it. This is where my inexperience with Lisp really shows: how should I store the data I need? Most languages prefer certain data types. Not Lisp! I can make trees, hashes, objects, structures, closures, or a host of other types. That means I have to figure out if I need vector types or just a list of two or three numbers. Objects are faster, but lists are more flexible. There is always a trade-off.

Anyway, now I need an Erlang-style message passing system for my threads so I can run things in the background while I update the screen. I might use Erlang-in-Lisp but I need to look at that library some more. I have a few concerns about performing large operations in the background while trying to update the screen but I will burn that bridge when I get to it.

I also want to start using vertex arrays. I don't think it should be much harder than what I am doing now using gl-begin and gl-end and should be much faster. Once that is complete I should be able to add and remove items from the scene from the command line. Then the real work begins: giving Qix functionality. I need to create gui elements, message stacks, etc... Qix is not a "game" engine. It will in time replace my Emacs as an everything editor but include graphics, sound, 3-d, etc.

That's all I have for an update right now. As usual, please leave a message if you have any questions.

2 comments:

  1. Hm, either blogspot ate my comment, or there is some delay, so if it is double post please delete one of them.

    Hello! Your project looks interesting.

    If you want message passing you might consider http://www.cliki.net/csp. This is small and simple library, and it gives a very nice abstraction. It uses a global lock though, but this shouldn't be a problem if the channel contention is not very high.

    Vertex arrays are pretty simple. I found http://www.cliki.net/ffa to be easier to use than what cl-opengl has for them. For example you can see might attempt at textured fonts in CL+OpenGL here: http://github.com/Ramarren/opengl-text/blob/cb4b5c1a0106edf4988ace8a8353f062277160d2/texture/drawing.lisp.

    ReplyDelete
  2. Oops, I fail at links. There should be: CSP, FFA and my attempt at vertex arrays.

    ReplyDelete