Forum

Quake Lua

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Quake Lua

Postby JasonX » Fri Jun 18, 2010 5:20 pm

I remember seeing a project some time ago that intended to replace all QuakeC game code with Lua. Does anyone know if this has been taken forward?
JasonX
 
Posts: 411
Joined: Tue Apr 21, 2009 2:08 pm

Postby JasonX » Mon Aug 16, 2010 4:34 pm

No one?
JasonX
 
Posts: 411
Joined: Tue Apr 21, 2009 2:08 pm

Postby ceriux » Mon Aug 16, 2010 4:39 pm

i dont like the sound of that... LUA is editable... id rather my game/mod was played for what it is, unless i release the source for the purpose of others to change that is.
User avatar
ceriux
 
Posts: 2223
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Postby mh » Mon Aug 16, 2010 5:48 pm

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
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby Sajt » Mon Aug 16, 2010 9:16 pm

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.
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

Postby Karatorian » Tue Aug 17, 2010 2:33 pm

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.
Karatorian
 
Posts: 31
Joined: Tue Aug 17, 2010 4:26 am
Location: Rindge, NH, USA

Postby Sajt » Tue Aug 17, 2010 5:03 pm

Go get 'em, tiger! :D (Just don't expect people to suddenly start making mods for it...)
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

Postby mankrip » Tue Aug 17, 2010 7:52 pm

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.
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
Dev blog / Twitter / YouTube
User avatar
mankrip
 
Posts: 915
Joined: Fri Jul 04, 2008 3:02 am

Postby Spike » Tue Aug 17, 2010 8:27 pm

-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.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby Feared » Tue Aug 17, 2010 9:39 pm

I'm planning on porting the quakec code to C++ on my project (QuakeCPP)

It won't be done this month, though, that's for sure.
I'm too busy running naked in the streets of shanghai at the moment. ;)
User avatar
Feared
 
Posts: 95
Joined: Fri Jun 11, 2010 11:58 pm
Location: Wylie, TX

Postby r00k » Wed Aug 18, 2010 3:44 am

I'm too busy running naked in the streets of shanghai at the moment. Wink


Now we know why you are Feared!
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm

Postby Feared » Wed Aug 18, 2010 7:08 pm

r00k wrote:
I'm too busy running naked in the streets of shanghai at the moment. Wink


Now we know why you are Feared!


:wink:
You know, since Kane and Lynch 2 was so short and sucked. I may actually have time to do this now.
User avatar
Feared
 
Posts: 95
Joined: Fri Jun 11, 2010 11:58 pm
Location: Wylie, TX

Postby frag.machine » Wed Aug 18, 2010 9:35 pm

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)
User avatar
frag.machine
 
Posts: 2090
Joined: Sat Nov 25, 2006 1:49 pm

Postby gnounc » Thu Aug 19, 2010 12:27 am

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.
User avatar
gnounc
 
Posts: 424
Joined: Mon Apr 06, 2009 6:26 am

Postby leileilol » Thu Aug 19, 2010 12:35 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

Next

Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest