PDA

View Full Version : Are there any famous game engines written in C?



Viva
May 9th, 2010, 07:16 PM
You always hear about game engines written in C++, but are there any written purely in C?

Daniel0108
May 9th, 2010, 07:20 PM
Why not C++.
C++ is just an improved C.
I know that there are only a few game engines for C.
Greets,
Daniel

NightwishFan
May 9th, 2010, 07:25 PM
If C++ was an improved C nothing would be written in C. That being said here is my answer:
http://en.wikipedia.org/wiki/List_of_game_engines

rabid9797
May 9th, 2010, 07:31 PM
after reading nightwishfan's post, the wiki page says the ioquake3 engine was written in c. that's pretty famous.

Viva
May 9th, 2010, 07:38 PM
after reading nightwishfan's post, the wiki page says the ioquake3 engine was written in c. that's pretty famous.
Yes, it is. The idtech engines are even more popular.

Sam
May 9th, 2010, 07:41 PM
Why not C++.
C++ is just an improved C.
I know that there are only a few game engines for C.
Greets,
Daniel

You might be interested to read Linus Torvald's rant on C++ (http://lwn.net/Articles/249460/).

MaxIBoy
May 10th, 2010, 04:09 AM
All the Quake/Doom engines up through Doom 2 and Quake 3 were written in C. These were the most successful game engines of all time.


Why not C++.
C++ is just an improved C.
I know that there are only a few game engines for C.
Greets,
DanielAnyone who ever says anything about C++ as "just an improved C" should be forced to read this entire page:
http://yosefk.com/c++fqa (http://yosefk.com/c++fqa/)
Yes, all of it. Unless you change your mind about C++. :)

I do in fact know C++, and I can't really think of any time I've needed any of its features. When I wrote C++, it was really just C with the printfs turned into cout << and that's about it. So I just started naming my files ".c" instead of ".cpp."

There are some projects where C++ is used, and it seems to be working out okay for them, but the best usage of C++ usually seems to be "keep your code as C-like as possible." Sure, C++ objects can be a lot more convenient than C structs in a lot of cases, and if you're careful, you can use them to your advantage. But making your code 100% object-oriented is a big mistake. The textbooks all say to do this though, so that's what most C++ programmers do. While it's possible to write good C++, most C++ is bad code.

I personally don't think it's possible for a compiled language to do really good OOP. It's just too complicated to do without at least some kind of virtualization or interpreter.

kaldor
May 10th, 2010, 07:13 AM
Quake's engines are written in C.

Games such as..

Quake 1/2/3/TA (unsure of Q4)
Doom 1/2 (unsure of D3)
OpenArena
Tremulous
Alien Arena
Medal of Honor (one of them)
Wolfenstein ET
Jedi Academy
Jedi Outcast
Call of Duty 2
Soldier of Fortune

I *love* the Quake III engine. My favourite games are all based on Quake III's engine (IdTech3)

MaxIBoy
May 10th, 2010, 04:11 PM
Doom 3 and Quake 4 (and later) were written in C++.

BrokenKingpin
May 10th, 2010, 05:17 PM
I do in fact know C++, and I can't really think of any time I've needed any of its features. When I wrote C++, it was really just C with the printfs turned into cout << and that's about it. So I just started naming my files ".c" instead of ".cpp."

There are some projects where C++ is used, and it seems to be working out okay for them, but the best usage of C++ usually seems to be "keep your code as C-like as possible." Sure, C++ objects can be a lot more convenient than C structs in a lot of cases, and if you're careful, you can use them to your advantage. But making your code 100% object-oriented is a big mistake. The textbooks all say to do this though, so that's what most C++ programmers do. While it's possible to write good C++, most C++ is bad code.

I personally don't think it's possible for a compiled language to do really good OOP. It's just too complicated to do without at least some kind of virtualization or interpreter.
This is by far the most ignorant post I have ever seen on these forums. Judging by your comments you have been programming for about 2 years tops.

Queue29
May 10th, 2010, 05:33 PM
This is by far the most ignorant post I have ever seen on these forums. Judging by your comments you have been programming for about 2 years tops.

+1

People who poo-poo C++ are either ignorant or naive, or both. Sure, it's a complicated mess. But there's a reason it's so popular.


There are only two types of programming language: The type everyone complains about. The type nobody uses or cares about

- Bjarne Stroustrup

MaxIBoy
May 10th, 2010, 06:22 PM
People who poo-poo C++ are either ignorant or naive, or both. Maybe you're right, but I'm in good company, including Eric S. Raymond:
http://esr.ibiblio.org/?p=532

Sure, it's a complicated mess. But there's a reason it's so popular.If it's a complicated mess, then it doesn't matter HOW popular it is. There was a time when pet rocks were all the rage, and I can't for the life of me figure out a good reason for that. Sure, pet rocks didn't last longer than six months, but six months is already enough to generate a lot of momentum and legacy code for a programming language.

BrokenKingpin
May 10th, 2010, 08:43 PM
C++ has a lot of good features for why it has been around for this long.