[q2x] tolua5

nicktrout at shaw.ca nicktrout at shaw.ca
Sun Dec 28 15:36:57 EST 2003


> Oy vey, the long and short of it is that Nick basically got Lua 
> mostly 
> hacked into there a bit, and I'm leaving it alone until he gets it 
> fully committed and is happy.  Only the cvars are being converted 
> at 
> this time.
> On Sat, 27 Dec 2003 00:44:25 -0600, Dan Olson wrote:
> >
> > I've heard rumors that someone patched tolua 5.0 alpha to actually
> > work. Have either of you seen or acquired this patch?
> >
> > I switched email addresses a while back and didn't realize that I
> > was subscribed to about 5 mailing lists with the old address.  Just
> > resubscribed to this one, so maybe someone could post a quick
> > update of what's been going on?

Merry Xmas from Blighty! To reiterate what Brian said: I've got Lua 5 into the project and have cvars, config scripts and client/server messaging converted over (so basically client side is working). Brian answered some questions about the structure of the client-server code and so I have a better idea about how to proceed with the server side conversion now. Rather than have a client and a server state I think we'll just use a single state. This can be quite easily namespaced if necessary (and will save memory).

Currently I'm patching Lua into the old arg system that Quake uses to call functions (hence it's a little hacky). Eventually the arg system will be removed and all functions converted to use the lua_to<type>() functions. I'm thinking of writing some Python scripts to do this.

The game runs on the server side, which is the biggest job to tackle. Again I'm thinking of writing some scripts to covert all the C m_*.c files over to Lua.

I'm not using tolua at the moment. Brian stated in an earlier email that he'd rather we used the Lua C API explictly. I don't really have a problem with this since the Lua C API is very easy to use and most of the tricky work can be done in Lua and a simple function call made, rather than do the work in C. -- I would like the details of where to find the tolua patch though since I have another project which needs tolua5. Thanks.

I'll be back in Canada on 11th Jan and will try and carry with work, albeit in "hobby" time. I'm hoping the conversion scripts will greatly speed up the full conversion to Lua. I think the plan will then be to check in my changes and test the game for cracks before proceeding. We may have to do some multiplayer tests. I may be able to test this at home if I can get q2x compiling on my linux box. I don't really want to spend a lot of time on that though.

Someone could be looking at a Quake2 editor in which we could embed Lua ediiting and debugging?

Nick







More information about the q2x mailing list