[q2x] Lua

Nick Trout nick at rockstarvancouver.com
Thu May 15 15:18:42 EDT 2003


> >What's out of date: The SDL stuff? Are there any plans to 
> update this 
> >soon?
> 
> I think so.  Also, not sure if the "blessed" Lua distro is 5.0 or 
> 5.0alpha yet.

Do you mean the one you have chosen? The official Lua distro is now "5.0
final". I can't see any evidence of Lua code in q2x CVS so its surely
not a problem to use 5.0 final. There are changes and bug fixes since
alpha so final is really the only choice.


> http://oss.sgi.com/projects/ogl-sample/ABI/glext.h

Great thanks.

> >Agreed. Wouldn't it be simpler to go all Lua?
> 
> Depends on what you mean by "simpler"?  It would probably be cleaner 
> to go 100% Lua, but that would be a full jumping in on the task 
> instead of consistently having a fallback to the C version.  I happen 
> to like having an alternate verification system at all times, I think 
> that makes the porting that much easier.

I suppose there are two reasons for using Lua here. Firstly to configure
q2x, and then secondly as a scripting mechanism through a binding to the
game.


> >So I'll either have to be patient or maybe I should just fork the 
> >quake2 project rather than q2x.
> Right, but since you're interested, I'll get on Dan's case and see 
> what the situation is with the SDL port.

I have a Lua project (http://doris.sf.net/) which I was going to use for
some simple example of coroutines, perhaps a couple of little games. It
would be nice to have a proper game engine with sound and networking
though. A lot of the open source solutions have a fair amount of
dependencies or extranious features though so I think q2x would be a
cleaner solution. I managed to get all the components and build it in
half an hour or so and I'm sure this could be improved by including the
dependent libraries.

> >It would be nice to have a unified
> >cvar/cmd system, rather than a layered system, i.e. Lua sat on cmd. 
> >Seems a bit inefficient, maybe confusing, writing a binding to call 
> >cmds or having 2 binding systems?
> 
> At the outset there will be some overlap and confusion, but hopefully 
> the final result will be mostly Lua, as you state.  Replacing the 
> cvar system by itself would be trivial to do in a non-destructive 
> manner.  If you'd like to give that a shot as a first step, that 
> would be very reasonable, since it doesn't impact anything else and 
> there's already a clean interface to the cvar system (ri.cvar*, 
> Cvar_*, etc.).

I'll look into this.

> >>As for a Wiki, I'm not sure we're quite there yet. =)
> 
> >Are you sure? You could have left all your forethoughts as a 
> reminder 
> >to you and a guide for others! :-)
> 
> Bah, that only weakens the mind =)

Its about communication, I'm not questioning your ability to retain
information! I however do forget things!

Nick






More information about the q2x mailing list