Author Topic: Quick question  (Read 3833 times)

Garrett

  • Autococker
  • Posts: 1372
Quick question
« on: September 29, 2007, 11:31:04 PM »
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++?

y00tz

  • Autococker
  • Posts: 2742
Re: Quick question
« Reply #1 on: September 30, 2007, 01: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.

Garrett

  • Autococker
  • Posts: 1372
Re: Quick question
« Reply #2 on: September 30, 2007, 09: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.

Eiii

  • Autococker
  • Posts: 4595
Re: Quick question
« Reply #3 on: September 30, 2007, 11:30:10 AM »
"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"

magalhaes

  • Autococker
  • Posts: 1256
Re: Quick question
« Reply #4 on: September 30, 2007, 12:33:36 PM »
WE DONT WANT TO GET OUT OF THE 60'S!!!

Garrett

  • Autococker
  • Posts: 1372
Re: Quick question
« Reply #5 on: September 30, 2007, 03: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!!!!

KnacK

  • Global Moderator
  • Autococker
  • Posts: 3039
Re: Quick question
« Reply #6 on: September 30, 2007, 04: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!

Garrett

  • Autococker
  • Posts: 1372
Re: Quick question
« Reply #7 on: September 30, 2007, 04:48:06 PM »
Gotta love sarcasm.

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: Quick question
« Reply #8 on: September 30, 2007, 05: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

Cobo

  • Autococker
  • Posts: 1362
Re: Quick question
« Reply #9 on: September 30, 2007, 06: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.

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: Quick question
« Reply #10 on: October 02, 2007, 09: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).

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Quick question
« Reply #11 on: October 02, 2007, 10:19:22 PM »
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++.

Garrett

  • Autococker
  • Posts: 1372
Re: Quick question
« Reply #12 on: October 03, 2007, 01:46:13 PM »
Would It make the coding language easier to understand?

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Quick question
« Reply #13 on: October 04, 2007, 02:49:13 PM »
It would make the code easier to understand at the cost of performance, typically.

Garrett

  • Autococker
  • Posts: 1372
Re: Quick question
« Reply #14 on: October 08, 2007, 03:08:00 PM »
So in other words, there is no need right now to port the game to C++?

Cobo

  • Autococker
  • Posts: 1362
Re: Quick question
« Reply #15 on: October 08, 2007, 03:14:29 PM »
So in other words, there is no need right now to port the game to C++?
Probably not ever.

lekky

  • Autococker
  • Posts: 2449
Re: Quick question
« Reply #16 on: October 09, 2007, 06: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.

Loser

  • PGP
  • Posts: 4
Re: Quick question
« Reply #17 on: December 31, 2007, 01: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

Deranged

  • 68 Carbine
  • Posts: 409
Re: Quick question
« Reply #18 on: January 02, 2008, 06: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++...

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Quick question
« Reply #19 on: January 03, 2008, 03: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.