How much do you use C++ in your games ???
This can be a strange question but I was wondering if every C++ programmer build their games completly using C++ methods.
Personnaly I can be called a C++ programmer (2 years of C++ studying...) But when I write games I don''t use all possibilities it gives.
My programs are a mix of C and C++. (I used classes to make a OOP game but for implementation I generally C instead of C++ STL with things like , , ...)
So what about you ?
Do you make Pure C games, Pure C++ games or it''s a mix of both ?
Oops there''s was a problem when writing the post (it didn''t write text between characters greater than and lower than...)
So here''s the complete sentence
"instead of C++ STL Things like string, vector, map ..."
So here''s the complete sentence
"instead of C++ STL Things like string, vector, map ..."
I am quite new to game programming and am working on my first real project after being through lots of OpenGL Tutorials. So I don''t know if what I''m using is what is used in general.
So what I do is I use C++ for object creation like every tile in my world is an instance of a class. However, stuff like initialization, reading in the map, rendering the scene etc...is done using C. So I use a mix of both. Depending on what I wanna do.
So what I do is I use C++ for object creation like every tile in my world is an instance of a class. However, stuff like initialization, reading in the map, rendering the scene etc...is done using C. So I use a mix of both. Depending on what I wanna do.
I use both where I see fit. There are no set rules that say you should use only C or C++. Of course, before C++ was so mainstream in game development C was the sole language for game development. Do a google search for the Quake 2 source to see what I mean.
I''m sure that there are purest game programmers out there who will insist on using either on or the other, but do not accept this as chapter and verse.
I''m sure that there are purest game programmers out there who will insist on using either on or the other, but do not accept this as chapter and verse.
You know if I post this it was only by curiosity.
I''ll keep writing my games using both C and C++
(I think it''s a good way to make the game running well !)
I''ll keep writing my games using both C and C++
(I think it''s a good way to make the game running well !)
I use C++ constructors and C libraries(i.e., never include anything without a .h) :)
[Edited by - Leffe on August 31, 2005 12:51:02 PM]
[Edited by - Leffe on August 31, 2005 12:51:02 PM]
I mainly program in C++, because I like it and that's the way everything is developped here. Everything is written with a OOP design. The engine we license is also plain C++. The only functions we have are util fonctions that didn't really fit in a class.
I also use a lot STL, because it's well written and easy to use. Most distributions of STL are way more advanced that what you could come up with your own implementation of a vector or a linked list...
I respect programmers that still code in C, but in my opinion C++ is more fit for large projects where you have to work in a team of programmers.
For hobby project, I'd pick the language I'm the more used to... which is, in this case, also C++ heheh
[edited by - xEricx on March 6, 2003 9:26:38 AM]
I also use a lot STL, because it's well written and easy to use. Most distributions of STL are way more advanced that what you could come up with your own implementation of a vector or a linked list...
I respect programmers that still code in C, but in my opinion C++ is more fit for large projects where you have to work in a team of programmers.
For hobby project, I'd pick the language I'm the more used to... which is, in this case, also C++ heheh
[edited by - xEricx on March 6, 2003 9:26:38 AM]
C++ is a superset of C - or at least was - so when you write in "C", you''re also writing in C++. Most of the time anyway. These days there are C constructs that are not valid C++, and vice-versa, but it''s unlikely that you''re using such forms, which means you''re programming entirely in C++.
Gotcha, didn''t I?
Gotcha, didn''t I?
I asked this question here a few weeks ago, and I got basically the same answer,
"How much c++?!? use as much as you want!"
"in my opinion C++ is more fit for large projects where you have to work in a team of programmers."
I think this guy is right, I think you could use more OOP/C++ stuff if you are:
a)Writing a large, complex library that needs to be very flexible, maybe open source, where alot of people will be looking at and possibly modifying or adding new version to a CVS..
b)working on a large team where seperating code into modules is more important because you have different people doing the sound engine, graphics, physics, etc..
If you don''t fit into those categories I see no probs with using "just a little" C++ like STL and some classes.. thats what I''ve been doing lately, and everything seems to be working out fine.
"How much c++?!? use as much as you want!"
"in my opinion C++ is more fit for large projects where you have to work in a team of programmers."
I think this guy is right, I think you could use more OOP/C++ stuff if you are:
a)Writing a large, complex library that needs to be very flexible, maybe open source, where alot of people will be looking at and possibly modifying or adding new version to a CVS..
b)working on a large team where seperating code into modules is more important because you have different people doing the sound engine, graphics, physics, etc..
If you don''t fit into those categories I see no probs with using "just a little" C++ like STL and some classes.. thats what I''ve been doing lately, and everything seems to be working out fine.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement