Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SUGGESTION] If it is written in a scripting language

#1
then i suggest implement it with something wich can be compiled to machine-code. This is to make very new features possible to be implemented as they should be (so they run good enough and dont waste time).
Reply

#2
QuakeC is not actually a scripting language, it's interpreted and it's not limiting that much, nobody is going to rewrite Xonotic to another language (and the same engine).
Reply

#3
(08-29-2012, 09:27 PM)frostwyrm333 Wrote: QuakeC is not actually a scripting language, it's interpreted and it's not limiting that much, nobody is going to rewrite Xonotic to another language (and the same engine).

this is what i meant, that it is interpreted. it is quite some limitation. but as i have read, it did split of of something wich had the darkplaces source code available. So it can be written for another language. on the same engine.
Reply

#4
Well, if it's possible, you're free to do it :o)

Just don't expect the devs that are currently working on Xonotic to consider switching the language.
My Xonstats Profile
Latest track on soundcloud: Farewell - to a better Place (piano improvisation)
New to Xonotic? Check out the Newbie Corner!

Reply

#5
Why would you want to compile it? Then we would have to compile game code for Linux, Windows and Mac OSX in appropriate 32 and 64 bit flavours. No one is going to want this but by all means you're welcome to do it anyway.
I'm at least a reasonably tolerable person to be around - Narcopic
Reply

#6
QC is still optimized and compiled into a bytecode for a virtual machine. Kind of like Java, I guess?

I imagine having QC compiled to native code would be quite a difficult thing to implement (you do it?) and it would then make it necessary to ship several versions of the same gamecode. It would make modding complicated (you would have to compile the CSQC part for each platform before making a server), or otherwise lead to "windows-only" or "linux-only" or "32bit-only" servers. Don't want that.

Also, what are the security implications of letting anyone send you a native library to run on your PC? I don't know, but I imagine the need for security would increase complexity.
Reply

#7
I think the OP doesn't really understand how Quake C works. - It's not a general scripting language like python or ruby, it's limited and optimized for the quake engine, and it's also compiled to bytecode. Hence performance is not a large issue like with general interpreted languages. More info on wikipedia → https://en.wikipedia.org/wiki/Quake_C

Also - only the game content is written in Quake C, the engine is written in C++ and compiled + optimized.

BTW: because modern computers have loads of computing power, the general ideas of programming have shifted from optimize-to-hell to write-easy-and-quick - interpreted languages are the effect of this.
My contributions to Xonotic: talking in the forum, talking some more, talking a bit in the irc, talking in the forum again, XSkie
Reply

#8
(08-30-2012, 05:02 AM)Cyber Killer Wrote: Hence performance is not a large issue like with general interpreted languages.

I would say that the only area where Xonotic gamecode is demanding and possibly slow is bot AI although you wouldn't really say that this is inherent to Quake C as such - bots like Reaperbot managed to be very fast and lightweight in 1997 and they were also Quake C.
I'm at least a reasonably tolerable person to be around - Narcopic
Reply

#9
Cyber Killer, the engine is coded in C, not C++.
Reply

#10
(08-30-2012, 06:55 AM)Mr. Bougo Wrote: Cyber Killer, the engine is coded in C, not C++.

OK, my bad for not double checking that :-).
My contributions to Xonotic: talking in the forum, talking some more, talking a bit in the irc, talking in the forum again, XSkie
Reply

#11
The byte code mentioned have to be interpreted, and it is very very slow, it contains usually additional jumps, at least two of them and a crap load of stuff to set-up, the stack frame, get the last pointer thing from memory, save the new one to memory, and somewhere in between, there is some code wich does the actual thing written. Its a LOT of overhead. This is how most interpreters work.

About security issues in case of using programs for processors (not for virtual machine): The dll, or any kind of other extention written for the program, will have a list of functions wich it want to access in other libraries or whatnot, this list of function can be read, and checked for containing stuff wich is interface to non game related stuff. So the mod file compiled must only include links to functions wich are part of the game anyway, and this can be checked by an easy method present in the original engine code (and executables). Furthermore, all the game engine should be protected from stack overflows, and a other things can be checked such as that the exectuable sections of the file must not allow self-modification (because this way its possible to be made so as to call lybraries outside of game libraries, but this would be hard to be recognised by automata before it is too late).
Reply

#12
And if you make it machine code then it can't run on each system so completely different versions would have to exist for different systems and may end up with servers specific for 32-bit, 64-bit and Linux/Windows/Mac clients.

This is not going to happen.

In addition, it might be slow in a per cycle basis but the client side footprint (what most people notice when playing the game online) is very small and fast compared to sounds, graphics, everything else running on the client.
I'm at least a reasonably tolerable person to be around - Narcopic
Reply

#13
The game runs on modern hardware at 100+ fps at full detail - why do you feel a need for any further optimization?
My contributions to Xonotic: talking in the forum, talking some more, talking a bit in the irc, talking in the forum again, XSkie
Reply

#14
Because on non-modern or low-end hardware it runs slower than it should. Optimization is a very important topic, but I'm not sure this thread exposes the right way to work on it.
Reply

#15
Yeah, I also don't think there's a need to rewrite how the Darkplaces engine works after 10+years of development :-).
My contributions to Xonotic: talking in the forum, talking some more, talking a bit in the irc, talking in the forum again, XSkie
Reply

#16
you want to optimize, because if you want to add kinda new features then it would be slow. something run on interpreter is very slow, however it depends on interpreter.. But already you have the game engine compiled to different executables, as it can run on different systems.
The code in c or c++ or whatnot, would look almost identical, if not completely, because the code would only use functions of the engine, and no other outsider functions would be used, then it just have to be compiled to different things.

What i think, that an open source game engine should only be written if it has many things it can achive faster then another open source engine, because features can be switched on of etc on the other fast running engine. Anyway, i dont have problem with the DarkPlaces engine, i only have problem with the fact that xonotic have been written in Qc (its very easy to rewrite to c or c++ or anything compilable) because u just look at the Qc interpreter, find what kind of functions are called and thats it.

btw, is darkplaces free to be edited?
Reply

#17
If it's very easy, do it yourself. Everything is licensed under GPLv2, which is a free software license.
Reply

#18
Quote:its very easy to rewrite to c or c++ or anything compilable
haha ... hell no ...

its hard enough for me to keep on track writing a small wiki page ...

it may be easy to convert code (4 u ... I can barely code at all) ... but it is a HUGE time commitment ... and most devs are working on adding new stuff ... not fixing what is working (except Samual Tongue) ...

speed wise ... minecraft is having more speed issues than us ... and they use java ... why don't you go try to convince them to switch ....
oh yeah ... also ... most every android app is java too ...

interpreted languages are NOT evil ... any computer thats having speed issues with xonotic's code ... is probably having MUCH worse issues with the graphics ... seeing as nexuiz (the thing that became xonotic) ran fine back in the mid 2000's ... and it was still quake c
Reply

#19
(08-31-2012, 07:50 PM)hutty Wrote:
Quote:its very easy to rewrite to c or c++ or anything compilable
haha ... hell no ...

its hard enough for me to keep on track writing a small wiki page ...

it may be easy to convert code (4 u ... I can barely code at all) ... but it is a HUGE time commitment ... and most devs are working on adding new stuff ... not fixing what is working (except Samual Tongue) ...

speed wise ... minecraft is having more speed issues than us ... and they use java ... why don't you go try to convince them to switch ....
oh yeah ... also ... most every android app is java too ...

interpreted languages are NOT evil ... any computer thats having speed issues with xonotic's code ... is probably having MUCH worse issues with the graphics ... seeing as nexuiz (the thing that became xonotic) ran fine back in the mid 2000's ... and it was still quake c

ok, interpreter is the source of evil, as any virtual machine is. download ida pro, find the qC interpreter in assembly listing and look at it.
anyway, again: java is kinda fucking slow, thats why minecraft has speed issues (if it does have). however java is still faster then qc i would think.
but, interpreted shit is not needed, compilers can compile to whatever kind of things.

Also, this can be converted to C or c++ or whatever language easily, and still using the DarkPlaces engine.

Also, this post would have to do with another one, that is an idea of merging similar modding projects, but whatever.

btw, Xonotic has neat graphics, excelent sound effects and excelent music (except for one wich would be on some map, i dont know the name of).
Reply

#20
If all you're going to do is berate the devs telling them it's easy to compile / convert QC to native code, please stop and go away.

Now give me a reason not to lock this thread.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [DISCUSSION] Xonotic and QuakeC: How painful could it be rewrite Xonotic in a new language? derrant 2 2,742 07-14-2020, 06:45 AM
Last Post: derrant
  [SUGGESTION] Lua scripting for the game? darkhog 2 4,301 09-05-2015, 05:33 PM
Last Post: TimePath
  [SUGGESTION] Language packs Exitium 31 38,934 12-18-2010, 12:55 PM
Last Post: Okitain

Forum Jump:


Users browsing this thread:
4 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-