Porting to C++

For code related discussions and questions
Ceiling Cat
Trained
Trained
Posts: 47
Joined: 17 Jan 2010, 12:54

Porting to C++

Post by Ceiling Cat »

I was just browsing the source, and I see some bits of C++ here and there, while the old code is still in C. Wanted to ask, are there any plans on gradually porting this piece by piece to the more user-friendly alternative, or it's gonna stay as it is forever? I was planning to mod the game but it's like... spaghetti.
Last edited by Zarel on 15 Mar 2010, 09:25, edited 1 time in total.
Reason: Renamed topic to something less vague
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: A question.

Post by Zarel »

Hey! That's very readable C code, I'll have you know. Seriously, if I can understand it, anyone can! ;)
stiv
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 876
Joined: 18 Jul 2008, 04:41
Location: 45N 86W

Re: A question.

Post by stiv »

Mods change the data files and graphics, not the source code.
Ceiling Cat
Trained
Trained
Posts: 47
Joined: 17 Jan 2010, 12:54

Re: A question.

Post by Ceiling Cat »

I know, but stuff like camera behavior - even Pumpkin guys wrote in the comments it's very tangled.
Quite organized for C, but still unreadable to a foreigner.
dmkp
Trained
Trained
Posts: 182
Joined: 08 Jan 2010, 20:50
Location: UK
Contact:

Re: A question.

Post by dmkp »

Unfortunately... C and C++ are the most efficient languages for games to be programmed in. Not very likely that anyone would want to port it to say visual basic.. because vb sux :p
Seismo
Trained
Trained
Posts: 70
Joined: 06 Feb 2010, 17:32

Re: A question.

Post by Seismo »

If you try to convert this code step by step to c++ you will be much faster to create just a new engine and build some interfaces to get the "old" grafics/sounds/ai scripts/etc. running on the new engine. But feel free to convert some parts and see for yourself what will happen to your time ;)
crux
Trained
Trained
Posts: 139
Joined: 16 Jan 2010, 03:21

Re: A question.

Post by crux »

Seismo wrote:If you try to convert this code step by step to c++ you will be much faster to create just a new engine and build some interfaces to get the "old" grafics/sounds/ai scripts/etc. running on the new engine. But feel free to convert some parts and see for yourself what will happen to your time ;)
they appear to be adding more and more c++ code every time I look.
Seismo
Trained
Trained
Posts: 70
Joined: 06 Feb 2010, 17:32

Re: A question.

Post by Seismo »

Well, only the easier parts are converted. The common parts will be still left in spaghetti manner. I guess no one will ever change it due to extreme changes between branches/releases or similar nonsense reasons. I give up here to interest and waste my time for this project since i saw which "experts" working on this code. Windows hater programming on Wine under Linux software for Windows - well, anything else i should explain?
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: A question.

Post by Zarel »

Seismo wrote:I give up here to interest and waste my time for this project since i saw which "experts" working on this code. Windows hater programming on Wine under Linux software for Windows - well, anything else i should explain?
Hey! No one here uses Wine at all. Why would you need Wine to code software for Windows? O_o

fyi, I use my Windows machine whenever I do Warzone balancing (Excel for Mac doesn't support CSV very well at all). i-NoD and Buginator also code primarily on Windows. I also do plenty of testing on Windows.

None of the developers here hate Windows, some of us just prefer other operating systems more.

And none of us consider ourselves "experts" - that's a term that should really only be bestowed by a third party.

So yes, there's plenty you need to to explain, considering the fact that we make software for Windows was literally the only true fact in your entire post.
Seismo
Trained
Trained
Posts: 70
Joined: 06 Feb 2010, 17:32

Re: A question.

Post by Seismo »

May you are the exception of the rule, but every time i tried here to get rid of stupid issues i got things explaind with qt, linux, branch crap and other nonsense i never need to talk about. I am disappointed of some guys of your development team due to there absolut ignorance and incompetence and no one is kick them or even setting things correct. I just should not answer here, bacause of the fact that it will not change anything, but when i said a, so i should also say b. The part about spaghetti code is fully true and there are a lot of passages of this code needs to refact complete. But hey, hackers hacking hacked code, thats not software development. You will find better words for this...
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: A question.

Post by Zarel »

Seismo wrote:May you are the exception of the rule, but every time i tried here to get rid of stupid issues i got things explaind with qt, linux, branch crap and other nonsense i never need to talk about. I am disappointed of some guys of your development team due to there absolut ignorance and incompetence and no one is kick them or even setting things correct. I just should not answer here, bacause of the fact that it will not change anything, but when i said a, so i should also say b. The part about spaghetti code is fully true and there are a lot of passages of this code needs to refact complete. But hey, hackers hacking hacked code, thats not software development. You will find better words for this...
...I'm afraid I don't understand your English. Can you speak in your native language?

I'll try to guess at what you're trying to say:
- What issues are you talking about? I asked Buginator, and he says we've committed several of your patches.
- What sort of ignorance are you encountering?

Things about Qt, Linux, and branching are important. We are not going to commit a patch if it happens to break compatibility with Linux or something...
User avatar
bornemix
Code contributor
Code contributor
Posts: 56
Joined: 09 Mar 2010, 09:39

Re: A question.

Post by bornemix »

Crappy code is what professional programmers should be able to digest for breakfast.

Don't you know that most people who program aren't that good in structuring their code?

(in other words: get used to dealing with it, and it will benefit you even in your career... I know I did)
dmkp
Trained
Trained
Posts: 182
Joined: 08 Jan 2010, 20:50
Location: UK
Contact:

Re: A question.

Post by dmkp »

bornemix wrote:Crappy code is what professional programmers should be able to digest for breakfast.

Don't you know that most people who program aren't that good in structuring their code?

(in other words: get used to dealing with it, and it will benefit you even in your career... I know I did)

I'm good at structuring my code I'll have you know! xD
User avatar
bornemix
Code contributor
Code contributor
Posts: 56
Joined: 09 Mar 2010, 09:39

Re: A question.

Post by bornemix »

That's not my point.

My point is that a good programmer should be able to read bad code without complaining.
dmkp
Trained
Trained
Posts: 182
Joined: 08 Jan 2010, 20:50
Location: UK
Contact:

Re: A question.

Post by dmkp »

bornemix wrote:That's not my point.

My point is that a good programmer should be able to read bad code without complaining.
I take it you don't do any programming then from your obvious ignorance shown here xD

It's still got to be readable. Being a good programmer does not mean you can understand spaghetti straight away.
Post Reply