Page 2 of 2

Posted: Tue Jul 26, 2011 12:45 am
by revelator
in that case sounds great :)

Posted: Wed Jul 27, 2011 2:08 am
by frag.machine
TheHyperborian wrote:
reckless wrote:np m8 :)

i dunno about if people would call it blasphemy but i reckon some would argue that it needs to keep compatibility with standard quake.

maintaining the above can really be a pain but in a way understandable
in case the developer in question drops the project before any compatible game data has even been made it would have been a waste.

tenebrae2 could have been a new quake like that but the project maintainer got hired by the company that made enemy territory
and dropped the project, so the only game you can play on the beta
version of the engine is an alpha of industry heh.

but i understand the feeling :) in the end its up to you what you want to do with it.


Well it will be able to play Quake, I am converting the QC files to Lua that come with Quake. My goal though isn't to play Quake but to use the engine as a platform for new mods, a platform to experiment with, an build that will make it easy for someone to quickly pick up and prototype a new game design. While it will play Quake, it might not play it exactly like the original. It isn't my goal, but anyone can freely borrow what they like from my build and use it however they want. The reason I am using Quake is because 1) It's open source 2) there are tons of tools available for it 3) I want to expand it and make it available for anyone to use to develop new games with it, especially for newbies, who might have done a little dark basic, they can jump write in. That is why Lua is a much better alternative to QuakeC for what I want to do, it will allow beginners to get into learning how to do game programming and develop their own games with it without having to touch the C code.
Even being a big fan of QuakeC, Lua support sounds more than reasonable - it's a logical evolutionary step, and thinking about a bit more, I'm quite surprised nobody didn't that before. I'll follow your work with great interest, please keep us updated in your progress. :)

Posted: Wed Jul 27, 2011 2:52 am
by revelator
heck if i could id probably yank in python as a replacement for QC but lua is easier so in that regard i totally agree :).

Posted: Wed Jul 27, 2011 4:26 am
by TheHyperborian
frag.machine wrote:
TheHyperborian wrote:
Even being a big fan of QuakeC, Lua support sounds more than reasonable - it's a logical evolutionary step, and thinking about a bit more, I'm quite surprised nobody didn't that before. I'll follow your work with great interest, please keep us updated in your progress. :)
Well syntactically, quakec and lua aren't very different. Whereas QuakeC is strongly type, Lua has no type. Whereas QuakeC uses field variables to store information in the entities, everything in Lua is a big table. Lua supports a limited OO programming model, and has a ton of built in libraries. The only thing is that vectors must be done as a userdata type, instead of being supported in the language like QuakeC does, but it's not really very hard to understand. So instead of doing something like this in quakeC

Code: Select all

local vector v1,v2;
v1 = v1 + v2;
in lua you'd do this

Code: Select all

v1 = vector.new(0,0,0)
v2 = vector.new(0,0,0)
result = vector.new(0,0,0)

vector.add(v1,v2,result)
But it is very easy to connect a Lua table to a C data structure, so basically you can script just about anything in the engine through Lua is you put in code to interface to it. And unlike QuakeC you don't have to declare variables beforehand to use them, you can access them in C by their name. So you don't have to compile the engine if you change the entvars_t structure and you don't have to change it at all in C.

Posted: Wed Jul 27, 2011 4:43 am
by Spike
qc was only really intended for fast event things, touch events, think timers, rather than complex loops or heavy logic - its all simple stuff with few loops.
it ought to be easy enough to convert id's qc source into lua, like I say, its all basic if/then logic. They're both a bit C-like.
Stuff like waypoints would probably be much simpler with lua, and ui stuff too I expect.

I think jogi had a go at some lua support a while ago, just clientside stuff. Not sure if he did anything with it.

Whatever lua's merits, the thought of stripping out QuakeC gives me the willies. If you're aiming for a 'this isn't quake anymore' engine, then obviously it doesn't matter, but if that's the case, I have to ask - why quake, and not quake3?

Posted: Wed Jul 27, 2011 2:17 pm
by revelator
menu stuff also just have a look at world of warcraft :)

i really like the idea.

sounds awesome

Posted: Wed Jul 27, 2011 5:48 pm
by hondobondo
though i do have one question: will mods have to be rewritten in lua or will the engine read standard progs.dat? not that i'm complaining. learning lua sounds like fun

Posted: Thu Jul 28, 2011 3:30 am
by frag.machine
@hondobondo: TBH I don't see the point of supporting both interpreters in the same engine. And from what I read about Lua, yes it looks quite fun to program.