id tech 3 and c++

Started by
6 comments, last by DeAndreon 14 years, 8 months ago
Hello people! I've seen this 3d engine over internet... My question is: it's possible use c++ with this 3d engine? Or only c? I think that c++ is an extension of c therefore it's possible use c++ with id tech 3, isn't? thanks in advance!
Advertisement
Note: The Quake Virtual Machine uses LCC to compile, which does not support c++.
So if you want to keep QVM's for crossplatform development of mods, then it's not possible.
If you want to rip off the QVM support and just use dll/so's, then it is possible,
I've already done it some time ago, was quite some work tho to get all the errors and warnings removed.
If you then still want crossplatform mods, you could add a different virtual machine instead or make it scripted instead.
In any way, you've got quite a workload ahead of you, especially if you want more than just getting it running with a c++ compiler.
Ouch... Nothing C++... And what language i must use with id tech 3? C?

Thanks for your answare!
yes, quake 3 is almost entirely C.
some parts are assembler, but you shouldn't need to change them.
Thank you! ok, difference between c and c++ is c++ is object - oriented and c is structurated, isn't? Only this is the differece? I think yes...

id tech 4 is in c++ but it is still no free as id tech 3...


And difference beetween ogre and id tech 3? What are?


Again thank you :)
Ogre is only a GRAPHICS api, it doesn't have all the other bells and whistles such as input, ai, sound, collision (maybe it does have some), or physics for that matter. An engine is a compilation of all of these that let you basically plug and chug with assets while scripting events, triggers, AI, and the likes.
c++ is more than just c with classes, you get:
- templates
- different memory allocation (new/delete instead of malloc/free)
- nicer exception handling
and quite a few more nice features.
if you haven't learned c or c++ yet, it's sure a lot easier to learn c.
and quake 3 was the game I learned c programming with.
quake 3 has a very nice coding style for c-code and you can quickly get into it.
Other games had a very ugly coding style, for example duke nukem 3d, I took a look at it, but my eyes started bleeding short after.
Dunno how they managed to write such a great game with that coding style, but anyway..
C++ takes a while longer to learn, a rough estimation from my learning time is that it takes 8 times longer to learn c++..
One thing to note: I already had learned c when I started learning c++, so it'll take even longer if you go straight for c++.
Also c++ games/engines tend to be more complex, and not as easy to get into.

So if you want to see quick results, start learning c and while doing it, try things out in quake 3 modding.
A Good book for it is The C Programming Language 2nd Edition(ANSI) by Kernighan/Ritchie

Quake 3 tutorials can be found here:
http://www.quake3hut.co.uk/q3coding/
especially the code3arena ones are recommended.
Thanks for the answares :) I'm going to learn C++... I'm arrived to class and i'm understanding it well :) I will program 2 or 3 games in 2d and next i will go on 3d and i will choice or ogre or id tech 3... But, as i understand, i will learn also the c... I've a book on c... And i will learn something on it when i will program 3d engine such as id tech 3...

Thanks for the answares :) It's a good forum with expert people :)

This topic is closed to new replies.

Advertisement