[crossfire] Crossfire server code cleanup/janitorial
Tolga Dalman
tolga.dalman at googlemail.com
Sat Apr 19 11:45:26 CDT 2014
On 04/19/2014 05:01 PM, Kevin Zheng wrote:
> On 04/19/2014 03:46, Tolga Dalman wrote:
>> 1. What platforms are still relevant ? Beside Linux and BSD, I found
>> references to these OSes: win32, hurd, hpux, ultrix, osf1, sgi,
>> sun, vax, ibm032.
>
> Right now, there are many people using Windows, Linux, BSD, and OSX.
> Most recent development took place on Linux and BSD.
That's what I thought. Do you have any download statistics for, say,
Windows binaries ?
> While it's hard to imagine someone running a Crossfire server on VAX or
> an IBM032, I don't think it's necessary to go in and explicitly pull out
> support. I highly doubt those platforms still work _with_ current
> support, because nobody has been able to test.
>
> Crossfire tries to be portable, so a good goal would be to remove
> conditional compilations from most of the source code. In an ideal world
> every portable project should run on any semi-compliant system with
> appropriate libraries installed.
My proposal aims at specifying the requirements on platform and programming
language for running crossfire. In an ideal world, all supported platforms
meeting the requirements are perfectly supported. Everything else needs to be
adapted. Right now, I only see the above mentioned OSes as being relevant.
So my question: where are the user's of crossfire really ?
>> 2. What C standard is relevant ? Moving towards C99 or even C11 would
>> allow large portions of cleanups (standard functions, types, language
>> constructs, etc).
>
> I think moving to C99 is a good idea, but right now the blocking issue
> seems to be Visual Studio, which is used to build the server on Windows.
> It'd be interesting to find out how much C99 VS supports.
AFAIK, C99 is not an issue with VS12.
>> 3. What about the use of C++ (2011) ? It is clearly possible to
>> smoothly convert existing code to C++ which allows better maintenance
>> of the code.
>
> That looks like a long-term goal, because I don't see that happening
> until more stuff is cleaned up. As Nicholas mentioned, there isn't a
> pressing need for C++. That, and I don't know C++ :D
Talking about portability, C++ is really the best choice, especially when it
comes to Windows & VS.
Since C99 is almost entirely a subset of the C++ language, an approach would be
to compile all code with a C++ compiler. With that done, some nice C++ features
can be used out of the box. Afterwards, modules can be replaced by real C++
classes. But that, as you said, is a long-term goal.
The real question is: what is the future of Crossfire ? I agree to Nicolas that
focussing on game content is more important than code. However, the current code
architecture restricts the maintenance and addition of new features. I'd like to
improve this situation.
Best regards
Tolga Dalman
More information about the crossfire
mailing list