Quake Lua
Moderator: InsideQC Admins
17 posts
• Page 1 of 2 • 1, 2
I don't really see the point in replacing one limited-functionality scripting language with another limited-functionality scripting language, unless you've got a personal preference for the syntax, in which case you're doing it for the wrong reason. QC is fine.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
-

mh - Posts: 2292
- Joined: Sat Jan 12, 2008 1:38 am
I imagine that it was a lot of fun to code the lua compiler and interpreter because it and the language specs were so small and simple. But like I said in some other thread, I don't think dynamic-typed languages (i.e. lots of obscure runtime errors, less errors caught at compile time) are good for game programming. Also Lua is a lot slower than QuakeC, but probably not slow enough to notice on modern machines, unless you have a ton of monsters in a map.
I think most games that use lua have most of their gamecode in C++, and just use lua for small extensions and scripts. (Maybe comparable to Duke3D's USER.CON.) It wouldn't be a very practical language to do all the gamecode in. (About as practical as using JavaScript...) There is or was for a while some kind of 'chic' appeal of using Lua in games, but you must look past that and determine if it's practical for your particular game. It's probably used as a quick-fix for games initially built without scripting/modding support (like USER.CON). In that case, Quake with QuakeC is already beyond that.
Ceasing my unsolicited rant and finally answering the thread topic: Nope, I don't remember ever hearing about Lua in Quake.
I think most games that use lua have most of their gamecode in C++, and just use lua for small extensions and scripts. (Maybe comparable to Duke3D's USER.CON.) It wouldn't be a very practical language to do all the gamecode in. (About as practical as using JavaScript...) There is or was for a while some kind of 'chic' appeal of using Lua in games, but you must look past that and determine if it's practical for your particular game. It's probably used as a quick-fix for games initially built without scripting/modding support (like USER.CON). In that case, Quake with QuakeC is already beyond that.
Ceasing my unsolicited rant and finally answering the thread topic: Nope, I don't remember ever hearing about Lua in Quake.
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
- Sajt
- Posts: 1215
- Joined: Sat Oct 16, 2004 3:39 am
I haven't heard about this either. However, I've been kicking around an idea in the back of my head to integrate Python into Quake. I've got no real compelling reason, it's just an idea I had.
I guess the real reason is that Python's been my language of choice for quite some time now. Nothing else I've used seems to fit what I want out of a language as well.
The other reason is that it'd be a two-birds-one-stone learning experience. Despite doing a bit of QuakeC modding off and on over the years, I've never messed with engine internals, (other than tweaking a few things to get supposedly portable code (I won't name names) to compile on Linux). I've also never embedded Python in anything. So if I embedded Python in a Quake engine, I'd learn about both.
That said, Lua seems to be an ok language and really easy to embed. I ported it to the GBA in about a day once, just on a lark.
I think if someone was to bother with this sort of thing, it'd be better to think a little loftier than just replacing QuakeC. Once you've thrown out compatibilty on that deep a level, you might as well go all out. Like try and strip game specific stuff out of the engine and make it more generic.
I guess the real reason is that Python's been my language of choice for quite some time now. Nothing else I've used seems to fit what I want out of a language as well.
The other reason is that it'd be a two-birds-one-stone learning experience. Despite doing a bit of QuakeC modding off and on over the years, I've never messed with engine internals, (other than tweaking a few things to get supposedly portable code (I won't name names) to compile on Linux). I've also never embedded Python in anything. So if I embedded Python in a Quake engine, I'd learn about both.
That said, Lua seems to be an ok language and really easy to embed. I ported it to the GBA in about a day once, just on a lark.
I think if someone was to bother with this sort of thing, it'd be better to think a little loftier than just replacing QuakeC. Once you've thrown out compatibilty on that deep a level, you might as well go all out. Like try and strip game specific stuff out of the engine and make it more generic.
- Karatorian
- Posts: 31
- Joined: Tue Aug 17, 2010 4:26 am
- Location: Rindge, NH, USA
Some of my main problems with QC are:
- It hates strings (even with extensions, it isn't as flexible and easy to use as plain C).
- It doesn't have arrays and matrices (any custom compiler's implementation I've seen is buggy).
- It doesn't have pointers.
- It doesn't run while the game is paused or disconnected.
- It can't read a lot of engine-side information, such as keybindings.
- It can't read raw input data (both digital and analog).
- And... well, it just wasn't designed for anything else other than what Quake is.
- It hates strings (even with extensions, it isn't as flexible and easy to use as plain C).
- It doesn't have arrays and matrices (any custom compiler's implementation I've seen is buggy).
- It doesn't have pointers.
- It doesn't run while the game is paused or disconnected.
- It can't read a lot of engine-side information, such as keybindings.
- It can't read raw input data (both digital and analog).
- And... well, it just wasn't designed for anything else other than what Quake is.
-

mankrip - Posts: 915
- Joined: Fri Jul 04, 2008 3:02 am
-agreed
-arrays work for me (-TFTE anyway)
-does, you're just not aware of it (-TFTE and you can read from them too!). You don't get pointers in lua, at least nothing more than you get from entities.
-does (fte+mvdsv both support it), if you make an extension to do that, as you would have to if it were C, too
-csqc and menuqc can read bindings. obviously serverside stuff cannot, if you want it to read key bindings on another computer, then your mods would never work multiplayer anyway.
-.movement extension. even without that its possible to tell which keys the user is holding, albeit a little hacky. But no, the client does not send all key presses they ever press to the server. Quake does not run on the server only.
-It is a simple state/object based language. Not native code, but uses a lot of native code to do all the actual work. Mods which try to do everything themselves end up running at half the framerate, so what do you expect.
Lua has better strings/arrays, yes. But that's the only real advantage to it. Personally I hate weakly typed languages, but that's just my personal preferance. The other differences are not QuakeC's fault, but the interface.
While it might be interesting to port quake to use lua instead, its a lot of effort, you have to rewrite absolutely everything in your mod to do it... and personally I'd just make it native, because that's much much simpler to do.
As a pet project, it might be interesting to do. But not practical.
-arrays work for me (-TFTE anyway)
-does, you're just not aware of it (-TFTE and you can read from them too!). You don't get pointers in lua, at least nothing more than you get from entities.
-does (fte+mvdsv both support it), if you make an extension to do that, as you would have to if it were C, too
-csqc and menuqc can read bindings. obviously serverside stuff cannot, if you want it to read key bindings on another computer, then your mods would never work multiplayer anyway.
-.movement extension. even without that its possible to tell which keys the user is holding, albeit a little hacky. But no, the client does not send all key presses they ever press to the server. Quake does not run on the server only.
-It is a simple state/object based language. Not native code, but uses a lot of native code to do all the actual work. Mods which try to do everything themselves end up running at half the framerate, so what do you expect.
Lua has better strings/arrays, yes. But that's the only real advantage to it. Personally I hate weakly typed languages, but that's just my personal preferance. The other differences are not QuakeC's fault, but the interface.
While it might be interesting to port quake to use lua instead, its a lot of effort, you have to rewrite absolutely everything in your mod to do it... and personally I'd just make it native, because that's much much simpler to do.
As a pet project, it might be interesting to do. But not practical.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
Looks like games that are expensive, short and suck are a modern tendency.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
Speaking of which...I bought the orange box when it came out just for portal : (. I heard it was short but I didnt realize it wasn't meant to be a full game at the time.
Now I'm happily awaiting portal2 which as I understand it IS meant to be a full game.
Now I'm happily awaiting portal2 which as I understand it IS meant to be a full game.
-

gnounc - Posts: 424
- Joined: Mon Apr 06, 2009 6:26 am
frag.machine wrote:Looks like games that are expensive, short and suck are a modern tendency.
Doesn't matter when it's GAME OF THE YEAR for the great graphics showing off what the 360 can truly do! You don't know real games. Gaming is about living the PRETTY GRAPHICS experience, its nothing about 'depth' or any of this made up crap you pretend to care about! You buy games because they look good and that is right. Halflife 2 is the best game EVER, because its physics are the most realistic, its characters are the most original and top notch, and the story is deep and engaging and the levels are very open and it was the pinnacle of graphics on directx 9, its the first game with water that reflects for real. People hate it because they don't know games. I hate them. They think Deus Ex is all great, but with those blocky ass hands I beg to differ. Its game with the graphics of suck its made over 20 years ago. it has nothing halflife2 has and if you think haliflife2 sucks you are an elitist who likes nothing of any quality. and the Source engine is made from scratch you retard gabe newell programmed it himself, it's the #1 game engine in the world for its revolutionary radiosity lighting and water and the faces that move their mouths and look at you look at modern warfare 2 its the best selling most popular game in the world with hundreds of game of the year awards for a reason, and if you hate it your dumber than life
i should not be here
- leileilol
- Posts: 2783
- Joined: Fri Oct 15, 2004 3:23 am
17 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest
