QConstruct (Lua scripting for quake III)
QConstruct (Lua scripting for quake III)
QConstruct is a quake3 mod that allows anyone with at least some knowledge of the lua programming language to create simple small modifications for the Quake 3 engine without touching a single line of C code. These scripts can be executed in realtime while the game is running, which allows for rapid prototyping.
Through the use of hooks and bindings to the quake3 engine, users can assign their own responses to particular events that happen in-game.
Lua is a high-level programming language, usually used for providing scripting access for lower-level code. (see http://www.lua.org/pil/)
I have been developing this modification for almost 2 years now. At this point I really need some feedback and possibly some help from testers. The mod is very unorganized but moderately stable and it may take some messing around to figure it out. You can download the mod here http://code.google.com/p/quakeconstruct/ (Windows Only)
Make sure you read the readme.txt file, it's kind of important.
[lvlshot]http://quakeconstruct.files.wordpress.com/2009/04/shot0009.jpg[/lvlshot]
Development Blog here http://quakeconstruct.wordpress.com/
Wiki here http://quakeconstruct.wikispaces.com/
Email here Hxrmn@comcast.net
Videos here http://www.youtube.com/view_play_list?p ... 805470729E
Questions, comments, discourse?
Through the use of hooks and bindings to the quake3 engine, users can assign their own responses to particular events that happen in-game.
Lua is a high-level programming language, usually used for providing scripting access for lower-level code. (see http://www.lua.org/pil/)
I have been developing this modification for almost 2 years now. At this point I really need some feedback and possibly some help from testers. The mod is very unorganized but moderately stable and it may take some messing around to figure it out. You can download the mod here http://code.google.com/p/quakeconstruct/ (Windows Only)
Make sure you read the readme.txt file, it's kind of important.
[lvlshot]http://quakeconstruct.files.wordpress.com/2009/04/shot0009.jpg[/lvlshot]
Development Blog here http://quakeconstruct.wordpress.com/
Wiki here http://quakeconstruct.wikispaces.com/
Email here Hxrmn@comcast.net
Videos here http://www.youtube.com/view_play_list?p ... 805470729E
Questions, comments, discourse?
Last edited by Hxrmn on Tue Jun 15, 2010 1:06 am, edited 1 time in total.
Re: QConstruct (Lua scripting for quake III)
Hi man. Still some work on this? Nice to read from you.
[b][url]http://www.per-thormann.de/[/url][/b]
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: QConstruct (Lua scripting for quake III)
Looks neat, Hxrmn. But is there a reason why it's win32-only? A quick peek at the SVN repository indicates you are distributing the Lua interpreter as source. Shouldn't it build on all platforms?
Re: QConstruct (Lua scripting for quake III)
This is cool!
My current project still has a ton of things to be done in it, so, until I get all that done I won't be able to investigate if or how I could make use of this with my project.
So I guess my point is, very cool lua mod, I support the cool stuff you are doing, but I won't be able to play with it being knee deep in my own mod currently.
My current project still has a ton of things to be done in it, so, until I get all that done I won't be able to investigate if or how I could make use of this with my project.
So I guess my point is, very cool lua mod, I support the cool stuff you are doing, but I won't be able to play with it being knee deep in my own mod currently.
Re: QConstruct (Lua scripting for quake III)
It should build on all platforms but I still haven't decided on how to do it.^misantropia^ wrote:Looks neat, Hxrmn. But is there a reason why it's win32-only? A quick peek at the SVN repository indicates you are distributing the Lua interpreter as source. Shouldn't it build on all platforms?
Currently it's loaded via DLL which is a windows only thing.
I could use static libraries or just integrate the lua source code with the mod's source code (it didn't work the first time I tried it).
Might branch the svn for that so the changes are easily reversible.
Re: QConstruct (Lua scripting for quake III)
Is there some kind of API described somewhere that we can code against?
Re: QConstruct (Lua scripting for quake III)
I'm working on one here http://quakeconstruct.wikispaces.com/.Eraser wrote:Is there some kind of API described somewhere that we can code against?
It's far from finished, but I'll get the basics finished soon.
Re: QConstruct (Lua scripting for quake III)
If it's stable enough with a proper API description I'd be very interested in messing around with it
I'm not familiar with Lua though, but never too old to learn. Why the choice for Lua by the way and not, for instance, JavaScript?

Re: QConstruct (Lua scripting for quake III)
I went into the project knowing Lua, not Javascript (although I do know some javascript now). Lua seemed like the logical choice at the time. Plus Lua is faster than Javascript.Eraser wrote:If it's stable enough with a proper API description I'd be very interested in messing around with itI'm not familiar with Lua though, but never too old to learn. Why the choice for Lua by the way and not, for instance, JavaScript?

Btw, I will be working on the documentation wiki more this week.
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: QConstruct (Lua scripting for quake III)
Check out Google's V8 JavaScript engine, the one used in Google Chrome. I bet you a sixpack it'll outperform Lua on most tests.Hxrmn wrote:Plus Lua is faster than Javascript.
Re: QConstruct (Lua scripting for quake III)
I Dunno man, Lua is a very fast language.^misantropia^ wrote: Check out Google's V8 JavaScript engine, the one used in Google Chrome. I bet you a sixpack it'll outperform Lua on most tests.
Code: Select all
-----------------------------------------------------------
Execution times for recursive F/P factorial(n) to /dev/null
Langs @ 2008 Times: n=1 n=170 difference
-----------------------------------------------------------
C 0.000 ms 0.090 ms 0.090 ms
Lua 0.001 s 0.005 s 0.004 s
Parrot-opt/iterative 0.013 s 0.018 s 0.005 s
Parrot/iterative 0.014 s 0.019 s 0.005 s
V8-Javascript 0.007 s 0.013 s 0.006 s
Ocaml 0.022 s 0.029 s 0.007 s
Python 0.013 s 0.027 s 0.014 s
Parrot-opt/recursive 0.013 s 0.029 s 0.016 s
Mozilla-Javascript 0.001 s 0.018 s 0.017 s
Perl 0.002 s 0.021 s 0.019 s
Nickle 0.031 s 0.065 s 0.034 s
Parrot/recursive 0.014 s 0.056 s 0.042 s
Ruby 0.041 s 0.095 s 0.054 s
Lua_on_Parrot 0.303 s 1.314 s 1.011 s
-----------------------------------------------------------
Re: QConstruct (Lua scripting for quake III)
Well it doesn't really matter. It's just a tool. If you know how a regular screwdriver works, it's easy enough to figure out how an electric one works as well.
Besides, I read that the semantics of Lua and JavaScript are very similar, they just have a somewhat different syntax.
Besides, I read that the semantics of Lua and JavaScript are very similar, they just have a somewhat different syntax.
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: QConstruct (Lua scripting for quake III)
I counter your impressive stats with a +2 language shootout (admittedly, LuaJIT still whips V8's hiney). I do have a beef with shootout.alioth.debian.org in that tests for the more exotic languages often have incredibly naive implementations. But at least the site admits so itself.
Re: QConstruct (Lua scripting for quake III)
Well played sir.^misantropia^ wrote:I counter your impressive stats with a +2 language shootout (admittedly, LuaJIT still whips V8's hiney). I do have a beef with shootout.alioth.debian.org in that tests for the more exotic languages often have incredibly naive implementations. But at least the site admits so itself.
Re: QConstruct (Lua scripting for quake III)
Although if we're talking about using this stuff for current PCs and not phones or something then wouldn't there be no noticeable difference?
Re: QConstruct (Lua scripting for quake III)
True, though it kind of depends on what it is your doing with the scripting language.bludshot wrote:Although if we're talking about using this stuff for current PCs and not phones or something then wouldn't there be no noticeable difference?
Re: QConstruct (Lua scripting for quake III)
Cool idea. Been a fan of lua since I started playing WoW.
Re: QConstruct (Lua scripting for quake III)
Working on integrating the Bullet physics engine. Got it working on the client but still need to parse the level geometry and network it.
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: QConstruct (Lua scripting for quake III)
What's the use case? Gary's mod-like, rag doll physics?
Re: QConstruct (Lua scripting for quake III)
Sort of garry's mod like. Ragdolls would require new player models (seeing as how quake3 is all vertex animations). I added a video showcasing the physics on the youtube playlist in my first post.
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: QConstruct (Lua scripting for quake III)
That's pretty awesome. What's performance like? A while ago, I hacked something up with ODE (rigid body physics only) but performance on anything non-trivial was abominable.
Re: QConstruct (Lua scripting for quake III)
Awesome. I see a Half-Life gravity gun coming up 

Re: QConstruct (Lua scripting for quake III)
The performance is great (doesn't look it in the video because it's fraps). I'm getting realtime accurate simulation on my older 1.2Ghz(single core) PC. Also gravity gun is a possibility. 
Also found the Bullet physics code for converting the BSP plane equations to primitives so I can create the map geometry in Bullet. Woot!

Also found the Bullet physics code for converting the BSP plane equations to primitives so I can create the map geometry in Bullet. Woot!