October 19, 2008

Quake 3 BSP loading (WIP)

I woke up this morning and I felt like doing some BSP rendering... in Java though. Yes, I'm forsaking Lisp for now, and returning to that partial 3D engine in Java that I was working on before. No I do not suddenly consider Java to be better than Lisp; Lisp is still the cooler language. The main reason seems to be that I have a much more comfortable development environment for my Java code than I did for my Lisp code. Lesson learned: the success of a language is only partly defined by its features; the surrounding "ecosystem" also plays a major role. Yes I know I could be using something like LispWorks and enjoy the comfort, but I don't want to. It's not open, unless you agree to a somewhat limited environment. I much prefer the Eclipse philosophy where non-commercial software developers are not treated like second rate citizens.

So anyway, I looked around for some apropriately licensed Java code to start off from. When I didn't find anything, I just decided to start coding the loader myself. Sofar I've got the plane and node records loading, based on the unofficial Quake 3 Map Specs. I'm also using info from "rendering Quake 3 maps" to help me decide which parts of the file to load first.

No big promises that I'll be finishing this code soon though. :-)

October 16, 2008

Good news, bad news

The bad: I'm putting my 3D Lisp engine on hiatus. I still haven't found the right vibe to continue with it. It's partly to do with the uncomfortable development environment I've got going, but also with wanting to get something going that's more for the end user. I.e. not just a 3d engine. Anyway, we'll see what happens if and when the vibe returns.

The good: I will become a dad somewhere in the middle of next year ! This has taken most of my spare-time thoughts, as you can imagine. Apart from the obvious meanderings, I'm also wondering if I could not make something which will benefit him/her. A lot of kids these days naturally know how to use a computer, but not how to make it their own. They are only able to make it do what other people have provided for, not make it do whatever they want it to do. (This is why I think that learning some programming language should be a compulsory part of modern day schools.) I know of some projects in this area (e.g. Alice), but I haven't really seen anything that "just makes sense".

Anyway, for now I'm transforming this blog a more general purpose ranting mode. I'll try to find my muse, and see where life takes us.

August 30, 2008

Still alive...

...but low on whatever it is I need to do some programming in my spare time. I'm not cheating, though, and have not started work on some other programming challenge. I will stick to Lisp and 3D until I've made it through the year.

August 10, 2008

Lazy weekend...

'Nuff said.

I have been checking out the cal3d documentation though. It seems to be pretty straightforward. I hope to give it a try sometime later this week.

August 03, 2008

Cal3D

I'm trying to get Cal3D running from within Lisp. I installed Cal3D on my mac, then tried lispbuilder-cal3D. Both of them seem to load ok. But then when I try lispbuilder-cal3D-examples there is a dependency on lipsbuilder-openrm. So I've been trying to get openRM compiled correctly, and it compiles, but the dylibs I'm creating won't load...

Not sure what I'm doing wrong. And not really interested in putting much effort in openRM, as I'm not going to use it anyway. I'm done with scenegraphs; they have their uses, but not for what I'm going for. I'll take another shot at it a bit later, and check my options.

[update] Have taken another shot, but no success yet. I think my dylibs are being created correctly now, but I can't be sure. The error in Lisp says that dlopen failed, but nothing more detailed for me to go on. I've had enough of it for today anyway...

July 31, 2008

CFFI-SDL, we hardly knew you...

Yes, I'm switching to LispBuilder. Even though it doesn't say so on their homepage, it supports both SDL and OpenGL. Just grab it from the svn repo and enjoy.

I've forwarded them my fixes to get it going on the mac, and it runs just fine. Here's the classic gears example for your viewing pleasure:

Even better, there is also a Cal3D binding. A friend of mine, Randy Voet, is having a go at creating some player models for me. If all goes well that means I can skip forward to the next step sooner than expected. If not, I'll have to see what I can do to get the Cal3D models going.

July 29, 2008

lispbuilder-sdl

I recently got a comment from Luke J. Crook that I should check out, among others, lispbuilder-sdl. Well, I just did, and it seems to work great on my mac (some notes further down).

Lispbuilder-sdl seems to cover pretty much everything I need from SDL, except for the OpenGL stuff. But I will try and see if I can not just use my own OpenGL binding in conjunction with lispbuilder-sdl. My guess is that this should work just fine. If that's the case, then my cffi-sdl project becomes quite pointless, and I'll just offer the lispbuilder guys a copy of my opengl binding for them to include.

A note if you're trying to install lispbuilder-sdl on your mac: I had to modify two things first. One is the cocoa-helper code which didn't find the SDL header on the system. That required a small fix in both the Makefile and the source code. Second was the loading of SDL by CFFI, which couldn't find the library. This is because I installed SDL through Fink, which places it under /sw/lib/. So I added that to the lookup path in the right way, and then everything was just fine.

So once again it seems that most of my work was quite spurious, but hey, live and learn. :-)