Sorry to be late to this topic and Discord is the worst place to discuss anything older than a few days...
BogDan wrote:QUOTE (BogDan @ Oct 27 2017, 09:21 AM) Hi,
I'd like to upgrade the codebase to C++14[0] to pave the road for a
possible linux port[1]. Of course I want to upstream all my changes. Now the question is: will the core developers accept such changes?
Before I get started, is it possible to remove the obsolete projects first? I don't want to spend time to upgrade dead code
[0]: I need to get rid of all Microsoft specific keywords (e.g. WORD, BYTE, DWORD, HRESULT, etc.) and use the standard ones. Next step will be to get rid of TRef&co and use smart pointers, std::function & binders, etc.
[1]: A possible linux/android/mac port is a nice dream, so, please keep in mind that it's not a promise!
There will be needed lots of changes which will take a lot of time, my todo list looks like this:
1. remove all the obsolete
2. upgrade codebase to C++11/14
3. remove the the MS specific pch. On windows it will slow down a little bit the compilation at first time (with a few seconds), but incremental builds will be faster. Without this change we can't have code-completion and other goodies in linux IDEs.
4. use SDL for main loop, input, window management, sound?(OpenAL seems to be better for advance stuff)
4.1 move the windows specific bits into separate files.
5. add Cmake build system (VS2017 seems to support cmake, so we can eventually remove VS2017 projects).
6. port the 3d part to opengl(es)/vulkan?. This will be the hardest part because at first look it seems freeallegiance doesn't use any shaders ...
well like I said in a PR comment , I do think it's the backward way to do this.
concerning your todo list:
1. but so far no one started this except me and nothing is in the master branch yet.
2. why upgrade codebase to c++11/14 ?
3&5. this will hurt and eventually add bugs/issues to the IDE 100% of us is using. It's not like VS is not free and/or Alleg code requires the non free VS version.
4. why SDL and not something else ?
6. don't forget the netcode, DirectPlay.
imho, the good approach is to "simplify, simplify, simplify" the current code while keeping it 'Windows only' for now (and VS only for now).
do more "cuts" than "changes". HRESULT, BYTE, DWORD, etc are fine for now. no point changing them, even more if a lot of them will be removed anyway...
Because the start is to remove obsolete stuff like AGC, COM/OLE stuffs, pigs lib and side small tools (mdlc, etc).
Then start removing/replacing "Windows specific" stuff:
- the use of Windows registry
- all com/atl/win32 calls
- DirectPlay (that's a hard one)
- Direct3d (that's an even harder one)
Then and ONLY THEN, we *could* start moving away from VS and start 'thinking' about building on Linux. and Moving to c++11/14 and start refactoring/renaming some old code.
There is no gain trying to 'compile on Linux' while still having registry, ole/com, DirectPlay, Direct3d, etc.. it's a complete waste of time and you'll add bugs and/or consume QA/build time.
Don't get me wrong, I'm all for a 'multi-platform' Alleg that could build & run on many OS but I just don't think this is the good way to do. At least in the 'master upstream' branch. That branch is for short term iteration for current game code. You don't put half baked, mid/long term stuff in the master. What if BogDan goes MIA without finishing what he started ?
I don't know but from what I see being committed to the master branch I'm very worried for the future. This looks like R8 fiasco all over again.
Stick to simple & 'useful for the game' changes. Fixes and changes that can help get new players and keep current ones...
Everything else doesn't belong in the master branch.
Sorry to sound negative but someone has to and I've been there since 1999 and I've seen so many stuff started and never finished or over engineered and completely out of phase with the players needs.