30. November 2008 16:56
Update: Check out my wiki page for the latest download of WinROTT.
I'm making progress moving all extern declarations to header files and removing externs from any cpp files. I have been able to process about 50% of the CPP files. By getting all of the declarations worked out, it will allow me to have modules consisting of a standalone header file (.h) and implementation file (.cpp). I'm also able to see declarations that belong in different modules. For instance, several variables are declared in WinROTT, but are only used in one other module and not used in WinROTT. It's generally better to move the declarations and get rid of any global declarations.
Why do all of this? Once I get the modules properly divided up, I can begin to move code into class declarations. It will also make it easier to isolate OS and hardware specific code into separate dlls, rather than a monolithic program. It also helps me to become familiar with the code. I've already noticed several places where I can improve network code.
I'm also thinking it might be better to implement the game using a peer-to-peer protocol. Even though I am not a Microsoft fan, it might make sense to use their peer-to-peer protocol for WinROTT. I'd appreciate any comments on this. I'm interested in the MS P2P as a chance to become familiar with the protocol.