[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] 3D games in Chicken

From: John
Subject: Re: [Chicken-users] 3D games in Chicken
Date: Sat, 11 Feb 2006 12:30:05 -0500
User-agent: Thunderbird 1.5 (X11/20060113)

I think a 3D framework in Scheme is a pretty rockin' idea. I had a simple one running in Chicken that worked pretty well, but I ended up moving it to Bigloo. I was more afraid of the copying collector than anything else: It'd be easy enough to allocate all big stuff outside of scheme with the FFI, but I feel like I'd still get bitten by the copying gc in the end. Which is kind of a shame, because Chicken's gc seems to handle cases that Bigloo doesn't like too much (lots of garbage in a short amount of time, which is handled by a minor gc).

The OpenGL interface wasn't too bad to write. I ended up just adding OpenGL functions as I needed them along the way. And if you don't mind names that are a little ugly, you can almost just feed gl.h into cigloo. The OpenGL egg for chicken is a pretty good start, and it's nice that it has good SDL functionality too.

In the end, I feel a little torn between Chicken and Bigloo. I really like the completeness of Chicken's REPL, call/cc and the community. Bigloo compiles faster, handles floating point numerics better, and has a nice module system. I'd like to give gambit a try, but I'm not sure it'd be worth it. It's got so little in the way of support libraries, I don't see a reasonable object system (meroon doesn't quite work with gsc), and the macro system is somewhat broken (syntax-case messes up DSSSL).

I definitely agree that it's a waste of time to try to make Chicken bindings for an existing engine. Almost everything is written in C++ for starters -- it feels like interfacing any scheme with any C++ application of size will be a long, painful road. Besides, Scheme will never achieve world domination if it's always just an extension language :)

-- John

Shawn Rutledge wrote:
 I've thought about binding Chicken to various 3D engines.  I'm inclined to
view this as a waste of time, though.  Every 3D engine out there will have
its own stupid C++ calls for manipulating the scene graph, and really,
that's something you'd rather be doing with Scheme proper.  Having to ape
other languages' baloney high level data structures just strikes me as
really really tacky and counterproductive.  I'm thinking it is better to
implement a 3D engine almost from scratch.  In practice, that means from

Yes I agree that would be nice, but since you'd want to take as much
advantage as possible of hardware acceleration, how can you avoid the
OpenGL API, for the sake of portability?

My goal is not a game, but to mess around with next-generation GUI
ideas.  I don't even need 3D very badly to do that, but I figure the
trend is that 3D hardware acceleration is taking over, and the leading
2D GUI systems (OS X, Vista and xegl) are taking advantage of it, not
to mention the 3D ones like Looking Glass.  Unfortunately I don't have
experience with OpenGL, so I'm going to have to learn, I guess.

I got all excited a few months ago when I discovered the openGL egg
but then was disappointed when I saw how incomplete it was for my
purposes, and how much real work all those bindings are still going to
be to finish implementing, and how painful it is to use a 3D API for
doing mostly 2D work.

I am also interested in having my GUI system be portable to PDAs etc;
realistically by the time I have done something useful, PDAs and
phones and such will probably all have 3D hardware, but in the mean
time there are a couple of software-only openGL implementations, like
this one which does have some hardware acceleration on XScale

So I think a 3D binding which is based on OpenGL is probably going to
have a very long life.

I'm not much of a gamer, but have enjoyed Civ and SimCity in the past,
and agree that's probably a very good game genre to try to do in

Chicken-users mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]