Digital Paint Discussion Board

Development => General Development => Topic started by: Garrett on September 30, 2007, 01:31:04 AM

Title: Quick question
Post by: Garrett on September 30, 2007, 01:31:04 AM
I am starting to learn C++ and I wanted to know if there is any plans for the dev team to be getting the Paintball game converted to C++ instead of C.  I know you guys love C but after reading up on both languages, I found that C++ has more features and such.  Is it possible to even transfer the game to C++?
Title: Re: Quick question
Post by: y00tz on September 30, 2007, 03:52:17 AM
I'm sure it's possible to port it to C++, I know the Quake2 Engine has been (as well as managed C++/.NET)

I don't see any advantages that outweigh the time spent porting, and it's not like C is a dead or ineffective language. 

Then again, Jitspoe's the one who codes around here, I'm just the window washer.
Title: Re: Quick question
Post by: Garrett on September 30, 2007, 11:22:41 AM
Haha.  I want to help make this game more popular.  It may take a bit but by the time I can help, I will have a subject for my senior project.
Title: Re: Quick question
Post by: Eiii on September 30, 2007, 01:30:10 PM
"Hey, did you hear about that paintball game?"
"Uhuh, I played it once. It sucked."
"Well that was before! Now, it's coded in C++"
"Woah! No way, dude!"
"Yeah! I thought it sucked before, but now it's AWESOME!"
"AWESOME"
"AWESOMMMMMMMMMME"
Title: Re: Quick question
Post by: magalhaes on September 30, 2007, 02:33:36 PM
WE DONT WANT TO GET OUT OF THE 60'S!!!
Title: Re: Quick question
Post by: Garrett on September 30, 2007, 05:03:39 PM
Eiii... haha.  C++ will make help make the game run smoother and you can make something new for it quicker.  C++ can also help the game look better too.

EDIT:  100 posts... W000T!!!!
Title: Re: Quick question
Post by: KnacK on September 30, 2007, 06:25:16 PM
Instead of C, maybe Jits shoudl write it in straight assembly.  That way it wont need an interpretor and the code iwll FLY!
Title: Re: Quick question
Post by: Garrett on September 30, 2007, 06:48:06 PM
Gotta love sarcasm.
Title: Re: Quick question
Post by: Zorchenhimer on September 30, 2007, 07:38:55 PM
Instead of C, maybe Jits shoudl write it in straight assembly.  That way it wont need an interpretor and the code iwll FLY!

What are we waiting for? LETS GO!! :D
Title: Re: Quick question
Post by: Cobo on September 30, 2007, 08:24:34 PM
C++ will make help make the game run smoother and you can make something new for it quicker.  C++ can also help the game look better too.
Wrong, wrong, and wrong.


Well, maybe you were right about making something quicker, but the time that it would take to port it wouldnt be worth it.
Title: Re: Quick question
Post by: sk89q on October 02, 2007, 11:47:30 PM
C++, C, and assembly compile to machine code. It makes no difference on runtime speed, game graphics, or capabilities with what programming language you use. Choosing between C or C++ is just a personal preference of paradigm. (Advantage with assembly is that you can optimize certain routines, as in some cases, C/C++ doesn't compile in the most efficient manner).
Title: Re: Quick question
Post by: jitspoe on October 03, 2007, 12:19:22 AM
Depends how you use it - if you're using stl stuff like strings and vectors with C++, the code will be simpler but the game will run slower.  If you use fixed-length arrays like what's currently being done... well, there's not much sense in porting it to C++.
Title: Re: Quick question
Post by: Garrett on October 03, 2007, 03:46:13 PM
Would It make the coding language easier to understand?
Title: Re: Quick question
Post by: jitspoe on October 04, 2007, 04:49:13 PM
It would make the code easier to understand at the cost of performance, typically.
Title: Re: Quick question
Post by: Garrett on October 08, 2007, 05:08:00 PM
So in other words, there is no need right now to port the game to C++?
Title: Re: Quick question
Post by: Cobo on October 08, 2007, 05:14:29 PM
So in other words, there is no need right now to port the game to C++?
Probably not ever.
Title: Re: Quick question
Post by: lekky on October 09, 2007, 08:57:28 PM
So in other words, there is no need right now to port the game to C++?

You always have to weigh up the advantages and the disadvantages with any software project. The cost of doing something like that far outweighs any potential benefits.
Title: Re: Quick question
Post by: Loser on December 31, 2007, 02:29:36 AM
Paintball 2 isn't a big game, you don't need to port it over to a OOP laugauge like C++, i think there won't be a significant speed difference in speed if it were written in c++ btw
Title: Re: Quick question
Post by: Deranged on January 02, 2008, 07:43:07 PM
Funny how C++ and C are both compiled to the same native language in general but some people like to say that using one will make the game run "smoother" or "faster" when really with in-compiler optomizations and such, there's very rarely a noticable difference between an executable created with C and one created with C++...
Title: Re: Quick question
Post by: jitspoe on January 03, 2008, 04:07:14 AM
That was true at one point, but I don't think it really is anymore.  It's not that C++ code is slower than equivalent C code, it's that when you start writing OO-style code with things like inheritance, virtual functions, polymorphism, and dynamic casting, the resulting code, while potentially better organized, runs slower.  It also compiles slower.  A lot slower.
Title: Re: Quick question
Post by: Deranged on January 03, 2008, 11:34:17 PM
The speed difference is marginal though. I think the comparison between C's stdlib and c++'s namespace std functions speedwise was C++ was an average of 4 or so milliseconds slower. It's not something that's a big deal. I mean hell, a lot of the time these days I use MANAGED development just because it's so much easier to work with, even if it is even slower(still marginally though)
Title: Re: Quick question
Post by: jitspoe on January 04, 2008, 03:37:26 PM
Depends on what you're doing - if you're processing millions of documents, that extra 4ms can add up to weeks or even months of processing time.

But, yeah, it's marginal compared to something like VB or Java.