Author Topic: Rewrite game to c++  (Read 1249 times)

0 Members and 1 Guest are viewing this topic.

Offline someChanse

  • Major(1)
  • Posts: 8
Rewrite game to c++
« on: September 16, 2013, 07:32:43 am »
I would like to ask how difficult it would be to rewrite the game completely on С++. After all, if the game was written in С++, we would have several advantages, such as Increase productivity and full portabilty of code. Thus, further adding also OpenGL support we get the version of a soldier on Linux and MacOS. It will not ever in the plans?

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Rewrite game to c++
« Reply #1 on: September 16, 2013, 07:49:27 am »
Try it yourself. I don't think you need current source code to do that.
Oh, you can also base on some other projects like this one.
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline Shoozza

  • Retired Soldat Developer
  • Veteran
  • ******
  • Posts: 1632
  • Soldat's Babysitter
    • Website
Re: Rewrite game to c++
« Reply #2 on: September 16, 2013, 08:19:52 pm »
I would like to ask how difficult it would be to rewrite the game completely on С++.
Probably not easy. I'm not sure if even MM still remembers how the game works to recreate it.
Even if you rewrite the game you need to recreate a lot of bugs or it will feel different. The reason is that these "bugs" became a central part of the game over the years.

After all, if the game was written in С++, we would have several advantages, such as Increase productivity and full portabilty of code.
I think the game would be in a much worse state if it was written in C++.
C++ has a lot of pitfalls due to it's growth over time.
The C++ you write today is different from the one you would write in 2002.

It has also very long compile times.

C++ is as unportable as Delphi/Object Pascal when you use libraries which work on Windows only.

You can compile Object Pascal code for Windows, Linux, OSX and other Platforms so portability is not an issue.
Soldat just needs to use other libraries.

Thus, further adding also OpenGL support we get the version of a soldier on Linux and MacOS. It will not ever in the plans?
Adding OpenGL support and porting the game to Linux and OSX is a long term goal for us.
My plan is to use SDL2 and OpenGL for this.
 
I compiled a few SDL2 tutorial programs  (which I rewrote in Object Pascal) for Windows and Linux recently and they worked.

So you see there is not need to throw everything away and redo it, we can adapt the existing code base instead.
Rules
Tools: ARSSE - SARS - SRB - chatMod