[q2x] OT: Lua questions

Nick Trout nicktrout at shaw.ca
Mon Feb 2 02:23:37 EST 2004


>> You can do this with metatables.
>That's a run time thing, not compile time.

Yes.

>> BTW I've almost got the flyer converted over to Lua in q2x.
>They not keep you busy up at that studio? =)

This is hobby time! :)

>> written a Python script to generate an auto binding wrapper for the
>> q2x stuff. Even after the refactoring Quake seems quite hardcoded.
> It is still very hardcoded, and it's not done being refactored.

good.

>> going to be too much work for me to convert all of the monsters
> I was actually envisioning 100% of the game logic in Lua, like this:
> gamex86.dll => gameluax86.dll

Do you mean renamed from "gamex86.dll => gameluax86.dll"? If so, this is
trivial, but if you mean an additional DLL, then this could be trouble, i.e.
common game code will have to be factored out etc.

> Same interface, so the server doesn't notice any change, it's just
>talking to the Lua subsystem.  The Lua subsystem, however, talks to
>all its own Lua modules, and provides entry points for the Lua stuff
>to do heavy-lifting, i.e. kernel traps.

I think we're sort of on the same wavelength. Yep. So the server doesnt know
there's Lua there. And because I've wrapped the C calls in a seperate
binding file, not altered them, C and Lua monsters can coexist.

I'm just doing the bare minimum of work to get the monster logic working
working at the moment. I'm taking the AI calls from the monster and mmove
type and adding Lua bindings for callbacks from C -> Lua and binding C calls
that Lua needs for Lua->C.

Perhaps we should think about unit testing if you have significant
refactoring in mind and you dont want to break Lua. This would be
interesting research for me, and possibly you. Extreme programming and all
that...

Nick






More information about the q2x mailing list